After a program was installed by an admin user, different users with no admin rights experience the following problem with their logins to the same computer.
At the
I have added some tags to the question, most notably for sql-server-express.
Chances are users familiar with this tool will know outright what the problem really is.
Try to manually create a shortcut on the user's desktop to launch the application in question. Do so for both users - and don't launch the pre-existing shortcut to the application (it will trigger the repair operation we are trying to avoid).
There is a chance this will eliminate the whole problem in a fashion that is acceptable. However, there is one question: is there anything user-specific about the SQL connection string? Does it contain a user name that should change from user to user? Can we see the actual connection string?
What you are seeing is most likely a Windows Installer self-repair issue. They can be quite involved to fix reliably. There is almost certainly a rather nasty error in the deployment package that triggers this problem.
Self-repair is complicated, I think a step-by-step debugging approach might be more effective than a comprehensive explanation:
Find the trigger of the self-repair as described here: Windows Installer launches unexpectedly, for no obvious reason.
Make note of the GUID that follows: "Detection of product" in the event log as described in the article above. Sample GUID: {A54DCC30-E1EA-4912-A7F9-6C5A3AF1FB3A} (for IIS 10.0 Express - just a sample, your GUID will be different obviously).
Now run the following PowerShell command to determine what the product name is for the product code you found in the event log, and to find the local cache MSI package that ran the original install. Replace the GUID below with your GUID (to launch PowerShell: hold down the Windows key, tap R, release the Windows key, type in "powershell" and press OK or hit enter). The IdentifyingNumber is WMI's way to refer to a product code, so put your own product GUID in that location.
gwmi -Query "SELECT Name,LocalPackage FROM Win32_Product WHERE
IdentifyingNumber='{A54DCC30-E1EA-4912-A7F9-6C5A3AF1FB3A}'" | Format-Table Name,
LocalPackage
Preferred option: copy the file specified by "LocalPackage" and upload it somewhere where we can access it and let us know. There is an error in the package that needs to be sorted out (might not be easy). Don't touch anything inside %SystemDrive%\Windows\Installer\*.* - this is a "super hidden" folder that is not to be messed with at all. Only read-only actions in there. Very important.
Alternatively: get hold of a tool to view MSI files and do the checking yourself. It requires some MSI knowledge.
Orca-x86_en-us.msi and install it - this is Microsoft's own, official MSI viewer and editor. After install you can find Orca in the start menu.Most likely you are seeing a Windows Installer self-repair. This occurs when the system has detected that an installation is incomplete in one way or another. In many cases the problem goes away if you let the installer complete its "repair", but in some cases there is an error in the installer package itself that causes problems along the lines of what you describe.
This is a complicated topic, and I have described how to debug self-repair issues many times, most recently here: some computers, the "Windows Installer" is retrieved again from the C # program that was loaded when the program was run.
For future reference I include some links on the topic of Windows Installer self-repair or "resiliency":
Basically you cannot install a KeyPath registry item that is going to be changed by the user, for the simple reason that Windows Installer will believe it is broken and repair it.
The simplest cure is to give that component (in your WiX) a null component ID. As the documentation her says, under ComponentId:
https://msdn.microsoft.com/en-us/library/windows/desktop/aa368007(v=vs.85).aspx
a component with a null id is not registered and not subject to repair.
You should also verify what the actual missing component is by looking at the Windows Event log, Application, and look for MsiInstaller entries that will refer to the broken or missing component. There might really be another component that appears to be broken, such as another file or registry entry. If this is the case then the repair of the HKLM registry item could be a downstream effect because when a component is repaired Windows will repair and reinstall the entire feature, and that could include the HKLM entry. Either way, it is not safe to have an HKLM entry (registered with MSI) that can be altered because there are other scenarios (such as repair from Programs&Features or right click the MSI file) that could rewrite the registry entry. However the main point is that a repair will replace that registry entry.