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.
b-macAsked:
Who is Participating?
 
Tech_StigConnect With a Mentor Commented:
Ahh... Looks like "C:\WINDOWS\system32\prnport.vbs" has been moved on Windows 7

Try replacing that with "C:\Windows\System32\Printing_Admin_Scripts\en-US\prnport.vbs"
0
 
Tech_StigCommented:
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?
0
 
b-macAuthor Commented:
It is on our windows domain. The laptop is on the same domain.
0
The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

 
jkinwv09Commented:
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.
0
 
b-macAuthor Commented:
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.
0
 
Tech_StigCommented:
Roger that. Also, you may need to run that script as administrator.
0
 
b-macAuthor Commented:
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?
0
 
Tech_StigCommented:
Right click on the file and chose "Run as Administrator"
0
 
b-macAuthor Commented:
Never did get the batch file to work, just installed them regularly. Thanks for the help though.
0
 
b-macAuthor Commented:
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.
0
All Courses

From novice to tech pro — start learning today.