NSFW bat file help

JAXvillain

Curly_Sue
Oct 13, 2004
68,732
1,999
923
Marklar
₥0
I'm making a script to add 3 new copiers on the floor and delete the old 3.

here are the lines I'm using for each action:
rundll32 printui.dll,PrintUIEntry /in /n "\\server\copier"
rundll32 printui.dll,PrintUIEntry /dn /n "\\server\copier"

I had all 3 of the old copiers so the script ran normally. I ran it again when I didn't have any of the old 3 and it had a stop error on each. How do I get it to continue through the error if the copier is not found and proceed to the next one?
 
think that got it. thanks man! going to add old queues back and start from the top to double check
 
I'm making a script to add 3 new copiers on the floor and delete the old 3.

here are the lines I'm using for each action:
rundll32 printui.dll,PrintUIEntry /in /n "\\server\copier"
rundll32 printui.dll,PrintUIEntry /dn /n "\\server\copier"

I had all 3 of the old copiers so the script ran normally. I ran it again when I didn't have any of the old 3 and it had a stop error on each. How do I get it to continue through the error if the copier is not found and proceed to the next one?

Wait, what is the error? Its apparently expecting input from you?

edit: Just use the /q switch
 
Last edited:
oops.

try
IF NOT EXISTS "\\server\copier" rundll32 printui.dll,PrintUIEntry /in /q /n "\\server\copier" ;;theoretically this checks to see if the printer is installed, if it isn't, it then installs it.
IF EXISTS "\\server\copier" rundll32 printui.dll,PrintUIEntry /dn /q /n "\\server\copier" ;;theoretically this checks to see if the printer is installed, if it is, it uninstalls it
 
Back in highschool the computer class I was in, we had to write out a bat file in dos, complete with colors, menus, shadowing, and all that shit. I must have spent hours perfecting the "gui".
All it really did was run basic tasks like defrag, fdisk, format, etc. Sadly I think I forgot most of how to make colorful menus and junk. I wonder if I still have that bat file.

ansi.sys FTW