So I modified the script to this:

 Code:
;FROM http://www.kixtart.org/forums/ubbthreads.php?ubb=showflat&Number=118766
function GetDefaultPrinter()
    $GetDefaultPrinter = join(split(readvalue("HKEY_USERS\"+@sid+"\Software\Microsoft\Windows NT\CurrentVersion\Windows","Device"),',',1),'')
endfunction

$a = GetDefaultPrinter

$r1 = ADDPRINTERCONNECTION ("\\hi2\hifacultycopier")

$b = GetDefaultPrinter

$r2 = ADDPRINTERCONNECTION ("\\hi2\hiofficecopier")

$c = GetDefaultPrinter

OPEN (1, '%USERPROFILE%' + '\test.txt', 5)
WRITELINE (1, $a + @CRLF)
WRITELINE (1, $r1 + @CRLF)
WRITELINE (1, $b + @CRLF)
WRITELINE (1, $r2 + @CRLF)
WRITELINE (1, $c + @CRLF)
CLOSE (1)


And this is the output:

 Code:
RM 206 Mono
0\\hi2\HI Faculty Copier
0\\hi2\HI Faculty Copier


Yet if I run the same exact script on my machine:

 Code:
Technology Color
0Technology Color
0Technology Color



EDIT: Switching the order switches which one gets set to the default. So whichever the first one is is getting set as the default. So it seems to me that for whatever reason maybe it doesn't think a default printer is set and is therefor setting it?

EDIT2: same result if I run the script from a command line (instead of via logon script)


Edited by syntax53 (2012-10-11 04:27 PM)