9

Error 1001. An exception occurred while uninstalling. This exception will be ignored and the uninstall will continue. However, the application might not be fully uninstalled after the uninstall is complete

I can't uninstall or install the application. This particular box is not able to access the internet and I don't have physical access so most of the googleable results are not useful since they suggest running an exe from Microsoft.

What are the manual steps to resolving this issues. There is no way I can physically reach this machine nor does there seem to be a way for me to get files onto it. This is code that I'm developing and testing. I've tried repair and remove which fails out. I've scoured the registry but I must be missing something here.

If this is better on SuperUsers I'll gladly move it.

Rig
  • 1,276
  • 3
  • 22
  • 43
  • 1
    Let me tell you a story. Once upon a time a was given an installer defect ticket saying that it couldn't be uninstalled: Error 1001. Investigation revealed that a developer had written a custom action to create and start a service during install and stop / remove it during uninstall. He hadn't bothered to wrap the code in a try catch. The developer installed on a machine, used the SC command to delete the service and then when the uninstall ran his custom action threw an exception and rolled back the installer. I informed the developer that he was reinventing the wheel..... – Christopher Painter Apr 16 '13 at 11:16
  • 1
    That he should be leveraging the built-in capabilities (ServiceInstall, ServiceControl) of Windows Installer instead of injecting low quality code into the critical path. I manually recreated the service and ran the uninstall. I noted the ticket that the installer functions as designed and reassigned it to the developer to go fix his junk. This happened so many times that going forward, anytime I saw 1001 in a ticket, I summarily closed it as functions as designed. – Christopher Painter Apr 16 '13 at 11:18
  • I'm not entirely sure its starting a service since its running in IIS but its possible there is a similar scenario. – Rig Apr 16 '13 at 14:54
  • 1
    That was just an example. – Christopher Painter Apr 16 '13 at 19:51

6 Answers6

13

I had the same uninstall issue removing an application that I wrote that includes two Windows Services, ergo custom actions were unavoidable. I solved it be running PC Tools Registry Mechanic. Unfortunately, Symantec has retired that product. However, Microsoft Fixit has been known to help with registry related problems. http://support.microsoft.com/mats/Program_Install_and_Uninstall

John Pittaway
  • 919
  • 9
  • 9
  • Funny that you just replied to this as I have just encountered the problem again today. Can't access the internet from that machine though – Rig Jul 17 '14 at 19:32
  • Fixed not being able to uninstall TFS 2012 Power Tools for me. Thanks :) – st3inn May 13 '16 at 09:52
  • The microsoft tool worked for me, thanks! – Starwave Feb 23 '21 at 19:16
  • The utility worked like a charm for me. Thank you for saving me a ton of time having to do a manual registy clean. Btw, if you run the tool be patient. It takes several minutes to complete. – PhillipPDX Sep 01 '21 at 14:52
9

1001 always means an InstallUtil (Installer Class) custom action has failed. It's impossible to give you a more detailed answer because, well, it's a "custom" action. There is no telling what code is throwing an exception.

If you want to save this machine and not have to rebuild it, you have to log the uninstall to get the name of the custom action that's failing, use ORCA to tweak the MSI to cut out the custom action, recache the MSI and perform an uninstall.

You've now learned the hardway why to:

1) Always use VM's to test your MSI during the development / test life cycle

2) Avoid using custom actions whenever possible

3) Never use InstallUtil custom actions. They are not a good pattern or practice.

Christopher Painter
  • 54,556
  • 6
  • 63
  • 100
  • I'd love to do some of those things but I don't set the company dev machine policy. Is there any way to scrub thin in another way? Anyplace in the registry that keeps this stuff then I can just delete the directory? We actually will dev in VMs soon but we aren't there yet. – Rig Apr 16 '13 at 02:17
  • There's also MSI Zap but that just removes the windows installer / add/remove programs meta data. You'd have to manually uninstall the applications resources. I've had developers buy me lunch for working my magic with the answer I provided. – Christopher Painter Apr 16 '13 at 02:27
  • I can't move anything to that machine. I need a manual solutions. – Rig Apr 16 '13 at 02:50
  • Then figure out why the custom action is failing and try to manual manipulate the machine into a state that doesn't fail. – Christopher Painter Apr 16 '13 at 11:13
  • @ChristopherPainter I am not using CA in project.I have bundled per user and per machine context msi to EXE using BA.When i run EXE as Run as Administrator it is working,on double clicking the installer is throwing the ERROR 1001 and installation failed. Is it possible to catch the WIX EXE installer exception and show message to user like "Open it as Administrator".I have raised a question.Please look into this question http://stackoverflow.com/questions/27190362/how-to-run-exe-file-from-bundle-as-administrator-wix and guide me. – Royal Nov 29 '14 at 12:58
8

1.Goto control panel then right click to get repair option. 2.Repair it and again uninstall after repair. Here you go the software is uninstalled..

user4297325
  • 99
  • 1
  • 1
2

Make a verbose log file:

msiexec.exe /I "File.msi" /QN /L*V "C:\Temp\msilog.log"
/I = run installation sequence
/L*V "C:\Temp\msilog.log"= verbose logging
/QN = run completely silently

Open it in notepad, and search for value 3. Also check the system's event log for any clues.

Stein Åsmul
  • 39,960
  • 25
  • 91
  • 164
  • Thanks, I'm having this issue on yet another computer too. I think this rarely used project has a defect in its installer that I'm going to have to chase down. In production it would never be installed in combination with the app I think its conflicting with but in dev its definitely going to happen. – Rig Jul 18 '14 at 03:03
1

Most MSI errors like this will probably involve custom actions, or service configuration like Chris says.

If this is really important to chase down you should get hold of Orca - the SDK tool used to inspect MSI files. You can see some screenshots of the tool in operation in this answer. And then inspect the Custom Action table and the end of the InstallExecuteSequence table (order by sequence number) and report what entries you find there.

Unfortunately it seems the only way to get hold of Orca is by installing the Windows SDK. Alternatively you can download a trial version of one of the third party installer tools.

My guess is that there is an immediate mode custom action after InstallFinalize that is returning an error code of some sort. In short you can report all items AFTER InstallFinalize in the InstallExecuteSequence and we can probably narrow it down.

Community
  • 1
  • 1
Stein Åsmul
  • 39,960
  • 25
  • 91
  • 164
  • I actually have Orca but never really used it. Instincts, being I'm a developer for the apps in question, is that perhaps these applications are sharing a event log or performance counter category. When both installed it isn't handling the uninstalls gracefully leaving a conflicted state. I don't know but its something to look at. Especially once I try Orca out. – Rig Jul 19 '14 at 20:15
  • If you post a screen shot of the **Custom Action Table** and one of the end of the **InstallExecuteSequence Table** we can provide some guesstimates as to what may be wrong. – Stein Åsmul Jul 19 '14 at 20:46
  • @SteinÅsmul I am not using CA in project.I have bundled per user and per machine context msi to EXE using BA.When i run EXE as Run as Administrator it is working,on double clicking the installer is throwing the ERROR 1001 and installation failed. Is it possible to catch the WIX EXE installer exception and show message to user like "Open it as Administrator".I have raised a question.Please look into this question http://stackoverflow.com/questions/27190362/how-to-run-exe-file-from-bundle-as-administrator-wix and guide me. – Royal Nov 29 '14 at 13:28
0

That resolve the 1001 problem uninstalling windows service in Windows Server 2012 R2 I did:

  • Go to program and select Modify Service
  • Select repair Service

  • Close the applet, select again Modify Service

  • Now Select uninstall.

    I hope this help

freedeveloper
  • 3,670
  • 34
  • 39