MSI Install Outlook plug-in challenges - outlook

I have created an Outlook plug-in and I am having some challenges around installing the system. The issue I am having relates to the situation where a user is applying an update to my plug-in and has Outlook running while they apply the update via the MSI. Currently a window will be displaying informing the user that Outlook is running and they should close Outlook before continuing. The problem is though that they can elect to continue and reboot Outlook later. If that happens then my app is not completely installed and corruption with one of my data files can occur. I see two possible issues that I was hoping for ideas:
Is there anyway that I can eliminate the "Continue and reboot later" option that appears when Outlook is running during my MSI install?
If option #1 isn't possible, how can I add some of my own files to the list of files that the MSI keeps that are overwritten when Outlook is rebooted?
Thanks,
Kevin

One possible, though frowned upon, solution is to write a CustomAction that will go look for open Outlook windows and close them. Generally you should warn your users you're about to close their application and give them the opportunity to not close it and cancel the install.
I have, unfortunately, used this solution more times than I care to admit in order to install Internet Explorer plug-ins.
There may be other solutions.

Related

windows program reinstalls itself for different logins on the computer

I created a Windows installer for a Client-Server program by using VS 2013 and InstallShield LE 2015.
I log in to a computer as Admin and run the installer. All works fine.
Then I modify the registry for Local_Machine for some keys to define the database location etc. for the program (this was done by the installation initially as well, but due to certain issues discussed in At each login the program tries to configure installation parameters in the HKEY_LOCAL_MACHINE registry, I removed the registry modifying section from the installer).
I then run the program by double-clicking the shortcut placed by the installer on the desktop and test it. All works well.
Then I log off the computer.
Another user with admin rights logins and clicks on the shortcut, and the problem comes: the program starts to reinstall itself!
Then it fixes itself and runs fine.
But If the first user logins afterward, she experiences the same reinstall operation so does the first user afterward ad nauseam!
So, even though the installer does not create any registry items by itself, somehow, as soon as the program accesses the registry, or whatever it thinks broken, the Windows OS intervenes and tries to repair whatever needs fixing.
The InstallShield LE does not allow setting shortcuts to be "Advertised Shortcut", or
I delete the shortcut created by the installer and recreate it manually after the installation and yet experience the same problem. So the nature of the shortcut possibly is not the cause.
This problem only happens for multiple logins to the computer. If many people login by using the same credentials, it never happens.
So, what's wrong? I studied many StackOverflow answers to resolve this issue with no success. Any help would be highly appreciated.
Stein gives a good set of instructions on how to diagnose problems with MSI programs in this StackOverflow answer. When I followed his instructions, I was able to check which component of my MSI program has a problem. It turns out, the serial bus controller library, MScomm32.ocx could not register under Win 10 properly. Once, I implemented the solution in this link, the above problem resolved and I could log in as two different users without initiating a reinstall process whenever the program icon was double-clicked to run.

Wix Toolkit - MSI Installer - Window's pop-up constantly appears when installed application is launched

I have a WiX script that creates an installer that lays down an application in Microsoft Windows 7 and 10 machines silently. There are no options so there is no need for a GUI.
Some of the clients are complaining that when they launch the installed application (long after it was successfully installed), Windows pop-ups up the MSI installer message "Please wait while Windows configures [APPLICATION_NAME]". They say this happens every time and it runs for about as long as it originally took to install.
I used to get this a whole lot more and thought that it was because some of the installed files had been modified. I concluded that when the MSI ran the second and subsequent times it was overwriting the modified files with the original ones from the installer.
Since these files were intended to be modified after install, I added 'NeverOverwrite="yes"' to their Component definition as in:
<Component Id="..." NeverOverwrite="yes" Directory="..." Guid="...">
This seemed to solve the problem until now. Any ideas what I should be looking at or investigating further?
Short Answer: This is an MSI self-repair problem.
Work out what component triggers the self-repair. Details below.
Correct the situation by making changes to the setup eliminating the conflict situation.
Self-Repair: This is the classic "unexpected self-repair" issue often seen with MSI packages when certain conditions are met. I have written about this issue so many times that I will recycle some answers. I think the most accessible answers might be these two (please read at least the first link):
Visual Studio 2015 msi build initiates another installation
Why does the MSI installer reconfigure if I delete a file?
Debugging Using Event Log: To determine what MSI component triggered the self-repair you need to debug by inspecting the Event Log. This is described by Stefan Kruger's FAQ entry: Windows Installer launches unexpectedly, for no obvious reason. Alternatively read Flexera's Article: Understanding Windows Installer (MSI) Self-Repair (features nice screen shots).
Components & Products: When you have an offending component GUID, you can determine what product it belongs to by running this VBScript: Look Up Products for Component. It could be another product - if not just open your product's MSI file and find the component's key path.
Full Details: And the very in-depth answers with full explanations. Try the bolded third link for practical issues:
Self-repair - explained
Self-repair - finding real-world solutions
Self-repair - how to avoid it in your own package
Other Resources:
What is the use of Repair option in a msi installer and what does it really do (internally)?

