Blowfelt82
asked on
Need to configure advanced printer preferences using script.
I have a printer which I need to configure every time a user logs into an application...
Specifically I am looking for code which can modify the settings found in...
START > PRINTERS AND FAXES > {RIGHT CLICK A PRINTER} > {PuSh 'PRINTING PREFERENCES' Button} > SELECT 'DOCUMENTS' TAB > EXPAND 'PAPER/OUTPUT' OPTION ...
From here I need to programatically modify the settings in here, specifically I am interested in the 'Top Adjustment' setting.
Specifically I am looking for code which can modify the settings found in...
START > PRINTERS AND FAXES > {RIGHT CLICK A PRINTER} > {PuSh 'PRINTING PREFERENCES' Button} > SELECT 'DOCUMENTS' TAB > EXPAND 'PAPER/OUTPUT' OPTION ...
From here I need to programatically modify the settings in here, specifically I am interested in the 'Top Adjustment' setting.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
JManicki, well, you've certianly done your homework there, very well done!
I apologise for leading you down the wrong track.
So it can be done with a bit of manual work, certianly not what you'd call dynamic (initially), but it definately gets the job done once you've got your *.reg files ready for importing.
Nice work.
Regards,
Rob.
I apologise for leading you down the wrong track.
So it can be done with a bit of manual work, certianly not what you'd call dynamic (initially), but it definately gets the job done once you've got your *.reg files ready for importing.
Nice work.
Regards,
Rob.
It is almost true that you can't directly set those options using VBSCript. The only reason why is that the Registry modification methods available to VBScript cannot easily handle modifying a very large REG_BINARY value which is how Printer Preferences are stored, but you CAN do it with a VBScript login script using some help from REGEDIT.EXE and an exported .REG file. It's fairly easy to do and I'm automagically configuring dozens of printers and print preferences each day with this method.
I'm printer preference options are stored in the Registry under HKEY_CURRENT_USER\Printers
In those keys, you should see an entry for every printer name that's installed on your computer. As I said, I think DevMode2 is for Printing Preferences so until you actually change them from the default, there may not be an entry there for a specific printer.
What I do is create a printer. Modify all settings that I need. Next I use REGEDIT.EXE to browse to and export the HKEY_CURRENT_USER\Printers
Once you have the configurations for all your printers, save/copy them to a shared folder accessible to your users. In the login script, just add the command to use REGEDIT.EXE to import your .REG file.
If you're using VBSCript, use the following command with the WScript Run Method:
Set WshShell = Wscript.CreateObject("WScr
WshShell.Run "REGEDIT.EXE /S \\SERVERNAME\SHARENAME\REGFILENAME.REG",0,True
Substitue SERVERNAME with the name of your server, SHARENAME with the name of the shared folder that the .REG files are in and REGFILENAME with the name of the .REG file itself.