Script for uninstalling multiple programs?
Hello forum.
Second week into my internship, and I was tasked with removing pre-installed software from the OEM PC's that we get in.
I am sat here, uninstalling one by one about 15 programs. I'm assuming its possible to write a INI script to uninstall them with just one click? (bar the odd message).
Kai.
Second week into my internship, and I was tasked with removing pre-installed software from the OEM PC's that we get in.
I am sat here, uninstalling one by one about 15 programs. I'm assuming its possible to write a INI script to uninstall them with just one click? (bar the odd message).
Kai.
Comments
What kind of environment is this? I'm sure it's not possible now since the machines have been in use, but I've always been a fan of wiping machines when brand new and loading a fresh image. Of course if there's no volume license or equivalent, this may be a problem.
You could script it I'm sure. You'd just need to find the installer files and execute them CMD-style with the uninstall flags. This could take a while to get right and might not be worth the time unless you're interested in the journey just as much as the destination.
They come with lenovo stuff pre-installed but it messes with the domain configuration when they are set up. I sit down for 30 minutes and go through it via uninstall programs. Found out that there will be around 35+ of these, hence the desperation for a solution
It is about the journey though. Its not expected of me, but it seems simple enough once I know their "default" location.
It's been a while since I dug into it, but I think your journey will start here :
Use PowerShell to Find Installed Software - Hey, Scripting Guy! Blog - Site Home - TechNet Blogs
Just to first check to see if the software you want to un-install is listed in the Add/Remove programs list.
Ultimately, I think you're looking for something like this :
Use PowerShell to Find and Uninstall Software - Hey, Scripting Guy! Blog - Site Home - TechNet Blogs
However the actual commands might be slightly different on your version of Windows.
The guy I replaced spent two weeks trying to get something like this to work. I have literally no scripting skills, but as a pet project this would be a good place to start, and would be insanely useful and maybe give me some credibility.
I have literally on average 4 hours a day downtime when the technicians are out, manager out and my sole responsibility for that moment is manning the phone (maybe 1 in every 2 hours?). I've been studying away for the ITILv3 but it puts me in a coma after an hour. If I make any progress I'll let you know
IT Pro Tips for Oracle Java 7 Update 15 7 | ITNinja
First thing would be to understand what it is you need to uninstall, what to remove and from where.. Then you can script it.
Oh man, that's plenty of time to figure this out!!
I’d pick one of the programs that needs uninstalling and find its pieces. Specifically, the installer. For example, let’s use the CrapTastic5000 application by Dellenovo. (If you can name one of the bloatware apps already installed I can be a little more realistic) Looking at the program, I can see that it lives in c:\program files (x86)\Dellenovo\CrapTastic\Craptastic5000.exe. Knowing where the program itself lives, there’s a good chance that the installer lives there (or close to there) too. So I’d look for something like “install.msi” or something similar to that. Since it’s an msi file, I know there are certain command-line flags (Msiexec - Windows installer | Windows CMD | SS64.com, Msiexec (command-line options)) I can use to run the installer in a manner that un-installs it, and does so silently. From here, I’d open a command prompt and play with the msiexec command line tool to figure out how to make this happen. In a cmd window, I’d enter:
Msiexec /x “c:\program files (x86)\Dellenovo\CrapTastic\install.msi”
And see what happens. Best case, it uninstalls without any other input. Worst case, it runs and asks you a bunch of questions. When you’ve got the syntax down for all the programs, then you can think about automating it. Powershell is perfect for this because it accepts regular CMD commands, so if it works in CMD it will work in Powershell.
If you have any doubts or troubles with uninstalling these programs, google it. Google for phrases like “app-name command line uninstall”, “app-name unattended uninstall”, even “app-name silent install” can be helpful.
I concur. Msiexec switches are quickest way to uninstall. Plus you can do it silent so you don't see a interactive pane.
Echo color A0
Msiexec
Pause - so you can see if it fails kind of helpful sometimes
Exit
Then save it as a filename.bat and then execute it. Do a Msiexec /? to find the command that is right for you.
I can drop in a batch file in the morning. I've written a number of batch programs for automation in the past year for task scheduler in 2008 R2.
IT manager was impressed that I was going to give it a go. Might of gave the wrong impression that I'm capable of scripting anything