Link to home
Start Free TrialLog in
Avatar of b-mac
b-mac

asked on

Install a printer with a batch file in windows 7

We user batch files that our old systems admin wrote to install network printers. Our CEO just bought a new laptop with Windows 7 on it and would like to use a batch file to install the printers he wants but it seems like the batch files aren't working. Can someone help me to get these batch files to work on 7?
Below is an example of one of the batch files,


cscript C:\WINDOWS\system32\prnport.vbs -a -r IP_10.1.10.170 -h 10.1.10.170 -o raw -n 9100

rundll32 printui.dll,PrintUIEntry /if /b "Xerox Phaser 3500 Admin" /f "\\NETWORKSHARE\drivers\Xerox 3500n\ps3500.inf" /r "IP_10.1.10.170" /m "Xerox Phaser 3500 PCL 6"


Thank you in advance for your help.
Avatar of Tech_Stig
Tech_Stig

I notice the use of a network share. Is the share on a windows domain or workgroup? Is the new laptop on the same domain/workgroup as well?
Avatar of b-mac

ASKER

It is on our windows domain. The laptop is on the same domain.
ASKER CERTIFIED SOLUTION
Avatar of Tech_Stig
Tech_Stig

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I know that this is not the answer you are looking for but it can come in handy.  printmigrator is free tool from microsoft to back up printers from print servers but it works just as well on work stations.  the only deal is that it has to be run with administrative priviledge to back up and restore but once you use the tool to back up your printers to a cab file you can restore those settings from that same cab file to any number of computers with the tool.
Avatar of b-mac

ASKER

I'm re-writing the batch files to include the new location. I'll let you know if we have any luck.
jkin - We don't use print servers, but thank you for the suggestion.
Roger that. Also, you may need to run that script as administrator.
Avatar of b-mac

ASKER

I'm not familiar with windows 7 at all. I gave his user account administrative rights to the laptop using the Users program in the control panel. Is there anything else that needs to be done to run it as admin?
Right click on the file and chose "Run as Administrator"
Avatar of b-mac

ASKER

Never did get the batch file to work, just installed them regularly. Thanks for the help though.
Avatar of b-mac

ASKER

Great advice  but I didn't have a windows 7 machine to test on and my user didn't want to troubleshoot. We just installed the printers regularly.