We are switching to a complete new network for our entire company.
Jumping from the old NT4 servers to Win2K3 with AD we will be using RIS to install all our clients. To pre-stage all the clients in AD it's is required to fill in a GUID (or a MAc based GUID but I prefer the real GUID) when creating a computer account that is managed.

To get all the GUID's from all workstations we creatd the script bellow, the GetGUID() GetGUID() udf is required.

On cleints running Win2K pro sp2 explorer.exe seems to hang when we run the script. Changed the script to check if a system is sp2 or not and return a MAC address based GUID if sp2 or older. This also hangsup explorer.exe. On Win2K sp4 all is oke. Explorer.exe version on sp2 clients is 5.0.3315.2846.

Anybody seen this before?

Code:

$resultsfile = Exist ("\\rotsvr02\logs\guids\" + @WKSTA + ".log")
$wksta = @WKSTA
$date = @DATE
$time = @TIME
$userid = @USERID
$lserver = @LSERVER
$mac = @ADDRESS

;Get serialnumber
Dim $wmiRoot, $wmiColl, $wmiObj
$wmiRoot = GetObject("WinMgmts:root/cimv2")
$wmiColl = $wmiRoot.ExecQuery("Select * FROM Win32_BIOS")

For Each $wmiObj in $wmiColl
$SerialNumber = $wmiObj.SerialNumber
Next

Select
Case $resultsfile = "0"
;Get guid
Call $lserver + "\netlogon\functions\GetGUID.udf"
$guid = GetGUID()
$rc = Open(1, "\\rotsvr02\logs\guids\" + @WKSTA + ".log",5)
$rc = WriteLine (1, "Workstation name: " + $wksta + @CRLF)
$rc = WriteLine (1, "Serialnumber: " + $serialnumber + @CRLF)
$rc = WriteLine (1, "GUID: {" + $guid + "}" + @CRLF)
$rc = WriteLine (1, "Date and : " + $date + " -- " + $time + @CRLF)
$rc = WriteLine (1, "UserID: " + $userid + @CRLF)
$rc = Close (1)
Case $resultsfile = "1"
;File allready exists.
EndSelect

_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.