Posted on 2004-08-16
Intranet Order Entry System, wish to have full control over printing, have active X script which enables direct printing to Default Printer. However since it only prints to default printer I need code to edit clients registry to change the default printer as well, depending on which page they are printing; IE: user prints quotes - sends to regular laser printer, with quote, labels are also printed, the code will change the default printer registry key to reflect the label printer, print the labels, and then write original values back to the key.
User clicks print, writes new default printer values to the registry for printer, prints documents, redirects to a new page (to confirm printing completion) where it rewrites old default printer values.
the registry key to edit default printers on Windows XP Pro is found HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows\Device