Have kind of a strange problem or maybe not so strange is my hope to people on here 
Here's part of the login script code I use to set my default printer for a computer lab. Both the name of the printer and the share/queue are the same name. Also the people using this lab only have User level rights.
OS: Windows XP SP2
Code:
if $Location = "Milne"
? "Mapping Milne Main Printers"
If AddPrinterConnection ("\\onid-print\scf_main") = 0
? "Added printer connection...."
Endif
If SetDefaultPrinter ("\\onid-print\scf_main") = 0
? "Set default printer to SCF Milne Main Printer"
Endif
Now this script works (as in sets the correct Default Printer) only about 20% of time on the first run. If I run the script several times in a row, then it works. However I would rather not run the script 10 times in a row just to get this setting to stick. I realize it is supposed to return an error code if it cannot find the printer?, however it does not return on, suggesting it is finding the printer. Does anybody have any suggestions on how to make the default printer stick on the first run and/or some way of testing to see if the default printer is set other then using this function.
Daniel.