All, I don't know if anyone could help me ... I am trying to set the default printer for windows through PHP.
Let me explain - we have a number of reports, that exist in Cognos, we access these reports through PHP and COM. However, various copies of these reports need to go to different printers around the building. Currently - we have two users and two scheduled jobs (one for each printer). Since the number of reports and printers is about to explode (up to 10-15) I don't want to have to set up 15 seperate users for each report/printer. Cognos (via the COM interface) cannot select the printer it goes to. This means that it will only ever print to the default printer. SO - what I'd like to do is change the default printer. But the only way - currently - I've found is to use the W32API functions - e.g. $result=w32api_register_function("winspool.drv","SetDefaultPrinterA","long") ; $output=SetDefaultPrinterA("testqueue"); This works ... but it's a bit of a long way round ... anyone have a better way? Cheers, Michael. This message has been checked for all known viruses by the MessageLabs Virus Control Centre. ********************************************************************* Notice: This email is confidential and may contain copyright material of Ocado Limited (the "Company"). Opinions and views expressed in this message may not necessarily reflect the opinions and views of the Company. If you are not the intended recipient, please notify us immediately and delete all copies of this message. Please note that it is your responsibility to scan this message for viruses. Company reg. no. 3875000. Swallowdale Lane, Hemel Hempstead HP2 7PY ********************************************************************* -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php