Level 6

basic msi installer question

So I created a sample msi project and added an install script method that looks like the following:

function Uninstall_MyApp(hMSI)
string szApp, szCmdLine, svEnvVar;
GetEnvVar ("WINDIR", svEnvVar);

szApp = svEnvVar + "\\system32\\msiexec.exe";
szCmdLine = "/qn /uninstall {MYGUID}";
LaunchAppAndWait(szApp, szCmdLine, LAAW_OPTION_WAIT |
MessageBox(szApp, INFORMATION);
MessageBox(szCmdLine, INFORMATION);


The values in the message box print outs are as follows:


"/qn /uninstall {MYGUID}"

If I cut and paste the output into a command prompt and hit enter it does exactly what I want it to do. I have an old installscript based installer where this also works. What am I doing wrong to have this execute properly in my MSI project. Note that it is actually firing the method or i would not be seeing the printouts
Labels (1)
0 Kudos
3 Replies
Level 6

from my log file:

=== Verbose logging started: 5/15/2012 15:44:25 Build type: SHIP UNICODE 3.01.4001.5512 Calling process: C:\WINDOWS\system32\msiexec.exe ===
MSI (c) (C4:9C) [15:44:25:146]: Resetting cached policy values
MSI (c) (C4:9C) [15:44:25:146]: Machine policy value 'Debug' is 0
MSI (c) (C4:9C) [15:44:25:146]: ******* RunEngine:
******* Product: {MYGUID}
******* Action:
******* CommandLine: **********
MSI (c) (C4:9C) [15:44:25:146]: Client-side and UI is none or basic: Running entire install on the server.
MSI (c) (C4:9C) [15:44:28:146]: Failed to grab execution mutex. System error 258.
MSI (c) (C4:9C) [15:44:28:146]: Cloaking enabled.
MSI (c) (C4:9C) [15:44:28:146]: Attempting to enable all disabled priveleges before calling Install on Server
MSI (c) (C4:9C) [15:44:28:177]: Incrementing counter to disable shutdown. Counter after increment: 0
MSI (c) (C4:9C) [15:44:28:177]: Decrementing counter to disable shutdown. If counter >= 0, shutdown will be denied. Counter after decrement: -1
MSI (c) (C4:9C) [15:44:28:177]: MainEngineThread is returning 1618
=== Verbose logging stopped: 5/15/2012 15:44:28 ===
0 Kudos
Level 6

I would read the white paper on chained msi packages but it appears to no longer be available. The problem appears to be that it cannot call an installer process while one is already occurring. Attempting to move the location in the sequence to see if this alleviates the issue.

edit ** this has not fixed the issue yet. I can call a nested install from a custom action if I schedule it after ExecuteAction in the sequence. But on the ExecuteSequence which is where I am scheduling the removal I get this error. Any advice is appreciated.
0 Kudos
Level 6

Chaining the MSI packages is the way to go for sure. In the releases section click "Chained .msi packages" name it, point it to your msi. Give it the desired properties and ui level and profit.

Uninstall handled automatically when your wrapper or parent msi is removed.
0 Kudos