Tip: How to install and uninstall a program in Safe Mode
By Michael Pietroforte | 20 Comments | Permalink | Trackback | Previous | NextI’ve never really understood why uninstalling programs in Safe Mode isn’t officially supported in Windows. The main purpose of Safe Mode is to troubleshoot Windows, and what usually causes the trouble? Right, misbehaving programs. This may not even be the fault of the program itself. Windows is a very complex system and sometimes unforeseeable things happen. If an application has been somehow damaged, it might not even be possible to uninstall it. For example, its service could hang immediately after the system boots, or other programs could interfere.
In Safe Mode, Windows has reduced functionality, because only the core components have been loaded. In such an environment it is much easier to get rid of an application that has gone mad. Windows Safe Mode can be entered by pressing the F8 key before Windows boots up.
In order to uninstall a program in Windows, the Windows Installer Service has to be running. If you try to uninstall software in Safe Mode, Windows will just inform you that: “The Windows Installer Service could not be started.” Trying to start the service manually will only get you: “Error 1084: This service cannot be started in Safe Mode.”
The good thing is that it is not really difficult to outsmart Windows Safe Mode. All of the services that are allowed to start in Safe Mode are stored in the registry folder HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SafeBoot\Minimal\
All you have to do is to add a REG_SZ key with the service name (not the display dame) and the value data “Service” (without quotes). The service name of the Windows Installer Service is MSIService. As such, the REG file that adds the correct key looks like this:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SafeBoot\Minimal\MSIServer]
@="Service"
All you have to do is copy this to a text file, with the extension .reg, and drop the file into your tool box. Anytime you want to uninstall a program in Safe Mode, you just click on the REG file. You have to remove the key manually if you want to disable this feature. However, I think it usually won’t do any harm.
Please note that it is not always possible to uninstall software in Safe Mode because the corresponding installer program requires certain services to be running. In such a case you might just enable these services as well in Safe Mode by adding their service names to the Registry. The Service Name can be found in the service’s properties in the Services snap-in.
Note: If you know similar tips, please just mail them to
![]()
If I like the tip, I will post it as an article on 4sysops with your name and a link to your blog or website.




Subscribe via e-mail: 




This one has always baffled me as well. I assume it’s due to the reasons you touched on, some apps needing uninstaller services, or to communicate with and call driver unloads, etc. For the lazy, you can also fire up MSI from the command-line:
REG ADD “HKLM\SYSTEM\CurrentControlSet\Control\SafeBoot\Minimal\MSIServer” /VE /T REG_SZ /F /D "Service"
net start msiserver
Then just launch the MSI of whatever you want to get rid of, or use the cpl. Luckily, I believe Windows 7 has fixed all of this, and lets you uninstall natively.
Michael
Another tool we use in our shop is SafeMSI.
Software Pick of the Week: SafeMSI – http://computerbusiness101.com/16
unzip and keep handy on a USB stick.
When you need to do some uninstalls in Safe mode, just run the SafeMSI.exe file and it will auto-start the Windows Installer Service and let you do your thing.
It cleans up the registry and everything so you can avoid messing with REG files.
Works on Windows XP and I’ve seen mention it also works on Vista systems, although I can’t personally confirm that.
Cheers,
Claus V.
Hi,
I’ve got a quotes problem here.
Instead of ”Service” I’ve had to use "Service".
Sometimes copy-paste is annoying…
[...] Tip: How to install and uninstall a program in Safe Mode [...]
Jonathan, thanks. You are right, at least in Windows 7 Beta it is possible to uninstall software in Safe Mode. I hope Microsoft won’t change that again.
Ricardo, thanks for the hint. Wordpress automatically converts quotation marks. That’s why they were also displayed incorrectly in your comment. I fixed it now in the text and also in your comment.
[...] en 4sysops nos explican cómo podemos [...]
Very nice tips !
im confused & stuck, its soo confusing, i was there until:
————————–
All you have to do is to add a REG_SZ key with the service name (not the display dame) and the value data “Service” (without quotes). The service name of the Windows Installer Service is MSIService. As such, the REG file that adds the correct key looks like this:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SafeBoot\Minimal\MSIServer]
@=”Service”
All you have to do is copy this to a text file, with the extension .reg, and drop the file into your tool box. Anytime you want to uninstall a program in Safe Mode, you just click on the REG file. You have to remove the key manually if you want to disable this feature. However, I think it usually won’t do any harm.
—————————————-
can nyou make it more detailed..
cazatuz, do you know how to edit the registry? If not, I suggest you use the tool that Claus recommended in the comment above. It basically does the same thing.
Claus, thanks!
In Windows 7 RC x64 you cannot uninstall programs in Safe mode (at least I can’t and I’ve upgraded from Vista Ultimate x64). I tried the tip in the article but it does not work. I will try the utility suggested in one of the comments but is there another solution for Windows 7 RC?
That’s interesting. I didn’t find time yet to try the RC, but it worked in the beta. Is the registy key missing in the RC?
I tried to add the registry key and it didn’t seem to do anything. Running the SafeMSI tool worked, however.
Mike, check the registry again now. SafeMSI added the registry key.
You must note that the service name IS case sensitive, so when you add the key, you must type the name MSIServer, msiserver won’t work. Then edit the default value to Service as stated above. Afterwards you can start the service from the services console or the command line without having to reboot. Good luck.
Yes!!!! You rock!!!
Sounds like a good way to uninstall. Your title says “install and uninstall’; but the body of the article does not mention installing – only uninstalling. Was this intentional?
Thanks,
Fred
Yes ..what about installing in safe mode?
Is this possible and ok to do when you’re having problems installing a program?
Will any of this work with Windows 2000 Server SP4?
Something to be aware of (it caught me out at first — the list of services is *different* for “Safe Mode with Networking”. One is not a superset of the other.
So if (like me) you use networking, then the key you need is:
HKLM\SYSTEM\CurrentControlSet\Control\SafeBoot\Network\MSIServer
ie Network\MSIServer rather than Minimal\MSIServer
I’m using this on Windows 7 Ultimate x64 RTM (7600) and it works like a charm!
-Paul.
Dude!
You saved my life with this one! I was having trouble with anti-virus software – replacing McAfee with Vipre and McAfee was just not letting the new install work. I booted to safe mode, added the registry key and uninstalled McAfee. After that everything was great.
Thanks again!