Showing posts with label Original content. Show all posts
Showing posts with label Original content. Show all posts

March 4, 2014

IE : Can’t display IIS Failed Request Logs or http://127.0.0.1

Have you ever heard about IE Enhanced Protected Mode or Mark-of-the-Web (MOTW) ?

Well, if you encounter one of those problems you should :

  • Opening IIS Failed Request Logs files (XML+XSL) from you local machine with IE result in a text page without formatting.
  • Trying to access your local web server with the 127.0.0.1 ip (not localhost) or the real local ip of your computer with IE results in an error page.

You have to blame the IE Enhanced Protected Mode for those ‘problems’. Here’s two solutions :

1) Disable the Enhanced Protected Mode
  • Open Internet Options
  • click on the Advanced tab
  • Unselect ‘Enable Enhanced Protected Mode’ in the Security Section
  • Restart IE
2) Add you site to the Intranet Zone
  • Open Internet Option
  • Click on the Security tab
  • Select the Intranet zone
  • Click on the Sites button
  • Click on the Advanced button
  • Add the following address :
http://127.0.0.1 To allow access to your local web site
about:internet To allow access to file with a MOTW (ex: IIS Failed Request Logs)

Personally I prefer option 2.

References :

October 3, 2012

How to delete all Extended Attributes in HFS+ (OS X)

Here’s a little AppleScript Droplet to clear all Extended Attributes in OS X. This is useful to delete the famous com.apple.quarantine attribute.

  • Create a new script in AppleScript Editor
  • Copy and paste the code
  • Save as an application under the name Clear-Extended-Attributes.app

Then, you can simply drag an drop files or folders on the application.

(*

------------------------------------------------------------------------

 

C L E A R   E X T E N D E D   A T T R I B U T E S

 

Delete all extended attributes from one or many files

under OS X

 

Author : Jean-Pierre.Paradis@fsa.ulval.ca

Date : 2 octobre 2012

Version : 1.00

Language : AppleScript (Droplet)

------------------------------------------------------------------------

*)

 

tell application "Finder" to display alert "Please drop file(s) or folder(s) on this application to delete all extended attributes" as informational

 

on open Dropped_Things

      repeat with Item_index from 1 to the count of Dropped_Things

             set Dropped_Item to item Item_index of Dropped_Things

             set Dropped_Item_Info to info for Dropped_Item

             if folder of the Dropped_Item_Info is true then

                   Process_Folder(Dropped_Item)

             else

                   Process_File(Dropped_Item)

             end if

      end repeat

end open

 

-- this sub-routine processes files

on Process_File(File_Item)

      set File_POSIX_path to POSIX path of File_Item

      set File_Item_Info to info for File_Item

      display dialog "Processing '" & (name of File_Item_Info) & "' ..." with icon note buttons {"Ok"} with title "Clear Extended Attributes" giving up after 1

      do shell script "xattr -c '" & File_POSIX_path & "'"

end Process_File

 

-- this sub-routine processes folders

on Process_Folder(Folder_Item)

      set Folder_Content to list folder Folder_Item without invisibles

      repeat with Item_index from 1 to the count of Folder_Content

             set Folder_Content_Item to alias ((Folder_Item as Unicode text) & (item Item_index of Folder_Content))

             set Folder_Content_Item_Info to info for Folder_Content_Item

             if folder of Folder_Content_Item_Info is true then

                   Process_Folder(Folder_Content_Item)

             else

                   Process_File(Folder_Content_Item)

             end if

      end repeat

end Process_Folder

February 7, 2012

SysPrep /generalize + BCD store + STOP: c000021a

Today I tried to do a sysprep of a Windows Server 2008 R2 x64 computer before capturing an image of it via imagex.

sysprep.exe /generalize /oobe /shutdown /unattend:unattend.xml

Everything went fine and the computer shutdown.

Then I rebooted the server and had a blue screen (BSOD) :

STOP: c000021a {Fatal System Error}
The session manager initialization system process terminated unexpectedly with a status of 0xc000003a (0x00000000 0x00000000).
The system has been shut down.


I found out that SYSPREP had made some changes to my Boot Configuration Data (BCD). Here’s an extract of my setupact.log file :




