Hey Andrew...
I agree with Lonk that the script you supplied doesnt do any registry editing. It simply reads...And I dont think a PC would be usable if the users couldnt atleast Read from the registry. So either there is some other part of the script you did not post..Or its a bug in MS.
Anyways...There is a vbs script on WinXP Pro machines in the system32 driectory called prnmngr.vbs which will get the default printer for you. I didnt see if you have anything in the AD that isnt XP or not...But for the XP machines you can try...
Code:
If @ProductType = "Windows XP Professional"
$tempdeffile = "%temp%\defprinter.xxx"
$tempdefhandle = FreeFileHandle()
If Exist ($tempdeffile)
Del $tempdeffile
Endif
Shell '%comspec% /c cscript %windir%\system32\prnmngr.vbs -g > '+$tempdeffile
If Open ($tempdefhandle,$tempdeffile) = 0
While @Error = 0 and $defaultprinter = ""
$line = ReadLine ($tempdefhandle)
If InStr ($line, "The default printer is")
$defaultprinter = Split ($line,"The default printer is ")[1]
Endif
Loop
$null = Close ($tempdefhandle)
Endif
? "Default Printer --> "+$defaultprinter
?
? "Press Any Key To Exit"
get $
Endif