Delete network printer from a remote pc
Posted: 20 Aug 2010 11:49
I am trying to make a script that will delete a printer from a pc. For example I am on pc 1234 and want to run this program that will ask me for the pc i want to delete the printer from and what printer it is. So pc 789 i want to delete printer123 on printerserver
I have the following so far but it does not work Any help would be appreciated. Thank You
@echo off
:start
@echo This will delete network printers from a remote pc
@echo.
@echo Please type in the Asset Tag of the device to delete from
set /p tag=
@echo Please type in the Printer Name that you would like to delete
set /p printer=
rundll32 printui.dll,PrintUIEntry /dn /c\\%tag% /n\\dvmsprn04\%printer%
@echo.
@echo Delete another (y/n)?
set /p another=
if '%another%'=='y' goto start
if '%another%'=='n' goto end
:end
exit
I have the following so far but it does not work Any help would be appreciated. Thank You
@echo off
:start
@echo This will delete network printers from a remote pc
@echo.
@echo Please type in the Asset Tag of the device to delete from
set /p tag=
@echo Please type in the Printer Name that you would like to delete
set /p printer=
rundll32 printui.dll,PrintUIEntry /dn /c\\%tag% /n\\dvmsprn04\%printer%
@echo.
@echo Delete another (y/n)?
set /p another=
if '%another%'=='y' goto start
if '%another%'=='n' goto end
:end
exit