LaunchDll:Found 'C:\Windows\System32\spbcd.dll,Sysprep_Generalize_Bcd'; executing it
Sysprep_Generalize_Bcd: Located BCD store on system drive. Generalizing it...
GeneralizeBcdStore: Found the memory tester object.
GeneralizeBcdStore: Found the Windows OS Loader object {bb3f7e5d-3afe-11e1-908d-0010184c4562} for the currently running OS.
GeneralizeBcdStore: Found the resume object {bb3f7e5c-3afe-11e1-908d-0010184c4562} for the OS loader.
GeneralizeBcdStore: System drive backed by VHD = 0
GeneralizeBcdStore: Generalizing object {9dea862c-5cdd-4e70-acc1-f32b344d4795}
GeneralizeBcdStore: Successfully generalized application device. Status = [0x0]
GeneralizeBcdStore: Generalizing object {b2721d73-1db4-4c62-bf78-c548a880142d}
GeneralizeBcdStore: Successfully generalized application device. Status = [0x0]
GeneralizeBcdStore: Generalizing object {bb3f7e5d-3afe-11e1-908d-0010184c4562}
GeneralizeBcdStore: Successfully generalized application device. Status = [0x0]
GeneralizeBcdStore: Successfully generalized OS device. Status = [0x0]
GeneralizeBcdStore: Generalizing object {bb3f7e5c-3afe-11e1-908d-0010184c4562}
GeneralizeBcdStore: Successfully generalized application device. Status = [0x0]
GeneralizeBcdStore: Successfully generalized hiberfile device. Status = [0x0]
Sysprep_Generalize_Bcd: Successfully generalized the bcd store. Status=[0x0]
LaunchDll:Successfully executed 'C:\Windows\System32\spbcd.dll,Sysprep_Generalize_Bcd' without error



So, after running sysprep /generalize my BCD looked like this :




Windows Boot Loader
-------------------
identifier {default}
device locate=\windows\system32\winload.efi
path \windows\system32\winload.efi
description Windows Server 2008 R2
locale en-us
inherit {bootloadersettings}
osdevice locate=\windows
systemroot \windows
resumeobject {bb3f7e5c-3afe-11e1-908d-0010184c4562}
nx OptOut
detecthal Yes



Did you noticed the locate=… value for the device and osdevice entries ? Well it seems that those new values were causing my blue screen.



I restored the previous values (before Sysprep) with the following commands :



bcdedit /set {default} device partition=C:

bcdedit /set [default} osdevice partition=C:



After that, my computer was able to boot again.



I’m not sure, but i suspect that this little mixed up with the BCD Store maybe related to how I partitioned my disk :























WinPE


Size 900Mb, boot WinPE to capture or apply an image from imagex
ESP


Size 100Mb, EFI System Partition, Active Partition
Microsoft Reserved


Size 128Mb
Windows

Size 120Gb, C: drive
Data


Size 400Gb, E: drive


My disk is initialize as a GPT disk and this is an EFI Computer.



My recommendation


Always make a backup of the BCD store before running SYSPREP :



bcdedit /export backupbcd.bcd

November 11, 2011

Internet Explorer 9 Keyboard shortcuts

Here’s my favorites shortcuts in Internet Explorer (IE) 9 :

Ctrl + W Close the current window (tab)
Ctrl + F Find on this page
Ctrl + I Open Favorites
Ctrl + E Open a search query in the address bar (with last query string)
Ctrl + click Open links in a new tab in the background
Ctrl + Shift + click Open links in a new tab in the foreground
Ctrl + P Print

Complete IE 9 keyboard shortcut list :
windows.microsoft.com/en-US/windows7/Internet-Explorer-9-keyboard-shortcuts

May 13, 2011

down right now

downrightnow monitors the status of your favorite web services, combining user reports and official announcements to tell you when there's service trouble.

Great way to find out if service is up. Currently monitor the follwing services :

  • Facebook
  • Foursquare
  • Google Mail (Gmail)
  • Tumblr
  • Twitter
  • Windows Live Hotmail
  • Yahoo! Mail
  • Youtube
  • Blogger
  • LinkedIn
  • LiveJournal
  • Netflix
  • Ning
  • PayPal
  • Skype
  • TypePad

Link : downrightnow.com

March 1, 2011

[OS X 10.6] CreateMobileUserAccount error 4100

If you tried to logon on a MacBook Pro (OS X) with an Active Directory account you may have seen the following error in the system.log :

createmobileaccount[4146]: MCXCCacheMCXRecordAndGraph(): [localNode createRecordWithRecordType:dsRecTypeStandard:Users name:"paradisj"] == 4100 (Unable to set value or values for dsAttrTypeStandard:Password in the record.)



First of all, many thanks to Travis J. Garrison who pointed me in the right direction.



The problem was that I had two accounts in our Active Directory with the same value for the email attribute. The logon with the first account worked fine, but I wasn’t able to logon with the second one (on the same Mac).



