eejit Posted October 11, 2005 Posted October 11, 2005 Hi there, I have a bit of a problem with the Office Document Image Writer printer that gets installed with office. Is there an easy way to remove it across the domain? The scripts I've tried for removing regular printers have failed. I know I could re-deploy office again without the image writer selected, but that will really be a last option as I don't fancy creating the MST and having machine's take 30 mins to boot up while they re-do the install. Any ideas will be welcomed. cheers.
Geoff Posted October 11, 2005 Posted October 11, 2005 You can do this with a VBS script, however, one has to be violent and use the extended options for the RemovePrinterConnection method. Like so: Option Explicit Dim objNetwork, strUNCPrinter strUNCPrinter = "Office Document Image Writer" bForce = "True" bUpdateProfile = "True" Set objNetwork = CreateObject("WScript.Network") objNetwork.RemovePrinterConnection strUNCPrinter, bForce, bUpdateProfile Wscript.Quit
eejit Posted October 11, 2005 Author Posted October 11, 2005 Cheers Geoff, I will give a go right now.
eejit Posted October 11, 2005 Author Posted October 11, 2005 Sorry to be a pain Geoff, but I'm getting the following error: Line: 4 Char: 1 Error: Variable is undefined: 'bForce' :oops:
eejit Posted October 11, 2005 Author Posted October 11, 2005 No, XP SP2 on a server 2003 SP1 network. Office 2003 SP2 too.
Geoff Posted October 11, 2005 Posted October 11, 2005 ah my bad. Change Dim objNetwork, strUNCPrinter to Dim objNetwork, strUNCPrinter, bForce, bUpdateProfile Also double check that the printer name is correct, I'm not 100% on that either.
eejit Posted October 11, 2005 Author Posted October 11, 2005 Will do Geoff, thanks. The printer name is "Microsoft Office Document Image Writer"
eejit Posted October 11, 2005 Author Posted October 11, 2005 Ok, still no joy. I've copied it locally to an XP machine and run it there. I get the following error: Line: 8 Error: This network connection does not exist Am I reading too much into the error message in assuming that this code will only work for network printers? Here is the current script: Option Explicit Dim objNetwork, strUNCPrinter, bForce, bUpdateProfile strUNCPrinter = "Microsoft Office Document Image Writer" bForce = "True" bUpdateProfile = "True" Set objNetwork = CreateObject("WScript.Network") objNetwork.RemovePrinterConnection strUNCPrinter, bForce, bUpdateProfile Wscript.Quit
Geoff Posted October 11, 2005 Posted October 11, 2005 Sorry I should of said, local printers need to be in quotes thus: strUNCPrinter = ""Microsoft Office Document Image Writer""
eejit Posted October 11, 2005 Author Posted October 11, 2005 Oh dear, that causes an "Expected end of statement" error at the end of the first set of double quotes. I feel guilty about taking up all your time with something that won't even benefit you. Maybe I should concentrate on making an MST instead after all
Ric_ Posted October 11, 2005 Posted October 11, 2005 I've been trying to get rid of this recently too. I've had no luck yet but I am past the stage of errors - there's another method of reoving printers with VBScript. I'll post my attempts so far when I get to work tomorrow.
Geoff Posted October 11, 2005 Posted October 11, 2005 ok, lets try the evil hard coded approach. Option Explicit Dim objNetwork Set objNetwork = CreateObject("WScript.Network") objNetwork.RemovePrinterConnection "Microsoft Office Document Image Writer", True, True Wscript.Quit
eejit Posted October 12, 2005 Author Posted October 12, 2005 Sorry Geoff, we're back to "This network connection does not exist" with this one. The fact that it's a local printer is at root of the script problems I believe.
eejit Posted December 4, 2005 Author Posted December 4, 2005 In the end I downloaded the reskit and made myself an MST removing the image writer. The install took about 30 secs. Should have done that originally
Ric_ Posted December 5, 2005 Posted December 5, 2005 Just for completeness... I used the attached file in the startup script and ti worked perfectly.del_imagewriter.vbs
tarquel Posted December 5, 2005 Posted December 5, 2005 Never actually tried using the image writer but it doesnt make a pdf of the doc does it? hehe That would be damned useful, but i guess its some other 'orrible thing instead right? Nath
Geoff Posted December 5, 2005 Posted December 5, 2005 It makes TIFF image files or MS's proprietry MDI format image files.. There's various free/shareware tools for making a PDF based printer. My prefered way is to use a Linux Samba server though.
tarquel Posted December 5, 2005 Posted December 5, 2005 It makes TIFF image files or MS's proprietry MDI format image files.. Ahhh - i thought it'd be some sort o' crap like that hehe There's various free/shareware tools for making a PDF based printer. My prefered way is to use a Linux Samba server though. I know Cheers for the info tho Nath
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now