Friday, October 18, 2013

Removing iPrint Printers and Uninstalling Novell iPrint Silently


Over this past summer break we changed our servers from old Netware 6.5 servers and we moved to new Windows Server 2012.  At the same time we also changed from ZENworks Desktop Management 7 to ZENworks Configuration Managment 11.  Since we had over 3000 machines across 10 campuses to change over and there was only 3 of us we did our best to move as fast as we could.  In our haste we left the old Novell iPrint client (and iPrint printers) on the machines.  So now that school is back in full spring and we're almost caught up we need to tackle the issue of removing all of those old printers that are confusing the teachers.  We're not about to go back out and touch all of those machines again, that wouldn't be very practical.  So we're going to do our best to automate the process.

How best to go about removing all of those old printers?  You could write a script to loop through every printer on the local machine and check the name for ipp and remove it.  That sounds like it would be a lot of steps and as anyone that has spent any amount of time working in IT knows, the more steps the more places for something to break.  We wanted fast and simple.  So we dug a little further and found that we can simply uninstall the iPrint client and it removes the iPrint printers with it.  Keep in mind that this was an option for us because we are no longer going to be using iPrint.

So how best to uninstall the client?  You can download an "installer" from Novell that uninstalls the client.  Which is pretty cool.  If you haven't messed with iPrint much you should check out Novell download section for it.  They package several different installers to do a normal install, a silient install, a silent install with reboot, an uninstall.... (you get the picture, right?).  These are handy, because they don't require any command line switches, and you can just give users the file they need and tell them to run it.

But I didn't want to have to distribute another file just to uninstall a program.  So I dug through and found the uninstall command for iPrint.  It turns out that it's a pretty straight forward command:

C:\WINDOWS\system32\iprint\setupipp.exe /uninstall

Which almost works for us by itself, but it's not silent.  The user has to click that yes, they want to uninstall.  We don't like manual steps around here.  We don't like having to manually do something ourselves and sometimes simple things like clicking "Next" is a lot to ask of the users.

I did some Googling of the setupipp.exe command and really didn't come up with much.  So I made an educated guess and tried a "/silent" switch.  What do you know, it worked.  So if you want to silently uninstall iPrint you can use this command

C:\WINDOWS\system32\iprint\setupipp.exe /uninstall /silent

A quick check shows that after the uninstall finishes the setupipp.exe file gets removed too.  Which is great for us to use to automate.  I put together a ZENworks bundle that looks for C:\WINDOWS\system32\iprint\setupipp.exe as a requirement (which means iPrint is still on the machine) and then it it runs C:\WINDOWS\system32\iprint\setupipp.exe /uninstall /silent to remove it.  This works great, since it will only run on machines that have iPrint installed I can assign it to everyone without having to figure out first who needs it and who doesn't. And it doesn't require any work on the part of the user.  I'd call that a win win situation.

Didn't I mention above that I went Googling for the command line switches for setupipp and didn't have any luck?  Well I feel a bit dumb about it now.  I went back and tried the "/?" option on setupipp and what do you know, it tells you all of the command line options.  I guess there could still be something that's not documented, but it would have told me everything I would have needed to know.  The lesson here is don't go searching the internet for help with the program itself will help you out with only two extra characters, a / and a ?.

Just in case you want to know what those options are and you don't happen to have iPrint installed anywhere.  Here they are

---------------------------
iPrint Client Install
---------------------------
Installs or Uninstalls the Novell iPrint Client.

SETUPIPP [/S /R /U /L /?]

              The default (no options) runs the install wizard.

    /S      Install/uninstall the client silently.
    /R      Restart the workstation when the install/uninstall is complete.
    /U      Uninstall the client from your workstation.
    /?      Display this help screen.
    /L      Install for an LDAP compliant environment (only unique usernames).


Don't have ZENworks but want to do this remotely?  You can probably use PSEXEC to accomplish the same thing.  Luckily, since you're running it remotely you don't even have to worry about checking for setupipp first.  Just try to run it, PSEXEC will simply fail if iPrint isn't installed and the file isn't there.  Questions about using PSEXEC, check out my other post  http://practicalschooltech.blogspot.com/2013/10/remotely-installing-software_11.html


No comments:

Post a Comment