Reputation: 411
I'm trying to apply an update to an installed application (which is installed multiple times on the machine). As I know the ProductCode of the instance I pass it to the .msi on update.
From code this amounts to:
// Leaving out my set of global parameters (for brevity), instance is first (:I1)
Installer.InstallProduct("FullNameOfMsiFile", @"MSIINSTANCEGUID={GUISDF-F5FD-4333-9D02-F0B72E048AB6} TRANSFORMS="":I1""");
When I try this, I get a InstallerException telling me that "This installation is forbidden by system policy. Contact your system administrator". The program calling the .msi has elevated privileges and can install/update programs fine if no product code is passed.
This also happens when I try to pass the ProductCode on the command line (passing the Product Code with /n). The installation/update works nicely without the ProductCode, so I assume this to be the problem.
I've tried several proposed solutations from the internet, like turning of UCA or looking for some sort of registry key and changing it, without success.
So, why does windows (Win 7 32 bit) explicitly forbid me to pass the Product Code and is there an easy way to fix this?
In any case, if this would only work after a user changing some settings by hand then my nice installer has a serious problem, as it is meant to install/update without any fuss.
Edit to answer question from taffit:
The update is a major upgrade, for each instance a new ProductCode is generated, through the WIX code, so every instance has a own Upgrade Code (which is unique for the instance):
<Property Id="InstanceId" Value="Default"/>
<InstanceTransforms Property="InstanceId">
<Instance Id="I1" ProductCode="*" UpgradeCode="{GUID-2B92-407D-A609-C8DD9A0CF09C}" />
<Instance Id="I2" ProductCode="*" UpgradeCode="{GUID-85B4-4C68-B687-EBE02F282C2D}" />
<!-- further possible instances here, removed for brevity -->
</InstanceTransforms>
The product code is stored for each instance, so when trying the upgrade I know which product code to pass for the instance.
Edit Nr. 2:
The EventLog was not very enlightning, it just has three events which belong to the not working upgrade (one that the msi started, one that a recovery point was created and then one that the installer transaction was stopped, but without saying why)
The log of the .msi just stops with an error code 1625, which means that the system policies reject the installation. I just really don't know what for policies these are and what to do about them.
MSI (c) (78:84) [08:51:46:479]: Machine policy value 'DisableUserInstalls' is 0
MSI (c) (78:84) [08:51:46:530]: Client-side and UI is none or basic: Running entire install on the server.
MSI (c) (78:84) [08:51:46:570]: Grabbed execution mutex.
MSI (c) (78:84) [08:51:47:083]: Cloaking enabled.
MSI (c) (78:84) [08:51:47:120]: Attempting to enable all disabled privileges before calling Install on Server
MSI (c) (78:84) [08:51:47:170]: Incrementing counter to disable shutdown. Counter after increment: 0
MSI (s) (B4:4C) [08:51:47:248]: Running installation inside multi-package transaction C:\Program Files\MyProgram\installer.msi
MSI (s) (B4:4C) [08:51:47:295]: Grabbed execution mutex.
MSI (s) (B4:A8) [08:51:47:340]: Resetting cached policy values
MSI (s) (B4:A8) [08:51:47:368]: Machine policy value 'Debug' is 0
MSI (s) (B4:A8) [08:51:47:403]: ******* RunEngine:
******* Product: C:\Program Files\MyProgram\installer.msi
******* Action:
******* CommandLine: **********
MSI (s) (B4:A8) [08:51:47:453]: Machine policy value 'DisableUserInstalls' is 0
MSI (s) (B4:A8) [08:51:47:498]: Machine policy value 'LimitSystemRestoreCheckpointing' is 0
MSI (s) (B4:A8) [08:51:47:561]: Note: 1: 1715 2: MyProgram
MSI (s) (B4:A8) [08:51:47:620]: Calling SRSetRestorePoint API. dwRestorePtType: 0, dwEventType: 102, llSequenceNumber: 0, szDescription: "MyProgram wird installiert".
MSI (s) (B4:A8) [08:52:07:257]: The call to SRSetRestorePoint API succeeded. Returned status: 0, llSequenceNumber: 14.
MSI (s) (B4:A8) [08:52:07:497]: MainEngineThread is returning 1625
MSI (s) (B4:4C) [08:52:07:587]: Calling SRSetRestorePoint API. dwRestorePtType: 13, dwEventType: 103, llSequenceNumber: 14, szDescription: "".
MSI (s) (B4:4C) [08:52:07:763]: The call to SRSetRestorePoint API succeeded. Returned status: 0.
MSI (s) (B4:4C) [08:52:07:863]: User policy value 'DisableRollback' is 0
MSI (s) (B4:4C) [08:52:07:944]: Machine policy value 'DisableRollback' is 0
MSI (s) (B4:4C) [08:52:08:045]: Incrementing counter to disable shutdown. Counter after increment: 0
MSI (s) (B4:4C) [08:52:08:195]: Note: 1: 1402 2: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Installer\Rollback\Scripts 3: 2
MSI (s) (B4:4C) [08:52:08:262]: Note: 1: 1402 2: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Installer\Rollback\Scripts 3: 2
MSI (s) (B4:4C) [08:52:08:330]: Note: 1: 1402 2: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Installer\InProgress 3: 2
MSI (s) (B4:4C) [08:52:08:443]: Note: 1: 1402 2: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Installer\InProgress 3: 2
MSI (s) (B4:4C) [08:52:08:627]: Decrementing counter to disable shutdown. If counter >= 0, shutdown will be denied. Counter after decrement: -1
MSI (s) (B4:4C) [08:52:08:720]: Restoring environment variables
MSI (c) (78:84) [08:52:08:871]: Decrementing counter to disable shutdown. If counter >= 0, shutdown will be denied. Counter after decrement: -1
MSI (c) (78:84) [08:52:08:936]: MainEngineThread is returning 1625
=== Verbose logging stopped: 28.05.2014 08:52:09 ===
Upvotes: 3
Views: 1217
Reputation: 42226
Try to peruse this old thread from the Installshield User Community: http://community.flexerasoftware.com/archive/index.php?t-169856.html or this discussion: Instance Transform incorrect on update
Upvotes: 0