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: basic msi installer question
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
‎May 15, 2012
02:02 PM
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;
begin
GetEnvVar ("WINDIR", svEnvVar);
szApp = svEnvVar + "\\system32\\msiexec.exe";
szCmdLine = "/qn /uninstall {MYGUID}";
LaunchAppAndWait(szApp, szCmdLine, LAAW_OPTION_WAIT |
LAAW_OPTION_SHOW_HOURGLASS);
MessageBox(szApp, INFORMATION);
MessageBox(szCmdLine, INFORMATION);
end;
The values in the message box print outs are as follows:
"c:\WINDOWS\system32\msiexec.exe"
and
"/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
function Uninstall_MyApp(hMSI)
string szApp, szCmdLine, svEnvVar;
begin
GetEnvVar ("WINDIR", svEnvVar);
szApp = svEnvVar + "\\system32\\msiexec.exe";
szCmdLine = "/qn /uninstall {MYGUID}";
LaunchAppAndWait(szApp, szCmdLine, LAAW_OPTION_WAIT |
LAAW_OPTION_SHOW_HOURGLASS);
MessageBox(szApp, INFORMATION);
MessageBox(szCmdLine, INFORMATION);
end;
The values in the message box print outs are as follows:
"c:\WINDOWS\system32\msiexec.exe"
and
"/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
(3) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 15, 2012
02:50 PM
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 ===
=== 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 ===
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 15, 2012
02:55 PM
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.
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.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 21, 2012
02:33 PM
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.
Uninstall handled automatically when your wrapper or parent msi is removed.
![](/skins/images/8C9D13A71C7F7695F3262372C0172D68/responsive_peak/images/icon_anonymous_message.png)