I have roughly 760 printers that need to be installed where Print Migrator failed. A coworkers found a script that was used in the past to install printers via a csv file. It's been a while since I used any VB but the syntax looks all wrong to me...
The CMD file:
cscript /nologo “C:\Program Files\Windows Resource Kits\tools\portmgr.vbs" -a -c \\APRINTERS -p IP_%%b -h %%b -t raw -n 9100"
rundll32 printui.dll,PrintUIEntry /if /b “%%a" /c\\APRINTERS /u /f “%%d” /r IP_%%b /m “%%c”
rundll32 printui.dll,PrintUIEntry /Xs /n\\APRINTERS\%%a Sharename %%a
The CSV file contains: PrinterName, IPAddres, DriverName, DriverLocation
And I was running it with:
for /f “tokens=, Delims=*” %a in (FILE.CSV) do (FILE.CMD)
However this would return an error "Delims was unexpected at this time."
Anyone have any suggestions for a VBScript n00b? Thanks!
The CMD file:
cscript /nologo “C:\Program Files\Windows Resource Kits\tools\portmgr.vbs" -a -c \\APRINTERS -p IP_%%b -h %%b -t raw -n 9100"
rundll32 printui.dll,PrintUIEntry /if /b “%%a" /c\\APRINTERS /u /f “%%d” /r IP_%%b /m “%%c”
rundll32 printui.dll,PrintUIEntry /Xs /n\\APRINTERS\%%a Sharename %%a
The CSV file contains: PrinterName, IPAddres, DriverName, DriverLocation
And I was running it with:
for /f “tokens=, Delims=*” %a in (FILE.CSV) do (FILE.CMD)
However this would return an error "Delims was unexpected at this time."
Anyone have any suggestions for a VBScript n00b? Thanks!