Hi,
Is there a way to remove the MS XPS Document Writer and Symantec Fax Starter Edition virtual printers ? preferably via a cmd script or vbs.
Thanks
Andy
Hi,
Is there a way to remove the MS XPS Document Writer and Symantec Fax Starter Edition virtual printers ? preferably via a cmd script or vbs.
Thanks
Andy
I had a script that did the Microsoft document imager with wmi, I'll see if I can find it
Code:strComputer = "." Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2") Set colInstalledPrinters = objWMIService.ExecQuery ("SELECT * FROM Win32_Printer") For Each objPrinter in colInstalledPrinters IF objPrinter.Name = "Microsoft XPS Document Writer" THEN objPrinter.Delete_ END IF Next
Thanks :-)
I get an access denied error for this script on line 6, any reason why it would be doing that?
"objPrinter.Delete_"
Just using it as a logon script in a group policy, is it that the script doesnt have the rights to delete the local XPS Document driver or something?
needs to be a startup script so it runs with the system account
Do startup scripts get executed before the login scripts?
It's just I've got a login script that sets up the printers on the machine so i need the xps driver deleting first so that the 1st printer that gets set up in the printers script becomes the default.
Startup scripts go before the computer even reaches the Ctrl Alt Del screen.
Would i be able to edit the script to delete the macromedia flash paper printer? If so which bit do i need to alter?
Cheers,
Ste
Have a look at this script, it's slightly modified to delete the XPS writer and the Image writer.
Code:strComputer = "." Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2") Set colInstalledPrinters = objWMIService.ExecQuery ("SELECT * FROM Win32_Printer") For Each objPrinter in colInstalledPrinters IF objPrinter.Name = "Microsoft Office Document Image Writer" THEN objPrinter.Delete_ ELSEIF objPrinter.Name = "Microsoft XPS Document Writer" THEN objPrinter.Delete_ END IF Next
OutToLunch (1st March 2010)
Maybe I'm just being stupid but does this need to applied to the domain group policy then?Originally Posted by Lithium
If I apply this to my students group policy how would the computer know to run the script before it even knows that a student is logging on?
@Geoff
Will the script crap out if it tries to delete a printer that doesn't exist? Some of our clients have the Microsoft Office Document Image Writer printer, some dont, will it be OK to use the one script that deletes the XPS driver and the Image Writer drive on all the machines?
The script runs silently regardless of the status of printers on the PC.
CAN SOMEONE PLEASE TELL ME WHERE TO WRITE THIS SCRIPT...PLEASE, IM SO FED UP WITH THIS SH. I DONT KNOW ANYTHING ABOUT THIS BUT I HAVE TO GET RID OF XPS, ITS DRIVING ME CRAZY. WHERE AND WHEN TO ENTER THIS SCRIPT. I HAVE A PC WITH WINDOWS 7 AND ITS JUST MY SINGLE PC.
THANK YOU!

If you are using Windows 7, run the following from an elevated Command Prompt to disable the XPS printer.
BTW, there's no need to shout!Code:DISM /Online /Disable-Feature /FeatureName:Printing-XPSServices-Features
There are currently 1 users browsing this thread. (0 members and 1 guests)