Settings printer in batch

Hi,

we're starting to use printers via a printserver. We don't use windows servers (only for the printserver) and therefore, no group policies and active directory. We push the installation via a script:

start \\printserver\rbins-print
rundll32 printui.dll,PrintUIEntry /y /q /n "\\printserver\rbins-print"

the second line sets it as default printer.

Now it comes, is there a way to give some commands for setting it to use black and white printing and rectoverso as defaults?

Jvuz
LVL 21
jvuzAsked:
Who is Participating?
 
WotanAUCommented:
Not sure to be honest. What I would suggest is to install Process Monitor and then install the JSON file on a computer. Take note of the registry keys that change (I believe it will be HKCU\Software\Ricoh and export it into a .REG file. Then in your batch file, add the command REGEDIT /S newregfile.reg. That will add the changed registry keys into the registry at logon. The /S is for silent.
0
 
WotanAUCommented:
Every printer is different. The easiest way would be to set the 'Printing Defaults' for the printer on the Windows Server to black and white. That way, when the printer is added, it will default the client to black and white also. It can be found in the Printer Properties | Advanced Tab | 'Printing Defaults' button.
0
 
jvuzAuthor Commented:
Thanks, I found it. The only problem is (we're using Ricoh printers)  that it's an unregistred setting. So if someone changes something he cannot get it back, or he needs to change it back manually. So I found out you can export the settings in a json file. I was thinking maybe we can push this file to all computers for that printer. The only thing is, where should it be placed. Do you have an idea?

Jvuz
0
Cloud Class® Course: Microsoft Azure 2017

Azure has a changed a lot since it was originally introduce by adding new services and features. Do you know everything you need to about Azure? This course will teach you about the Azure App Service, monitoring and application insights, DevOps, and Team Services.

 
jvuzAuthor Commented:
On the server I gave a name on the preset, but when I push it to a pc, it doesn't take the name :(
Anybody has an idea how to change this?

Jvuz
0
 
WotanAUCommented:
Here's a nice little VB script I found to do just that. Use the cscript.exe renameprinter.vbs command to call this script.
strComputer = "."
Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")

Set colPrinters =  objWMIService.ExecQuery ("Select * from Win32_Printer Where DeviceID = 'WRONG Printer Name")

For Each objPrinter in colPrinters
    objPrinter.RenamePrinter("NEW Printer Name")
Next
	

Open in new window

Modify it with your appropriate printer names.

Source: http://www.cruto.com/resources/vbscript/vbscript-examples/printing/client/Rename-a-Printer.asp
0
 
jvuzAuthor Commented:
Sorry, but I think there is a misunderstanding. I don't want to rename the printer, only make sure the it takes the printing presets (with the registered name). Now it takes the correct settings but puts it like this: unregistered.
0
 
WotanAUCommented:
Could you please include a screenshot? I think there may be some confusion as to what you are trying to achieve.
0
 
jvuzAuthor Commented:
OK, PS1.jpeg is from the printserver itself and PS2.jpeg is from a pc where the printer is installed. As you can see the settings are correct, but on the pc, the setting is unregistered. So when you change something and you don't know how it was before you cannot go back. Instead if it would be registered, it would be easier
PS1.JPG
PS2.JPG
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.