# 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 [2]
# 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]
# Tuesday, June 17, 2008

I spotted an article on Micheal Niehaus' blog the other day about moving to a single partition when doing OS deployments. You can read the article here.

This very issue arose in the project I am currently involved in and after trying reading and implementing Micheal's post I found a couple of nuances:

  • If there is an OEM partition (like WinRE) then you risk deleting you're OS partition. OEM partitions are often a hidden partition (Type 0x27) at the start of the disk that allow OEM's to offer a recovery environment for their customers.
  • If there is more than a one extra partition on the disk then ExtendOemPartition=1 won't really work.

I thought the problem deserved some more attention so I've written a script to be included in the "Refresh only" section of "Preinstall" in the Task Sequence that you use to deploy you're image. The script queries WMI to find how many partition are on the disk that contains C:. If there are any partitions after the C: partition they are removed using diskpart "delete partition".

Any comments or suggestions please let me know!

posted on Tuesday, June 17, 2008 2:26:12 PM (E. Australia Standard Time, UTC+10:00)  #    Comments [0]
# Friday, May 30, 2008

I laughed myself silly yesterday when I received an email from Microsoft Support with the following:

"I am sorry for the late reply. Unfortunately our Microsoft network is down since last week. All the domain controllers had to rebuild again. The email system is down, internet is down. So we are unable to communicate with our existing customers.

I will contact you as soon our infrastructure is ready.

Sorry for inconvenient."

Best excuse for poor service from Microsoft yet!

posted on Friday, May 30, 2008 12:47:40 PM (E. Australia Standard Time, UTC+10:00)  #    Comments [0]
# Wednesday, May 28, 2008

So once you've created a Distribution share with MDT at some point you're going to need a LAB Deployment point. Creating and updating Deployment Points is managed via [Microsoft.BDD.ConfigManager.Manager] in Microsoft.BDD.ConfigManager.dll.

To get stared you need need a DeployManager:
[System.Reflection.Assembly]::LoadFile("C:\Program Files\Microsoft Deployment Toolkit\Bin\Microsoft.BDD.ConfigManager.dll") | Out-Null
$manager = [Microsoft.BDD.ConfigManager.Manager]
$deployManager = $manager::DeployManager

Once you've got a DeployManager you can create a new deployment point using CreateNew(). This returns a generic deployment point which you can then specify what type and settings you need for the deployment point. Specifying the type and settings (ie. all the options on the General, Rules, WinPE tabs) is done by setting some properties on the deployment point object like so:

$deploymentPoint = $deployManager.CreateNew()
$deploymentPoint["Name"] = "LAB"
$deploymentPoint["Type"] = "LAB"
$deploymentPoint["NetworkShare"] = $NetworkShare
$deploymentPoint
["LocalSharePath"] = $LocalSharePath
$deploymentPoint
["GenerateLiteTouchISO"] = $true
$deploymentPoint["GenerateLiteTouchFlatISO"] = $false
$deploymentPoint["GenerateGenericISO"] = $false
$deploymentPoint["GenerateGenericFlatISO"] = $false

This is not a complete list of properties but it gives you the right idea. Once you have a deployment point you also need to specify which Applications, Task Sequences and Driver Groups you wish to include. For a LAB deployment point this is all of them:

$applicationRow = $deploymentPoint.CreateNewChild("Application")
$applicationRow["Application_Column"] = "*"
$deploymentPoint.AppendChild("Application", $applicationRow)

$taskSequenceRow = $deploymentPoint.CreateNewChild("TaskSequence")
$taskSequenceRow["TaskSequence_Column"] = "*"
$deploymentPoint.AppendChild("TaskSequence", $taskSequenceRow)

$driverGroupRow = $deploymentPoint.CreateNewChild("DriverGroup")
$driverGroupRow["DriverGroup_Column"] = "*"
$deploymentPoint.AppendChild("DriverGroup", $driverGroupRow)

After we've made all the changes we want you need to commit all the changes:
$deploymentPoint.Update()

The other really nice part about using MDT from powershell is the Bootstrap and CustomSettings writers that are built in. For example, if I want to add some lines to Bootstrap and CustomSettings.ini for the deployment point I've just created:

#Update the Bootstrap.ini file
$deploymentPoint.Bootstrap.Write("Default", "DeployRoot", $NetworkShare)
$deploymentPoint
.Bootstrap.Write("Default", "KeyboardLocale", "en-AU")
$deploymentPoint
.Bootstrap.Write("Default", "SkipBDDWelcome", "YES")

#Write Some default values to the CustomSettings.ini file
$csIni = $deploymentPoint.CustomSettings
$csIni.Write("Default", "_SMSTSORGNAME", "Windows XP Build Process")
$csIni.Write("Default", "UserDomain", "LAB")
$csIni.Write("Default", "KeyboardLocale", "en-AU")
$csIni.Write("Default", "SkipBDDWelcome", "YES")

For an end-to-end example have a look at Create-LABDeploymentPoint.zip (1.4 KB). This script sets up a lab deployment point and sets a bunch of settings that I use for XP deployments. If you want to test it out without breaking your existing LAB deployment point change line 23 to LAB_TEST.

posted on Wednesday, May 28, 2008 10:48:43 AM (E. Australia Standard Time, UTC+10:00)  #    Comments [0]