# Friday, March 06, 2009

If you've ever tried to install the Lenovo Hotkey utility as part of an SCCM Task Sequence you'll have noticed that no matter how big a tantrum you through it won't work. Lenovo's documentation states that you can install the Hotkey utility in an unattended fasion using "Setup.exe /S". For whatever reason this doesn't work in a Task Sequence using a standard Package and Program. To get around this do the follow:

  1. Extract the Hotkey utility.
  2. Create a batch file InstallHotkey.cmd with a single line: %~dp0SETUP.EXE /S
  3. Create a standard SCCM package with the source pointing to your extracted hotkey files.
  4. Make sure that InstallHotkey.cmd is in the same dir as Setup.exe
  5. In you Task Sequence add a new "Run Command Line" task.
  6. Set the Package to the Hotkey Package you created in step 4.
  7. In the command line put InstallHotkey.cmd

posted on Friday, March 06, 2009 4:20:48 PM (E. Australia Standard Time, UTC+10:00)  #    Comments [0]
# Tuesday, December 16, 2008

When working with the Microsoft Deployment Toolkit (MDT) I spend a lot of time in VMWare Workstation as it makes the job of developing and testing a workstation image much simpler. However there is one big gottcha that you should be aware of. Make sure you edit your .VMX file and modify the following:

scsi0.present = "TRUE" should be changed to scsi0.present = "FALSE"

If you don't do this then after deploying a Syspreped image to VMWare Workstation you'll end up with a Stop 0x7B error and much less hair than when you started.

Thanks Chris for reminding me of something I supposedly knew. :)

posted on Tuesday, December 16, 2008 3:20:49 PM (E. Australia Standard Time, UTC+10:00)  #    Comments [0]
# Thursday, October 16, 2008

The answer is yes! Incidentally, is there really any limit to what you can do with ConfigMgr?? Well I suppose that is like asking, "How much wood could a woodchuck chuck if a woodchuck could chuck wood?", but anyway let's move on.

My first clue for solving this came from deployvista.com, "Using the $OEM$ folder with SCCM 2007 OS Deployments". To summarize you need to place your $OEM$ files into C:\_SMSTaskSequence\OSD\$OEM$ in order for Windows Setup to use the files. Here is what I did:

  1. Added my $OEM$ Files to my MDT Settings Package. (The one with unattend.txt, sysprep.inf and customsettings.ini)
  2. Add Z-CONFIG-CopyOEM.wsf to your MDT Source Files package. I've provided it below. (Remember to update DP)
  3. In your Task Sequence right before "Setup Windows and ConfigMgr" add a new "Run Command Line" task.
  4. Set the Name to "Copy OEM Files".
  5. Set the Command Line to "cscript.exe "%deployroot%\scripts\Z-CONFIG-CopyOEM.wsf".
  6. Click the "Package" checkbox and select your MDT Settings Package.
  7. All Done!

The guts of the script is pretty simple stuff and it works because when you set a Package in a Run Command Line Task the current directory is the path to whatever package you've select. In this case the current directory is the MDT Settings package containing our $OEM$ files.

'//----------------------------------------------------------------------------
'//  See if we can find the $OEM$ Directory
'//----------------------------------------------------------------------------
sDest = OEnvironment.GetOSDV4("_SMSTSMDATAPATH") & "\OSD\$OEM$"
oLogging.CreateEntry "$OEM$ Files will be copied to " & sDest, LogTypeInfo 

'//----------------------------------------------------------------------------
'//  Make sure the Destination exists
'//----------------------------------------------------------------------------
MKDir sDest 

'//----------------------------------------------------------------------------
'//  Get the Source Location and Copy the files
'//----------------------------------------------------------------------------
sSource = oShell.CurrentDirectory & "\$OEM$"
oLogging.CreateEntry "$OEM$ Files will be copied from " & sSource, LogTypeInfo 

'Copy the folder
oFSO.CopyFolder sSource, sDest 

