Relative Content

Tag Archive for if-statementbatch-filenetwork-printersrundll32

Attempting to write a .bat script for reinstalling printers

I am attempting to write my first batch program to automate installing printers. I run into a problem when I try and execute
IF %input%==N (rundll32 printui.dll PrintUIEntry /in /n\printerserver%printer%) ELSE (rundll32 printui.dll PrintUIEntry /in /y /n\printserver%printer%)
It throws an error saying “rundll32 not expected”
I’m wondering if this is an error with the wrong IF syntax since I’m new to batch and, rundll32 printui.dll PrintUIEntry /in /n\printserverprinter works flawlessly in CMD.

Attempting to write a .bat script for reinstalling printers

I am attempting to write my first batch program to automate installing printers. I run into a problem when I try and execute
IF %input%==N (rundll32 printui.dll PrintUIEntry /in /n\printerserver%printer%) ELSE (rundll32 printui.dll PrintUIEntry /in /y /n\printserver%printer%)
It throws an error saying “rundll32 not expected”
I’m wondering if this is an error with the wrong IF syntax since I’m new to batch and, rundll32 printui.dll PrintUIEntry /in /n\printserverprinter works flawlessly in CMD.

Attempting to write a .bat script for reinstalling printers

I am attempting to write my first batch program to automate installing printers. I run into a problem when I try and execute
IF %input%==N (rundll32 printui.dll PrintUIEntry /in /n\printerserver%printer%) ELSE (rundll32 printui.dll PrintUIEntry /in /y /n\printserver%printer%)
It throws an error saying “rundll32 not expected”
I’m wondering if this is an error with the wrong IF syntax since I’m new to batch and, rundll32 printui.dll PrintUIEntry /in /n\printserverprinter works flawlessly in CMD.