Uninstall Programs Packaged with Windows Installer (MSI) in Safe Mode
Whenever you install a piece of software in Windows, most of the time it will come with its own dedicated uninstaller that allows you to safely remove the program from your computer. This is because software nowadays is becoming more and more complex and requires registering OCX or DLL files, adding or changing registry keys, installing driver files, dropping files into the appropriate places and etc. There are many types of installers around such as InstallShield, InnoSetup, Wise and NSIS. Another popular one is Windows Installer which uses .MSI files and several developers such as Kaspersky use it to pack their software for users to install and uninstall.
If you’ve installed some software and suddenly Windows has stopped working or become unstable, the logical thing to do is boot Windows into Safe Mode and then try to uninstall from there. Security software sometimes requires Safe Mode to completely remove itself because protected files are in use in normal mode. Only the basic files and drivers necessary to run Windows are started in Safe Mode, and unfortunately, by default you can’t uninstall any software that is packaged with Windows Installer. If you try to uninstall, you will get the error similar to this (Windows XP has a slightly different message):
The Windows Installer service is not accessible in Safe Mode. Please try again when your computer is not in Safe Mode or you can use System Restore to return your machine to a previous good state.
There is a Windows Installer service called MSIServer listed in the Services Control Panel applet, and if you boot directly into Safe Mode then attempt to manually start the Windows Installer service, you will receive the following error:
Windows could not start the Windows Installer service on Local Computer.
Error 1084: This service cannot be started in Safe Mode.
Thankfully all is not lost and it’s actually very easy to enable the Windows Installer service in Safe Mode so that you can uninstall programs, all you need to do is add a new MSIServer registry key for Safe Mode. This can be done from either Safe Mode or Normal Mode, it doesn’t matter as enabling the registry key will take effect immediately.There’s a little utility that’s been around since 2005 that can do the same thing called SafeMSI by Harry Bates over at WindowsITPro.com. It will add the registry entries and start the service (it will start automatically anyway).
Simply launch the program and it will popup a box to say it’s been enabled. This can be launched in Safe or Normal Mode, and although made back in 2005, still works for newer operating systems because the created registry keys have never changed.
Alternatively, simply follow the instructions below, the procedure is the same for Windows XP, Vista, 7 and 8:
1. Hit Win+R, type regedit and click OK.
2. Navigate to the following location in registry editor:
3. Right click on Minimal and select New -> Key and name it MSIServer.
4. The (Default) data for the MSIServer key should show (value not set). Double click on (Default) and type Service in the value data. Close the Registry Editor.
There are actually two registry keys that can be changed, the above is for the standard Safe Mode. To enable the MSIServer service in Safe Mode with networking as well, you can perform the same procedure on this registry key also:
It’s should now be possible to install or uninstall MSI programs that are packed using Windows Installer in Safe Mode. Thankfully the Windows Installer service is setup as Manual by default so it will not start until called upon. For ease of use, we’ve made a simple registry .reg file which you can double click on to import these values into the registry automatically.
cheers this worked like a dream, couldnt seem to get a faulty install of crashplan to uninstall on my server 2012 r2. all working now
Thanks so much! No need for any apps this method is the best for uninstall in safe mode!
Thank you so much, you are a true expert. You turned my nightmare into a walk through the park.
I install vmware tools in safe mode on windows xp (guest)
THANK YOU, THANK YOU, THANK YOU!
I’ve spent hours trying to figure this out and your steps fixed it. I used your manual steps rather than downloaded the tool. Instructions and steps were simple and clear.
I’m on Windows Vista Home Edition 32 bit
Thank you. You made such a scary and confusing process so simple that even I understood it.
Got my computer working again thanks to you. Much appreciated.
Question : the reg file, could I install on Normal Mode ?
Thanks in advance
Thanks – great tip! Works like a charm
Thanks for the tip. Had trouble uninstalling Kaspersky as well. This works on Windows 7.
I have just rescued my Windows 7 installation using this tip. I had to remove Kaspersky AV 2010 Chinese as Windows could not boot normally anymore, but Safe Mode would not let me do it. I was preparing for a full OS reinstall, but I found this trick which saved me from wasting another 24 hours backing-up and reinstalling stuff. Thank you!
Thanks mate, you just saved my bacon. I can confirm that this works in Windows Web Server 2008 SP2
A tip for anyone who’s booted in safe mode with networking, the key is HKLM\SYSTEM\CurrentControlSet\Control\SafeBoot\Network\
Everything works fine!
Thanks ! Dude
Wonderful tip Raymond!
I loved it. Thanks a ton.
You Rock! As usual ;)
awesome tip ray and thanks for the great info that we are learning everyday :D
Another great tip from you..
I subscribed to you via RSS FEED, and with a reason!
Thank you Raymond – very helpful.
Thanks for the info. Raymond.
Excellent tip!! Thanks Raymond.
Thanks Raymond you are the IT GOD.
I was looking for this for a long time. Thanks Ray.
Thank You very much this is very useful.
Excellent tip!! Thanks Raymond.
thanks for this! Will be handy soon..
useful info mate, thanks!
Thanks. Useful tip!!!
Thanks Raymond. Very useful info.
Good info Ray. Thanks
Excellent tip!! Thanks heaps Raymond.