Problems and the occasional solution for technology issues encountered in a the K-12 education environment.
Showing posts with label psexec. Show all posts
Showing posts with label psexec. Show all posts
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
Friday, October 11, 2013
Remotely installing software
Ever need to install software remotely? Why not just fire up Remote Desktop (or VNC) and connect and install right? That works great if it's one machine you need to install software on. What happens when you have a lab full of machines that you need to install software on? You either need a lot of time or something that works faster than remotely installing it on each machine. So what are you options?
A login script. Great! But you have to make the script, associate with only the machines (or specific user) that you need it on, and then wait for someone to log into the machine. Or remote the machine and log in yourself, but that doesn't really help us speed up anything since we need to make sure it gets installed.
Group policy. The old school way to push software requires an MSI. The programs that I was installing didn't come packaged in an MSI, it was an EXE. Yes, I know I could repackage it into an MSI, but I want to get this software installed quick and I don't want to spend the time on that.
Third party management software. Yes, this a really good option. The problem is that we're still working the bugs out of the management software right now and for an unknown reason it doesn't want to push these installers. The long term way to push software is going to be to get this fixed. But right now I'm going to postpone troubleshooting on the management software just so I can quickly get this software installed and get the end users back running.
So what did I finally go with?
PSEXEC. Psexec is your friend. It's one of the ps tools available from Microsoft (formerly Sysinternals). It's a free download and it will let you execute commands on remote systems. So with a quick (and very dirty) batch file I was a able to loop through a list of computer names and install programs that I needed to get installed.
psexec /? will give you all the options, but for my purposes here's what I used:
psexec \\machinename -user someuser -p somepassword C:\installerfilename.exe /switches
And that's it. Well, actually I used a FOR loop in a batch file to process through all the machine names, but the actual work was done with that command right there.
Here's a link for info on the FOR loop. http://ss64.com/nt/for2.html This post is starting to run so I'll save the notes about FOR loops for another post.
A login script. Great! But you have to make the script, associate with only the machines (or specific user) that you need it on, and then wait for someone to log into the machine. Or remote the machine and log in yourself, but that doesn't really help us speed up anything since we need to make sure it gets installed.
Group policy. The old school way to push software requires an MSI. The programs that I was installing didn't come packaged in an MSI, it was an EXE. Yes, I know I could repackage it into an MSI, but I want to get this software installed quick and I don't want to spend the time on that.
Third party management software. Yes, this a really good option. The problem is that we're still working the bugs out of the management software right now and for an unknown reason it doesn't want to push these installers. The long term way to push software is going to be to get this fixed. But right now I'm going to postpone troubleshooting on the management software just so I can quickly get this software installed and get the end users back running.
So what did I finally go with?
PSEXEC. Psexec is your friend. It's one of the ps tools available from Microsoft (formerly Sysinternals). It's a free download and it will let you execute commands on remote systems. So with a quick (and very dirty) batch file I was a able to loop through a list of computer names and install programs that I needed to get installed.
psexec /? will give you all the options, but for my purposes here's what I used:
psexec \\machinename -user someuser -p somepassword C:\installerfilename.exe /switches
And that's it. Well, actually I used a FOR loop in a batch file to process through all the machine names, but the actual work was done with that command right there.
Here's a link for info on the FOR loop. http://ss64.com/nt/for2.html This post is starting to run so I'll save the notes about FOR loops for another post.
Labels:
for,
group policy,
install,
psexec,
remote,
sysinternals,
vnc,
xp
Subscribe to:
Posts (Atom)