|
I tried reading through the rest of the topics on this (and there was one just a few below this), but no matter what I do, my SetDefaultPrinter always returns 2, and will not set.
Setup: -Windows 2000 Server (CITRIX1) -Standard TCPIP Port created to 192.168.6.102 -Created a local printer using that port and named it "OHS MIS LJ2100"
I've tried the following syntax(s) 1) SetDefaultPrinter("\\CITRIX1\OHS MIS LJ2100") That should have worked based on the documentation, so then I just started trying ANYTHING. 2) SetDefaultPrinter("\\CITRIX1\192.168.6.102") I then tried sharing the printer (which I shouldn't need to do, as "OHSPRTRLR") 3) SetDefaultPrinter("\\CITRIX1\OHSPRTRLR")
None of the above work. So now I'm doing a convoluted registry hack to get it to write to the Device key the name of the printer. If InGroup("OHS Accounting") $MyDefaultPrinter = "OHS MIS LJ2100,winspool,Ne24:" EndIf
; Store the default printer in the registry WriteValue("HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows","Device",$MyDefaultPrinter, "REG_SZ")
So i'm writing the key directly by first manually setting the default printer, checking the registry entry, and then copying/pasting the key into the KixScript. It's referring to it by the same name as the defaultprinter though, which is the wierd thing.
Any thoughts?
I could really use some help on this one.
-Duncan
|