Unable to uninstall printer driver using batch file, getting error 0x000006ba

-1

I was trying to install the printer from the batch file using below commands Creating a local port: reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Ports" /v "C:\Users\Akshay\Desktop\Test\output.xps" /t reg_sz And then restarting spooler. Creating Printer device along with installing the printer driver rundll32 printui.dll PrintUIEntry /if /f C:\Users\Akshay\Desktop\output.xps\Test\xdsmpl.inf /r "C:\Users\Akshay\Desktop\output.xps" /m "XPSDrv Sample Driver" /b "Test Printer" With above commands Printer driver installed and creating a device.

But When I am trying to remove printer driver from the batch file- Below command removes printer device.

rundll32 printui.dll PrintUIEntry /dl /n "Test Printer" While removing printer driver using below command (I am using windows 7 64 bit): RUNDLL32.EXE PRINTUI.DLL,PrintUIEntry /dd /c\\machine /m "XPSDrv Sample Driver" /h "x64" /v "Type 3 - User Mode" It is giving me below error-

Operation could not be completed (error 0x000006ba). The server printer spooler service is not running. Please restart the spooler on the server or restart the server machine.

Checked spooler service, it is already in running state. And also executing above command after restarting spooler service and also after restarting the system, getting the same error. Please guide me to solve the above problem.

batch-file
printing
rundll32

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0