The DirectoryServices.Error.log gave me the identity of the first account :




T[0x0000000102281000] - CDSLocalPluginNode::AttributeValueMatchesUserAlias(), alias exists in file /var/db/dslocal/nodes/Default/users/paradisjtest.plist





I had to change the email attribute (AD) of the first account and refresh the cache (MCX_cache) of the first account :



mcxrefresh -n paradisjtest -a



After that I was able to logon with both accounts.










Question :

Why does Apple used the email and displayName attribute as an alias of an account when those two attributes are not unique in Active Directory ?




(It’s not a bug, it’s a documented feature)

December 17, 2010

How to use MDT 2010 + WDS with VirtualBox

I wanted to setup a virtual lab with a Microsoft Deployment Toolkit 2010 server and a PXE client in Virtual Box. I finally got it to work !

The main problem is that the Intel PRO/1000 network card in VirtualBox does not seems to work with PXE (I dont know why) and the PCnet-FAST adapter is not supported (by default) in Windows PE (and no driver available in x64).

My solution is to simply define 2 network adapters in your virtual machine (the PXE client) :

mdt-1

PXE will use the first adapter (PCnet-FAST) and Windows PE will use the Intel PRO/1000 because it doesn’t know about the other one (no driver).

Here’s a step-by-step guide :

Ensure that the boot order of you VirtualBox machine allow it the boot from the Network :

mdt2b

You should also check that APIC is ON (Windows PE wont boot without it).

Boot you virtual machine, a screen like this should appear :

MDT-3

Open your "Windows Deployment Services” (WDS) console and approve the new pending device :

mdt-4

To avoid confusion in Microsoft Deployment Toolkit (MDT) I prefer to use the Computer UID instead of the MAC address to identify the computer (because we have two network adapters). To get the Computer UID at this stage, open “Active Directory Users and Computers” and display the properties of the new Computer object that WDS created when you approved the pending device.

mdt-5

On the Remote Install tab, copy the ‘Computer’s unique ID’ without the bracelets {}.

Open the ‘Deployment Workbench’ and create a new computer in the database (Advanced Configuration)

mdt-6

Enter a description and paste the ‘Computer’s unique ID’ in the UUID field. Complete the computer configuration the match your MDT setup (Assign a role or a TaskSequenceID).

That's it, reboot your virtual machine and your deployment should start.

Note : This article does not cover all your MDT/WDS setup, you have to install and configure those by yourself before using this solution. But if you used MDT before that should not be a problem.

November 24, 2010

How to check a suspicious file : VirusTotal

www.virustotal.com will allow you to upload a file and check it against 43 antivirus engines. Oh and did I mentioned it is totally FREE !

October 20, 2010

My new external monitor

450samg421s

I now have a new external monitor with my Thinkpad. Unfortunately Windows 7 is missing some tools to optimize this setup (dual monitor). Here’s what I use :

DisplayFusion

The free version of DisplayFusion is a must have for everyone with two monitors or more. It will allow you to have a different wallpaper (background) on each monitor. You can also add keyboard shortcuts to move your Windows from one monitor to another.

Good Wallpaper sites

If you want to span a single wallpaper through all your monitors you need big wallpapers. Here’s a list of good sites where you can find those special wallpapers :

Ref :

Best Places to Find Multi-Monitor Wallpaper
Make the Most of Your Dual Monitors
Customize Your Dual Monitors with Display Fusion

September 30, 2010

Cool : IBM Server Simulator

I just found out about some simulators available for IBM servers. Mostly they are BIOS, uEFI, ServerRAID or MegaRAID software simulator that allow you to see what the interface looks like.

They are very cool.

You will find them here.

Boot WinPE 3.0 USB key on EFI system

Yesterday I was trying to build a bootable USB Key with WinPE 3.0 (from Win7/2008 R2 AIK) to use on my new IBM x3550 M3. I was unable to boot the computer with the key. Strangely the key works fine on another computer.

I was building my boot image (boot.wim) for x86 (32bit) OS. This morning it hits me, why not try to build an x64 image (amd64) ? and it worked !

Here’s my understanding of the problem (and I could be wrong) :

My IBM x3550 M3 is an EFI (Extensible Firmware Interface) system, you know the replacement of the old BIOS. It looks to me that booting an EFI system with a x86 WinPE is not supported because the bootmgr.efi file is missing. When you build an x64 (amd64) WinPE the file (bootmgr.efi) is present and everything works fine on my server.

August 3, 2010

Reliable way to test network connection

Sometimes you want to check if the network is up in your application, there is a built-in function for that : NetworkInterface.GetIsNetworkAvailable()

