Bat calling VBS problem
OK I have our batch files for logon, doing all the usual stuff.
Since installing SMART notebook and Office we have the usual local printers like Smart notebook capture and the XPS office document printer.
I've got a vbs script that will delete them, and if I run the script alone it works. I tried adding the vbs to the batch file using:
wscript /B \\server\netlogon\remprint.vbs
again for me it runs, but when you run it as a student or staff member it brings up a dialog box (not sure since I added the /B part, but just want to make sure) and stops the rest of the batch file running until you OK it.
Is there an easier way of running a vbs file to remove certain printers on logon or should the /B switch do as it says (batch mode, hide all dialogs)?
Not sure if it's just a typing error in your post but that needs to be double slash B (ie wscript //b remprint.vbs)
Have you got any wscript.echo or msgbox in the code? If so, remove them and then there's nothing to pop up.
What does the message say?
Can you post the code?
i cant remember exactly what the message was. the code doesn't have any echo or msgbox no, its just a script to search installed printers for a device id and then remove said printers (i dont want to remove all local printers)
maybe i typed in only one backslash in the actual script, maybe that was causing it to play up. i'll have a check
We call our vbs scripts directly from the login bat without using wscript.
Console script (DOS'ish) vs Windows Script (Interactive)
Originally Posted by RabbieBurns
What he said basically.