posted on Thursday, October 16, 2008 3:30:23 PM (E. Australia Standard Time, UTC+10:00)  #    Comments [0]
# Tuesday, October 07, 2008

If you've ever had anything to do with maintaining or migrating a fileserver you will probably have experienced issues with MAX_PATH. In Windows the maximum length for a path is MAX_PATH, which is defined as 260 characters. One of the most common errors for MAX_PATH is "Can't access this folder. Path is too long." This usually happens when users (those pesky users!) map a drive half way down a directory structure and started creating new files and folders.

You can find more information about MAX_PATH at the following locations:

I've seen a number of different ways of finding paths that are too long but my favourite at the moment is using the Microsoft Log Parser. Details:

Once you've downloaded LogParser you can run the following command to output a CSV file of paths greater than 250 characters:

LogParser "SELECT Path, Size FROM C:\*.* WHERE STRLEN(Path) > 250" -i:FS -preserveLastAccTime:ON -o:CSV > Results.csv

Just change the "C:\*.*" to the location you want to check for long paths and Bob's your uncle.

posted on Tuesday, October 07, 2008 10:50:24 AM (E. Australia Standard Time, UTC+10:00)  #    Comments [0]
# Monday, October 06, 2008

I booted an SCCM Task Sequence boot image this morning in VMWare Workstation and received the following error: "This application has failed to start because wdi.dll was not found. Re-installing the application may fix this problem".

Error

Oh of course that makes perfect sense......arhhh actually no. After a bit of searching it appears as thought this is an issue with the VMWare Workstation Drivers. Earlier I'd added the entire drivers directory from the VMWare Tools directory to SCCM. Bad move! All you need is the the vmxnet and scsi directories. Remove all the others, re-generate the Boot Image and you're away!

posted on Monday, October 06, 2008 3:09:29 PM (E. Australia Standard Time, UTC+10:00)  #    Comments [0]
# Thursday, October 02, 2008

Today I was attempting to create a sysprep.xml file for Windows 2008. After opening my WIM file in Windows SIM I got the prompt to generate a Catalog file, clicked Yes and then......Error!! What?? Lets try that again....Error!! Whatever, lets try again, Error!! Ok this time I read the error. "System.Reflection.TargetParameterCountException: Parameter count mismatch." Ummm, what??

After wasting almost 2 hours chasing this error I found this post on the TechNet Forums: http://forums.microsoft.com/TechNet/ShowPost.aspx?PostID=3066853&SiteID=17.

The key information is:

Because of the changes in the servicing stack in Windows Vista with Service Pack 1 (SP1) and Windows Server 2008, Windows System Image Manager (Windows SIM) cannot create catalog files for some Windows images of different architecture types. The following list describes the Image Manager architecture types and catalogs that can be created for each one.

x86 Windows SIM:
Can create catalogs for x86, x64, and Itanium-based Windows images.

x64 Windows SIM:
Can create catalogs only for x64 Windows images.

Itanium-based Windows SIM:
Can create catalogs only for Itanium-based Windows images. 

Please confirm if what version of Windows SIM you are using. I recommend installing x86 Windows SIM.

Hope it helps.

Tim Quan - MSFT

Update: Michael Niehaus pointed out that this information is available in the updated version of the WAIK 1.1 release notes available at http://www.microsoft.com/downloads/details.aspx?FamilyID=051091e8-51ea-4d2c-96b3-dc9863edebd9&displaylang=en.

posted on Thursday, October 02, 2008 11:12:33 AM (E. Australia Standard Time, UTC+10:00)  #    Comments [3]
# Wednesday, October 01, 2008

I just notice there is a new version of my favourite comparison tool Beyond Compare. In my mind Beyond Compare is one of the best file and folder comparison tools available. Go to Scooter Software to get Beyond Compare 3!

posted on Wednesday, October 01, 2008 10:02:29 AM (E. Australia Standard Time, UTC+10:00)  #    Comments [0]
# Tuesday, September 30, 2008