Visual Studio Installer Projects for 2013 -- can't uninstall a program on Windows 8.1

I'm trying to use this Visual Studio extension for 2013, which recreates the built-in installer functionality from Visual Studio 2008/2010: http://blogs.msdn.com/b/visualstudio/archive/2014/04/17/visual-studio-installer-projects-extension.aspx?CommentPosted=true&PageIndex=2#comments
It works, allowing me to edit the project as before. It has the install and uninstall commands when right-clicking the install project, too. It installs fine.
When I try to uninstall, though, I get the following error and then the uninstall rolls back:
Could not open key: HKEY_LOCAL_MACHINE32\SOFTWARE\Wow6432Node\Microsoft\
EAPSIMMethods\18\FastReauthContext. Verify that you have sufficient
access to that key, or contact your support personnel.
I am not doing anything with that registry key, and there don't seem to be any relevant results on google-- at least not in the normal top 5 pages. Does anyone know what causes this or how I can fix it?
While I am not able to uninstall, I am able to increment the version of the package and allow it to remove the previous install and install the new version (all at once) successfully.
I am using Windows 8.1 Pro 64 bit, the projects are compiled for <AnyCPU>, and the installer is configured for x86.
EDIT I am running Visual Studio as Admin. When uninstalling from the Control Panel, I am also clicking the 'allow' button in the UAC dialog window that pops up.
I know how to give myself access to a registry key (permissions). I want to know why this key is trying to be removed. I support this app on several machines and I don't want to have worry about remembering an uninstall hack in the future.
EDIT This only seems to be an issue for a 32x installer on a 64x OS or a Windows 8 issue. I was able to use the same 32x installer to successfully uninstall the app on a 32x Windows 7 machine.
This must be an environmental problem, that key doesn't have anything to do with installers. EAP-SIM is an authentication protocol for wireless networks. The FastReauthContext key almost surely was meant to avoid having to provide a username+password each time your machine reconnects to the network. Which makes the registry key content very sensitive of course, it can only be read by a service that runs with the System account.
So, something goofy going on with your networking setup. Verify that you can successfully reconnect to such a network. If you used a VPN before then make sure it is active again. Something like this. Update your question with anything that might be relevant to networking when you first installed the app.
I have had similar problem and what I found out this is caused by MSI attempting to delete whole "Software\Microsoft" section in the registry. Lucky you that it encounters this error and rolls everything back.
So the solution is the following:
Since you have installed your program whenever you try to uninstall it the system will run msi from cache that is usually located C:\Windows\Installer.
Find your package in the cache. Here is an article that may help you http://csi-windows.com/blog/all/27-csi-news-general/334-identifying-cached-msi-packages-in-cwindowsinstaller-without-opening-them
Open the package in Orca. You must do this as administrator.
Go to Registry table and find record with "Software\Microsoft" as a key. Most likely the Name column will contain either "-" or "*" value. This means that during uninstall MSI will try to delete whole "Software\Microsoft".
Either change the Name value to empty or "+" or try to change key to something like "Microsoft". The second option will cause that installer will not find the key to delete during uninstall, but it will skip this error and let you uninstall your program.
You installed an untested installer on your dev machine? Speaking from experience, don't do that! Snapshotted VM's are cheap and will save you from this sort of pain.
Visual Studio Deployment Projects (or VSI as it's now called ) is known for creating very poor quality installs. The combination of those two put you where you are today.
I would need to look at the full uninstall log and your MSI using ORCA to understand exactly what is going on. MSI Zap and a manual cleanup of resources is probably required at this point.

An installed program's "windows Installer" comes out when I launch a different application

When I launch an application, a windows installer from a previously installed program keeps popping up. The program still exeists in the Server and it's working fine. The installer popup, after clicking "cancel" will eventually dissapear.
I'm not interested in solving this problem, I'm just wondering how does the windows installer decides what to install? I mean to say, what's the mechanism? How and who triggers the windows installer?
Thanks for any reply!
This is the self-repair mechanism triggered automatically by the OS. Along with the above enumerated reasons it can also be triggered if:
A feature having been installed as advertised/install on first use/install when required
Files inappropriately shared between components, features, or products, which can lead to the resource being uninstalled while a product is still using it
A product with per-user data having been installed on a multi-user system by one user and then launched by another user
To investigate the resource whose absence triggers self-repair, look in the Application section of the system's event log. Self-repair events are displayed with source "MsiInstaller".
If the installer is indeed trying to add a resource required by another application the best solution would be to let it finish, and it should no longer appear after that.
Usually this behaviour appears when one of the following is true:
the install process was not completed successfuly
the registry entries for this program were deleted / corrupted
(not finding an appropriate registry entry is a trigger)
the install program's updatemanager was corrupted / disconfigured / cancelled on the previous run
The solution usually is to completely uninstall the program, to check that all folders and registry entries were indeed removed and then to re-install the program.

why does windows installer start up everytime i start up visual basic 6

it starts up windows installer with random applications on my machine . . after i click cancel a few times, it loads vb6 fine.
any ideas why this is happening?
To stop this behavior:
Start VB6
Open the Add-Ins dialog
Uncheck the "Visual Component Manager" Add-In
Source:
After VS2010, SP1, VB6 launches VS2010 installer
This is what a Windows Installer repair looks like. It means that something is broken in one of the installed products on your system. Ideally it's a one-off repair so you might be better off letting it runs its course and do the repair, except of course if it asks for a install CD that you don't have.
The Windows event log (Application) will have MsiInstaller entries saying what product and component has the problem.
It's possible a previous installation has not completed correctly.
Use the utility at the following link to remove any rogue installations files:
http://support.microsoft.com/kb/290301 (broken link Aug.2017, leaving URL for "historical purposes").
As PhilDW has pointed out this is a Windows Installer Self-Repair issue, and can often be resolved by allowing the self-repair to complete once. At other times the problem persists and it should be fixed by other means. Even when the self-repair completes and the problem goes away, it can still resurface once you launch the conflicting application. Windows Installer is not easy to deal with.
In your particular case you might be able to get away with a "workaround" rather than a fix. By locating the main VB6 EXE file on disk (in its main installation directory) and manually creating a shortcut to it on your desktop, you might be able to successfully launch VB6 via this new shortcut without the self-repair kicking in. It might be worth a try.
This shortcut trick will not remove the underlying problem, but might help to "bypass it". Just for the record: the reason this might work is that the new, manually created shortcut is not "advertised" and will not trigger a key-path check of the installed product when launched. This is Windows Installer's way to verify that a product is correctly installed. Note that even if the workaround works, self-repair might still result during application use because of faulty COM data being detected (which is very likely the cause of the whole problem you are seeing, but give the manually created shortcut a try).
There is a rather comprehensive "article" on self-repair here: How can I determine what causes repeated Windows Installer self-repair? which might help to track down the cause of the self-repair kicking off in the first place, but fixing it can be a rather complicated process (so try the workaround first). It is a long article because there are so many different ways self-repair can occur. The common denominator is that different installers on your system are fighting over a shared setting that they keep updating with their own values on each application launch in an endless loop. The last application to launch will overwrite the registry or file system with its own setting.
This worked for me, for VS2010 RC:
"Please wait while windows configures Microsoft Visual studio 2010 Ultimate."
THe work around that fixes the issue for me was to run the following via the admin cmd prompt.
Md "%ProgramFiles(x86)%\Microsoft Visual Studio 10.0\common7\IDE\FromGAC"
from http://social.msdn.microsoft.com/Forums/en-SG/vsprereleaseannouncements/thread/572a0f8a-16b0-4e1d-b581-16be36a9b564
This was also happned to me.
Whenever i tried to open vb6, it started windows installer to configure "Autocad".
Autocad had not broken. and it was working fine.
I tried removing and reinstalling Windows Installer, But it did not solved the issue.
Then i installed Microsoft's "Windows Installer Clean Up Utility 2" from given link.
Using this utility i removed the autocad from "Windows Installers" Database.
After that VB6 never started installer again.
Keep in mind 'removing any entry from installer's database may be risky, but i had no choice. So do it on your own risk.
Download "Windows Installer Clean Up Utility 2" (this is a deprecated, unsupported and unsafe tool to use - Aug.2017. I will leave the link in for "historical purposes", don't use it).

Resources