Hi Allen,

Thanks for your quick response. The setdefaultprinter function does work. I am not stating that it doesn't. But its not doing something that it should be. I am using the printer name. I am also using the same name for the share name and the printer name in order to avoid any problems with this - I discovered that years ago when I started with Kixtart.
To give you an example of my script where its not working with this specific program

 Code:
If AddPrinterConnection ("\\server\IT colour") = 0
   ? "Added IT Suite printer "
   Endif

If SetDefaultPrinter ("\\server\IT colour") = 0
      ? "Set default printer to IT Suite Printer"
   Endif


This installs the printer and sets the printer as default. All the programs see the printer as the default printer - thus it works - BUT the abovementioned program does not work unless I set the default printer MANUALLY or I use the VBS script to set the default printer. Hence the problem is something about the way the SetDefaultPrinter function works as in it is missing a step somewhere.

Thank you.


Edited by Allen (2012-03-27 02:58 AM)
Edit Reason: added code tags