Solved

MSIEXEC not executing working script at CustomAction point

Posted on 2008-06-23
4
1,074 Views
Last Modified: 2013-11-26
Hi Folks,

I have a need to install multiple packages, each wrapped in .MSI files.  I could create a batch file that executes each from CD but would prefer to use a single .MSI file to install all three.  My understanding was that I could add the three .MSI files into the application folders then run a Custom Action (after commit), in this case a .vbs that executes MSIExec, to silently install the apps.

The issue I'm having, however, is that while the script runs - I've tested with displaying a msgbox - the MSIEXEC command does nothing at all.  The file extracts into the correct folder and the script is also there.  I've tried logging outputs, etc, but it just seems to do nothing.  I ought to mention as well that outside of the MSI wrapper the script runs as expected.  The script is as follows:

Help would be appreciated.

Thanks,

Jes
option explicit
on error resume next
Dim WshShell
Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.Run "msiexec /i ""TestApplicationForInstall_MSI.msi"" /qf"

Open in new window

0
Comment
Question by:JesGoth
4 Comments
 
LVL 40

Accepted Solution

by:
Vadim Rapp earned 200 total points
ID: 21846768
> I could add the three .MSI files into the application folders then run a Custom Action

It's bad idea. See http:Q_23498090.html for details.

As for vbscript, I would specify full path to the msi file in WshShell.Run  . You can run filemon (from sysinternals.com) to see if your msi file is actually opened.
0
 
LVL 16

Assisted Solution

by:ThinkPaper
ThinkPaper earned 150 total points
ID: 21876828
in addition to vadimrapp1's comments, when running this line, eliminate the /qf switch and run a test on your machine. Does it pop up the install on your machine?

WshShell.Run "msiexec /i ""\\server\install\TestApplicationForInstall_MSI.msi"" "

0
 
LVL 2

Assisted Solution

by:smilingpolitely
smilingpolitely earned 150 total points
ID: 21882868
The simple answer is that you can't run a nested MSI in that way.  The only way to run a nested Windows Installer package is using Custom Actions 7, 23 or 39.  Otherwise, the second installer sees another install is in process and fails.

Not only that, these features have been deprecated from the Windows Installer API.  

http://msdn.microsoft.com/en-us/library/aa368010(VS.85).aspx
0
 

Author Closing Comment

by:JesGoth
ID: 31469749
Thanks to all, hope you're happy with me splitting the points.
0

Featured Post

MIM Survival Guide for Service Desk Managers

Major incidents can send mastered service desk processes into disorder. Systems and tools produce the data needed to resolve these incidents, but your challenge is getting that information to the right people fast. Check out the Survival Guide and begin bringing order to chaos.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Add a Condition in ASP Repeater 6 47
JSON Deserialize issue 6 40
ASP.NET on IIS website not sending PDF file anymore ? [IzillaFramework Cognition] 6 52
Visual Studio npm 1 29
In my previous article (http://www.experts-exchange.com/Programming/Languages/.NET/.NET_Framework_3.x/A_4362-Serialization-in-NET-1.html) we saw the basics of serialization and how types/objects can be serialized to Binary format. In this blog we wi…
With User Account Control (UAC) enabled in Windows 7, one needs to open an elevated Command Prompt in order to run scripts under administrative privileges. Although the elevated Command Prompt accomplishes the task, the question How to run as script…

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question