This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Re: Best practice for unfinished state after losing power?
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 17, 2011
01:02 PM
Best practice for unfinished state after losing power?
I have a Basic MSI project and during the middle of the Execute phase of the installation, I lost power. I had already set some registry keys, and placed files in folders on the target system. However, the product wasn't registered with Windows (there is no key under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall), so Windows doesn't think the product is installed.
So when I try to uninstall through the MSI by running maintenance mode, it gets an error because Windows doesn't see it as installed. If I try to run the MSI again, it installs as if the product hadn't been installed.
Is there a best practice concerning what to do in these situations?
So when I try to uninstall through the MSI by running maintenance mode, it gets an error because Windows doesn't see it as installed. If I try to run the MSI again, it installs as if the product hadn't been installed.
Is there a best practice concerning what to do in these situations?
(3) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 17, 2011
01:26 PM
Hi There,
It's unlikely that there's any such best practices to speak of. From what you describe, the machine could be in any number of states.
If you're just looking to recover this one machine, I'd recommend first checking into msizap.exe command line arguments to see if you can get it to clean up any registration data associated with that product code:
http://msdn.microsoft.com/en-us/library/windows/desktop/aa370523(v=vs.85).aspx
Then, clearing out any files installed by the application, and removing any SharedDll counts:
http://blogs.flexerasoftware.com/installtalk/2010/11/cleaning-up-your-shared-dlls-registry-references-for-msis.html
And then attempting the install again.
It's unlikely that there's any such best practices to speak of. From what you describe, the machine could be in any number of states.
If you're just looking to recover this one machine, I'd recommend first checking into msizap.exe command line arguments to see if you can get it to clean up any registration data associated with that product code:
http://msdn.microsoft.com/en-us/library/windows/desktop/aa370523(v=vs.85).aspx
Then, clearing out any files installed by the application, and removing any SharedDll counts:
http://blogs.flexerasoftware.com/installtalk/2010/11/cleaning-up-your-shared-dlls-registry-references-for-msis.html
And then attempting the install again.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 17, 2011
02:19 PM
Thanks. I'm aware of msizap and have used it before, but I need a solution that I could include in my MSI, to check if the machine is in an unstable state and then revert to a stable state.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 17, 2011
04:51 PM
Automating this sort of cleanup is dangerous, in my opinion. In part because the fix for the "unstable" state may differ fairly widely depending on the root cause.
The tack I would take is to detect the unstable state(s), and trigger an Error (Type 19) custom action that exits the install with an informational message instructing the user what to do, and where to go to find manual cleanup instructions.
The tack I would take is to detect the unstable state(s), and trigger an Error (Type 19) custom action that exits the install with an informational message instructing the user what to do, and where to go to find manual cleanup instructions.