Jump to content

Default Printer - Windows 2000/XP


Recommended Posts

Under Windows 2000 and Outlook 2003 I could select a printer (not default) from the drop down, print to it and then the next instance the default would reappear.

Under Windows XP I select a printer other than the default print but the selected printer stays until I select the default again. Exiting the application called up from the script and then restarting will take care of this but I would be doing this constantly.

Bottom line: How can I force the default printer to be displayed each and every time and I override when I desire.

Changing defaults/adding, deleting printers does not work. This appears to be a operating systems issue and do not want software accessing the registry.

I have tried to use the ShowDropDown and do a select but this will not work.

This script monitores delegated Outlook 2007 mailboxes and input is greatly appreciated.

Link to comment
Share on other sites

Finding default printer in register key

If @OSTYPE = "WIN32_WINDOWS" Then
    $key = "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Print\Printers"
    $default = RegRead("HKEY_CURRENT_CONFIG\System\CurrentControlSet\Control\Print\Printers", "Default")
Else;WIN_NT type
    $key = "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Print\Printers"
    $default = RegRead("HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows", "Device")
    $default = StringLeft($default, StringInStr($default, ",") - 1);remove info after comma...
EndIf

Assigning other printer

RunWait('RUNDLL32 PRINTUI.DLL,PrintUIEntry /y /n "Adobe PDF"')

reassign default printer

RunWait("RUNDLL32 PRINTUI.DLL,PrintUIEntry /y /n " & '"' & $default & '"')

Hope helping you

Link to comment
Share on other sites

Under Windows 2000 and Outlook 2003 I could select a printer (not default) from the drop down, print to it and then the next instance the default would reappear.

Under Windows XP I select a printer other than the default print but the selected printer stays until I select the default again. Exiting the application called up from the script and then restarting will take care of this but I would be doing this constantly.

Bottom line: How can I force the default printer to be displayed each and every time and I override when I desire.

Changing defaults/adding, deleting printers does not work. This appears to be a operating systems issue and do not want software accessing the registry.

I have tried to use the ShowDropDown and do a select but this will not work.

This script monitores delegated Outlook 2007 mailboxes and input is greatly appreciated.

Thanks for the reply and this is what I am doing to set the default. The problem is not setting the default but having the new default appear upon issuing the print command. In other words since I have not exited Outlook the old default will display although viewing via Printers and Faxes the new default has been set.

In XP the display selection will be the same as when you you started Outlook until you exit and reenter. 2000 would immediately change. The default is being changed but not the display upon the Print dialog box.

Sorta difficult to explain. The dialog box reflects the same printer although the default has changed until exiting Outlook. Once you restart the new default display will be the default printer.

Anyway around this? Everytime I change I would have to exit/start Outlook and I am utilizing multiple delegate boxes.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...