IF you can manually add the printer as I've shown without any issue, then please try this code again and post the results.

Run this as the ONLY script, do not add it to any other portion of a script.
Also, please let us know what version of KiXtart you're using and the OS version
of the Server this printer is being shared on.


Break On
Dim $SO
$SO=SetOption('Explicit','On')
$SO=SetOption('NoVarsInStrings','On')
$SO=SetOption('NoMacrosInStrings','On')

If InGroup(@Domain+'\DA Omgevingen')
If DelPrinterConnection('\\terminal-deakke\Bro-HL1440') = 0
'Deleted printer connection to Bro-HL1440....' + @ERROR + ' - ' + @SERROR ?
Else
'There was an error deleting the printer Bro-HL1440 ' + @ERROR + ' - ' + @SERROR ?
Quit @ERROR
Endif
If AddPrinterConnection('\\terminal-deakke\Bro-HL1440') = 0
'The printer Bro-HL1440 was added ' + @ERROR + ' - ' + @SERROR ?
Else
'There was an error adding the printer Bro-HL1440 ' + @ERROR + ' - ' + @SERROR ?
Quit @ERROR
EndIf
If SetDefaultPrinter('\\terminal-deakke\Bro-HL1440') = 0
'The printer Bro-HL1440 was set as default ' + @ERROR + ' - ' + @SERROR ?
Else
'There was an error setting Bro-HL1440 to default ' + @ERROR + ' - ' + @SERROR ?
Quit @ERROR
EndIf
EndIf


Edited by NTDOC (2006-03-14 11:59 PM)