the problem with GetIsNetworkAvailable is that it incorrectly always report TRUE if a loopback adapter is present. It also report TRUE if a “VirtualBox Host-Only Network” adapter is present.

So I have written the following function in Visual Basic (vb) to replace GetIsNetworkAvailable :

Function IsNetworkAvailable() As Boolean
IsNetworkAvailable = False
Dim AllAdapters As NetworkInterface() = NetworkInterface.GetAllNetworkInterfaces()
Dim Adapter As NetworkInterface
For Each Adapter In AllAdapters
If Adapter.OperationalStatus = OperationalStatus.Up And
Adapter.NetworkInterfaceType <> NetworkInterfaceType.Loopback And _
Adapter.NetworkInterfaceType <> NetworkInterfaceType.Tunnel And _
Not Adapter.Name.Contains("LoopBack") And _
Not Adapter.Name.Contains("VirtualBox Host-Only Network") Then
IsNetworkAvailable = True
End If
Next
End Function

June 3, 2010

Remote Desktop Connection Manager v2.2 (RDCMan)

This is a new tool available for free from Microsoft Download.
This is a ‘must have’.

RDCMan manages multiple remote desktop connections. It is useful for managing server labs where you need regular access to each machine such as automated checkin systems and data centers. It is similar to the built-in MMC Remote Desktops snap-in, but more flexible.

From a click in a tree I can launch a Remote Desktop on any of our servers.

rdcmon-main

There is even a thumbnail view of my connections.

rdcmon-thumbs

You can set all the Remote Desktop Client parameters for each server.

rdcmon-prop

The settings in each tab can be inherited from the parent group. This mains that you can change the settings of all, or a group, of your connections in one place.

rdcmon-logoff

You can log off (or disconnect) all your connections in one click.

All the settings/groups/servers you define are store in a RDG file. You can copy this file to another computer or use it to import a list of servers.

Many thanks to Julian Burger who made this nice little tool.

Download : www.microsoft.com/downloads

June 2, 2010

Keyboard problem with language other than english in Microsoft Expression Web 3.0

