WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

Printing Information

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

Changing Windows 95 Applications Default Printer

This example shows how to modify an application's default printer via WinBatch. To see an example of how to change the Windows95 Default printer without having to reboot your system, see "Changing Windows 95 and NT Default Printer" in this directory.

In this example we use FileMaker Pro from Claris, v3.0

FileMaker stores its default printer in its own section of the registry.

In this scenario, a user has two local printers, a HP of somekind, a Panasonic, and a Fax via a modem card. We wish to switch between the three of them.

First we need to set up some registry entries manually.

NB: Watch out for your browser breaking the lines in the wrong places.
Look at the code real carefully before you try to use it.

; Example of reading and changing the default printer in Windows 95
;;;set the printer to HP
newprt=RegqueryValue(@regcurrent, "Software\Claris Corp.\Filemaker Pro\3.0 Preferences[DBDHP]")
RegSetValue(@regcurrent, "Software\Claris Corp.\Filemaker Pro\3.0 Preferences[Printer]", newprt)


;;;set printer to Panasonic
newprt=RegqueryValue(@regcurrent, "Software\Claris Corp.\Filemaker Pro\3.0 
Preferences[DBDPANASONIC]")
RegSetValue(@regcurrent, "Software\Claris Corp.\Filemaker Pro\3.0 Preferences[Printer]", newprt)



;;;;  set Printer to Fax
newprt=RegqueryValue(@regcurrent, "Software\Claris Corp.\Filemaker Pro\3.0 Preferences[DBDFAX]")
RegSetValue(@regcurrent, "Software\Claris Corp.\Filemaker Pro\3.0 Preferences[Printer]", newprt)

And here is some PopMenu code.

Set the printer to hp
	newprt=RegqueryValue(@regcurrent, "Software\Claris Corp.\Filemaker Pro\3.0 Preferences[DBDHP]")
	RegSetValue(@regcurrent, "Software\Claris Corp.\Filemaker Pro\3.0 Preferences[Printer]", newprt)


Set printer to Panasonic
	newprt=RegqueryValue(@regcurrent, "Software\Claris Corp.\Filemaker Pro\3.0 Preferences[DBDPANASONIC]")
	RegSetValue(@regcurrent, "Software\Claris Corp.\Filemaker Pro\3.0 Preferences[Printer]", newprt)



Set Printer to Fax
	newprt=RegqueryValue(@regcurrent, "Software\Claris Corp.\Filemaker Pro\3.0 Preferences[DBDFAX]")
	RegSetValue(@regcurrent, "Software\Claris Corp.\Filemaker Pro\3.0 Preferences[Printer]", newprt)




Article ID:   W13686
Filename:   Changing Windows 95 Applications Default Printer.txt
File Created: 1999:04:15:16:55:42
Last Updated: 1999:04:15:16:55:42