I use a simple script to install network printers on remote machines. It works perfectly in XP and I'm testing in Win 7, but I keep getting a Generic Failure and I am looking for some insight. I have slightlty modified the BAT to run in Win 7. Here it is:
@ECHO OFF
@rem THIS COMMAND ALLOWS CSCRIPT TO RUN ARGUMENTS
CScript//H:cscript //S
@rem THIS COMMAND ASKS THE USER FOR THE PC VARIABLE
set /p PC=On which PC do you want to install this printer?
@rem THESE COMMANDS SETS THE PRINTER VARIABLES
set IP=xxx.xxx.xxx.xxx
set PrinterName=xx-xxxx
set PrinterType=xxxxxxx
set DriverPath=\\Network Share\Printers\xxxxxxxxx
@rem THIS COMMAND DELETES THE PRINTER IF IT ALREADY EXISTS
rundll32 printui.dll,PrintUIEntry /dl /c\\%PC% /n\\%PC%\%PrinterName% /q
@rem THIS COMMAND INSTALLS THE PRINTER PORT
cscript C:\Windows\System32\Printing_Admin_Scripts\en-US\prnport.vbs -a -r IP_%IP% -s %PC% -h %IP% -o raw
@ECHO .
@ECHO .
@ECHO .
@ECHO Be patient...we're almost done!
@rem THIS COMMAND INSTALLS THE PRINTER
rundll32 printui.dll,PrintUIEntry /if /c\\%PC% /b "%PrinterName%" /f "%DriverPath%" /r "IP_%IP%" /m "%PrinterType%" /q
@ECHO .
@ECHO .
@ECHO .
@ECHO All done!
PAUSE
The part that fail is prnport.vbs, but I changed it to the correct directory. Please assist.
Bookmarks