I’m writing HTML pages in french with Microsoft Expression Web 3.0 (xWeb) and I can’t type certain characters like è, ê, or î. For example to produce an è you have to first hit the dead-key ` and than hit the e letter. This works everywhere except in xWeb.

A search in the Expression Web Forum showed me that I’m not the only one :

I was really disappointed to read :

The good news is that we have fixed the bug.  The bad news is that the fix is not in the service pack and will not be available until the next release.

I can’t say that I think this is really professional. Come on guys you could have done better than that. I guess we just have to hope and wait for version 4.0

In the mean time I’ve used the ‘Code snippets’ to help paste the lost characters.

Here’s how to configure and use your codes snippets for french characters :

Close Microsoft Expression Web

Open the the file C:\Users\<username>\AppData\Roaming\Microsoft\Expression\Web 3\Legacy\Expression\Web 3\Snippets\SnippetsCustom.xml

Copy the following XML, paste it in the SnippetsCustom.xml file and save it.

<?xml version="1.0"?>
<!-- Fichier de configuration des extraits de code -->
<snippets><snippet keyword="é">
<description>é</description>
<text>é</text>
</snippet>
<snippet keyword="à">
<description>à</description>
<text>&amp;agrave;</text>
</snippet>
<snippet keyword="â">
<description>â</description>
<text>&amp;acirc;</text>
</snippet>
<snippet keyword="Â">
<description>Â</description>
<text>&amp;Acirc;</text>
</snippet>
<snippet keyword="À">
<description>À</description>
<text>&amp;Agrave;</text>
</snippet>
<snippet keyword="ç">
<description>ç</description>
<text>&amp;ccedil;</text>
</snippet>
<snippet keyword="Ç">
<description>Ç</description>
<text>&amp;Ccedil;</text>
</snippet>
<snippet keyword="é">
<description>é</description>
<text>&amp;Eacute;</text>
</snippet>
<snippet keyword="É">
<description>É</description>
<text>&amp;Eacute;</text>
</snippet>
<snippet keyword="ê">
<description>ê</description>
<text>&amp;ecirc;</text>
</snippet>
<snippet keyword="Ê">
<description>Ê</description>
<text>&amp;Ecirc;</text>
</snippet>
<snippet keyword="Ê">
<description>Ê</description>
<text>&amp;Ecirc;</text>
</snippet>
<snippet keyword="è">
<description>è</description>
<text>&amp;egrave;</text>
</snippet>
<snippet keyword="È">
<description>È</description>
<text>&amp;Egrave;</text>
</snippet>
<snippet keyword="ë">
<description>ë</description>
<text>&amp;euml;</text>
</snippet>
<snippet keyword="Ë">
<description>Ë</description>
<text>&amp;Euml;</text>
</snippet>
<snippet keyword="î">
<description>î</description>
<text>&amp;icirc;</text>
</snippet>
<snippet keyword="Î">
<description>Î</description>
<text>&amp;Icirc;</text>
</snippet>
<snippet keyword="ô">
<description>ô</description>
<text>&amp;ocirc;</text>
</snippet>
<snippet keyword="Ô">
<description>Ô</description>
<text>&amp;Ocirc;</text>
</snippet>
<snippet keyword="û">
<description>û</description>
<text>&amp;ucirc;</text>
</snippet>
<snippet keyword="Û">
<description>Û</description>
<text>&amp;Ucirc;</text>
</snippet>
<snippet keyword="ù">
<description>ù</description>
<text>&amp;ugrave;</text>
</snippet>
<snippet keyword="Ù">
<description>Ù</description>
<text>&amp;Ugrave;</text>
</snippet>
</snippets>


Open Expression Web



In the code view hit CTRL + ENTER and choose one of your new snippets.



xWebCodeSnippets

May 6, 2010

Scientific Atlanta (CISCO) Explorer 8300HD Tips

If you own a Scientific Atlanta HDTV recorder (Explorer 8300HD), here’s a few tips you might find interesting.

Tips From Enter
Enter diagnostic mode Front of unit Press and hold SELECT until the Mail LED lights,
then press INFO
Enter diagnostic mode Remote control Press and hold PAUSE until the Mail LED lights,
then press PAGE UP (+)
Reboot Front of unit Press and hold VOL+ and VOL-, then press INFO
Reboot Remote control Press and hold PAUSE until the Mail LED lights,
then press PAGE DOWN (-)
Change diagnostic window transparency Front of unit While in diagnostic mode, press SELECT
Change diagnostic window transparency Remote control While in diagnostic mode, press B
Format hard drive Remote control Press and hold PAUSE until the Mail LED lights, then press LIST three times, the unit will format the drive and reboot

I hope I do not have to tell you not to try the “format hard drive” tips unless you really want to do this and loose all your recordings.

Source : www.digitalhome.ca and Videotron technical support.

March 25, 2010

Follow me on Twitter

You can now follow me and my blog on Twitter :

Follow me on Twitter

Thanks to twitterfeed.com

PowerShell : How to get the script directory

I was looking for a function to get the script directory in a PowerShell script and I didn’t found exaclty found what I was looking for.

I found some scripts on the net that works on PowerShell 1.0 or  2.0 and with Powershell host or PrimalScript 2009 Host (yes I’m using PrimalScript everyday).

So I tooked some code form others and added some of my stuff and here what I came up with :

function get-scriptdirectory {

# .SYNOPSIS
# Return the current script directory path, compatible with PrimalScript 2009
# Equivalent to VBscript fso.GetParentFolderName(WScript.ScriptFullName)
# Requires PowerShell 2.0
#
# .DESCRIPTION
# Author : Jean-Pierre.Paradis@fsa.ulaval.ca
# Date : March 31, 2010
# Version : 1.01
#
# .LINK
# http://blog.sapien.com/index.php/2009/09/02/powershell-hosting-and-myinvocation/

if (Test-Path variable:\hostinvocation)
{$FullPath=$hostinvocation.MyCommand.Path}
Else {
$FullPath=(get-variable myinvocation -scope script).value.Mycommand.Definition }
if (Test-Path $FullPath) {
return (Split-Path $FullPath)
}
Else {
$FullPath=(Get-Location).path
Write-Warning ("Get-ScriptDirectory: Powershell Host <" + $Host.name + "> may not be compatible with this function, the current directory <" + $FullPath + "> will be used.")
return $FullPath
}
}


My function will work on PowerShell command line, PowerShell ISE or PrimalScript 2009. You will, however need PowerShell 2.0.



It is also compatible with a ‘Set-StrictMode -Version 2.0’ (you the thing most best practices guide told you to use).



Update (march 31, 2010) :



Looks like there is currently no way to get the script directory from PowerGUIScriptEditorHost, so I’ve modified my script to return the current directory (and a warning) instead of throwing an error.

How to Check A WordPress Site's PHP Version (& Upgrade Compatibility)

If you notice that your WordPress hosting provider is not running PHP 7, but has it available to its users, you may want to consider making ...