I am working for a organization and am trying to find a way to run a batch file that can install a Local TCP/IP Printer with some specific IP address with no user interaction. I am using a code that works for a batch file but it has to be run as a local admin. I want to have this batch file run as a login script on our network to a bunch of laptop users on our domain. Below is what I have exactly:
-----------
cd c:\windows\system32
cscript prnport.vbs -a -r IP_192.168.1.115 -h 192.168.1.115 -o raw -n 9100
cscript prnmngr.vbs -a -p "Xerox Printer" -m "Xerox 4510" -r
"IP_192.168.1.115"
pause
------------
So, I tried to use the Run-as with the same code from above, but that needs entering in a Password and we want this to be done automatically. Also, the second does not work using Run as but the first command does I find that strange as well
------------
cd c:\windows\system32
runas /profile /user:Domain\Account "cscript prnport.vbs -a -r
IP_192.168.1.115 -h 192.168.1.115 -o raw -n 9100"
runas /profile /user:Domain\Account "cscript prnmngr.vbs -a -p "Xerox
Printer" -m "Xerox 4510" -r "IP_192.168.1.115""
pause
-------------
Can anyone please help.
Bookmarks