hi all... im trying to use SetDefaultPrinter funtion... but i cant seam to get it to work. i know i must use the "printer name" and not the share name like in addprinter. The script runs and returns no error, but the default printer is not set.

her is my code:

 Code:
If AddPrinterConnection ("\\unysdc01\unysp01") = 0
   ? "Added printer connection Sort/Hvid. EDB Rum. Skovallen. Canon"
   If SetDefaultPrinter ("\\unysdc01\Sort/Hvid. EDB Rum. Skovallen. Canon") = 0
      ? "Set default printer to Sort/Hvid. EDB Rum. Skovallen. Canon"
   Endif

Endif


any ideers? pls?


Edited by Mart (2011-10-16 11:55 AM)
Edit Reason: Please use code tags when posting code.