Cisco Discovery Protocol or CDP is a proprietary protocol developed by Cisco that allows Cisco devices to share information with other directly connected Cisco equipment [More Info]. The CDP protocol has some really useful information in it such as the IP of the device, the port you're attached to and even VLAN information. This is really helpful when you want to find out which switch port you are connected to without leaving your desk.

Firstly go to WinPcap site and download WinPcap and WinDump. After installing WinPcap I placed windump.exe in C:\Tools with the rest of my toolkit.

The procedure to find your switch port is:
Run windump.exe -D

C:\Tools>windump -D
1.\Device\NPF_{DAA1C207-9CDF-4FB9-92B6-162E447B55EF} (MS Tunnel Interface Driver)
2.\Device\NPF_{D47A6165-BF3D-47FE-B3AD-59A97CDE2A60} (Microsoft)
3.\Device\NPF_{AD370DA2-E8A2-47EA-9AA5-10B152DED150} (Intel(R) 82566MM Gigabit Network Connection)

Remembering the interface number run windump -nn -v -i 3 -s 1500 -c 1 ether[20:2] == 0x2000"
** -i 3 is your interface number, so to listen on the first interface use -i 1.

15:50:45.039275 CDPv2, ttl: 180s, checksum: 692 (unverified), length 384
        Device-ID (0x01), length: 27 bytes: '16-C4506.domain.com.'
        Version String (0x05), length: 251 bytes:
          Cisco IOS Software, Catalyst 4000 L3 Switch Software (cat4000-I9S-M), Version 12.2(25)EWA8, RELEASE SOFTWARE (fc1)
          Technical Support:
http://www.cisco.com/techsupport
          Copyright (c) 1986-2007 by Cisco Systems, Inc.
          Compiled Wed 24-Jan-07 14:38 by pwade
        Platform (0x06), length: 14 bytes: 'cisco WS-C4506'
        Address (0x02), length: 13 bytes: IPv4 (1) 172.16.3.100
        Port-ID (0x03), length: 19 bytes: 'GigabitEthernet5/32'
        Capability (0x04), length: 4 bytes: (0x00000029): Router, L2 Switch, IGMP snooping
        VTP Management Domain (0x09), length: 3 bytes: 'bdo'
        Native VLAN ID (0x0a), length: 2 bytes: 1
        Duplex (0x0b), length: 1 byte: full
        AVVID trust bitmap (0x12), length: 1 byte: 0x00
        AVVID untrusted ports CoS (0x13), length: 1 byte: 0x00
1 packets captured
602 packets received by filter
0 packets dropped by kernel

And there you have it! You can see Port-ID and Native VLAN ID are your Port and VLAN information.

posted on Tuesday, September 30, 2008 3:56:05 PM (E. Australia Standard Time, UTC+10:00)  #    Comments [0]
# Tuesday, September 09, 2008

I use VMWare Workstation on almost a daily basis. It is without a doubt my favourite piece of software. There is one thing, however, that I find very annoying and that is trying to hit ESC on the startup screen. It is at that point when you need to either hit ESC to get a boot menu or DEL to get into the bios. The VMWare bios splash screen displays for all of about half a second and then gone! So you reboot and try again and again and again...grrrrrr!

Well happily there is a simply solution. Open your .vmx file for the virtual machine you are using and add the following line to the file:

bios.bootDelay = "5000"
posted on Tuesday, September 09, 2008 2:39:19 PM (E. Australia Standard Time, UTC+10:00)  #    Comments [0]
# Sunday, June 22, 2008

I'm not sure how I missed this one or how long it has been available but you can download the source code for MDT 2008 from Microsoft Download. You can learn a lot about how MDT 2008 works and also a lot about managed MMC snap-ins from the MDT 2008 source code. Click here to download.

posted on Sunday, June 22, 2008 10:18:04 PM (E. Australia Standard Time, UTC+10:00)  #    Comments [0]