Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

passing arguments to msi file from setup.exe

619 views
Skip to first unread message

vizagboy

unread,
Jul 25, 2008, 12:25:00 AM7/25/08
to
I have a setup.exe and a msi file. The setup.exe invokes the msi. Want to
install msi in silent mode but wanted to know how to pass the silent install
flag from the setup.exe to the msi. Any suggestions? (msi is built with
Visual Studio Setup and Deployment and used IExpress to merge msi and exe)

Sebastian Brand

unread,
Jul 25, 2008, 7:47:05 AM7/25/08
to
On 25 Jul., 06:25, vizagboy <vizag...@discussions.microsoft.com>
wrote:

IExpress can pass parameters to the invoked msi by using the /c:" "
parameter. See http://support.microsoft.com/kb/197147 for details


Best regards,
Sebastian Brand

Instyler Software - http://www.instyler.com

Jeff Henkels

unread,
Jul 25, 2008, 7:43:37 AM7/25/08
to
http://msdn.microsoft.com/en-us/library/aa372024.aspx describes the standard
command line options for msiexec. If you're executing the MSI via
ShellExecute or something similar, the flags should work.

If you're using the MSI API, take a look at the MsiSetInternalUI function;
the INSTALLUILEVEL_NONE flag should be of interest.

"vizagboy" <viza...@discussions.microsoft.com> wrote in message
news:0B1BD9AB-672A-4609...@microsoft.com...

vizagboy

unread,
Jul 28, 2008, 12:22:01 PM7/28/08
to

The descriptions are not very clear. msiexec takes /quiet as the option and
we can pass /c option to iexpress exe. Can you elaborate more on the usage
please?

Phil Wilson

unread,
Jul 28, 2008, 3:58:45 PM7/28/08
to
If you're using Visual Studio setup projects then this is really a questionm
about whether their setup.exe bootstrapper has a silent install mode, and I
don't believe it does. If you're not using it to install prerequisites,
then you don't need it at all and you can write your own small program or
something to install with the silent msiexec command line.

--
Phil Wilson
Definitive Guide to Windows Installer
http://www.apress.com/book/view/1590592972


"vizagboy" <viza...@discussions.microsoft.com> wrote in message
news:0B1BD9AB-672A-4609...@microsoft.com...

vizagboy

unread,
Jul 29, 2008, 10:13:02 AM7/29/08
to

we are using Visual studio setup project and have a setup.exe to install the
prerequisites. what other options are available besides the bootstrapper?

vizagboy

unread,
Jul 29, 2008, 10:51:00 AM7/29/08
to
To add, we also use IExpress as the bootstrapper to package the setup.exe
consisting of prerequisites and the msi. I am looking for passing the silent
option from the bootstrapper generated exe to the the setup.exe consisting of
prereqs and then to the msi file so that the entire installation takes places
in silent mode.

Phil Wilson

unread,
Jul 29, 2008, 1:30:55 PM7/29/08
to
I uinderstand the issue. This is really a Visual Studio question about
whether you can get their setup.exe bootstrapper to install the MSI
silently. I suggest you look at bootstrap manifest generator here:

http://www.codeplex.com/bmg

This is basically a tool to make their setup.exe behave differently, and it
may have options for getting the MSI file installed silently.

--
Phil Wilson
Definitive Guide to Windows Installer
http://www.apress.com/book/view/1590592972


"vizagboy" <viza...@discussions.microsoft.com> wrote in message

news:FD6ED478-BC65-4CFA...@microsoft.com...

vizagboy

unread,
Jul 29, 2008, 2:19:02 PM7/29/08
to
i created a bootstrapper exe Test.exe out of setup.exe and temp.msi. I am
able to give this command at prompt: Test.exe /C:"msiexec -i temp.msi /q" and
it is installing in silent mode. i am kinda sure it is not executing the
setup.exe. but not able to check the same in the logs. Just double clicking
the Test.exe, i can see the flow of things in install.log but there is no
install.log when running off the command prompt.

Any suggestions?

Phil Wilson

unread,
Jul 29, 2008, 2:26:49 PM7/29/08
to
Try this with the Visual Studio bootstrapper:

setup.exe /qn.

The VS 2008 setup.exe has a /? option that shows command line options. It
should pass the /qn to the MSI install for a silent install.


--
Phil Wilson
Definitive Guide to Windows Installer
http://www.apress.com/book/view/1590592972


"vizagboy" <viza...@discussions.microsoft.com> wrote in message

news:8E585690-A728-4642...@microsoft.com...

vizagboy

unread,
Jul 29, 2008, 2:38:01 PM7/29/08
to

I am using VS 2005. I meant i created IExpress exe (Test.exe) from VS
generated setup.exe and temp.msi. The only options exe has are /Q, /T, /C
and /C:<cmd>

vizagboy

unread,
Jul 29, 2008, 3:16:02 PM7/29/08
to

Tried running the bootstrapper setup.exe using /qn
if failed with the following error message..
"Using MsiInstallProduct with package path
'C:\madhu\samples\Temp\TestI\TestSSetup1.msi' and command line ' /qn'
MsiInstallProduct returned '1639'
Error: Invalid command line argument. Consult the Windows Installer SDK for
detailed command line help."

Phil Wilson

unread,
Jul 30, 2008, 12:41:00 PM7/30/08
to
I'm referring to the setup.exe bootstrapper, not the exe created by
IExpress. The VS 2005 Setup.exe apparently doesn't process the extra
command line options very well. If you can use VS 2008 for your setup you'll
have better luck. Package your IExpress to include setup.exe and the MSI
file as you are doing, then arrange to run setup.exe /qn. As your original
post says, this appears not to work but that may be because you're using VS
2005. I've seen no issue with VS 2008.

--
Phil Wilson
Definitive Guide to Windows Installer
http://www.apress.com/book/view/1590592972


"vizagboy" <viza...@discussions.microsoft.com> wrote in message

news:30C39DA9-12B9-4BCE...@microsoft.com...

William Leara

unread,
Aug 2, 2008, 11:58:03 PM8/2/08
to

By "command-line", MsiInstallProduct() is talking about public
properties, not parameters like -qn.

As Jeff said:


On Fri, 25 Jul 2008 07:43:37 -0400, "Jeff Henkels"
<je...@mapson.jeffhenkels.com> wrote:
>If you're using the MSI API, take a look at the MsiSetInternalUI function;
>the INSTALLUILEVEL_NONE flag should be of interest.

More here:
http://msdn.microsoft.com/en-us/library/aa370315(VS.85).aspx
"The MsiInstallProduct function displays the user interface with the
current settings and log mode.
You can change user interface settings by using the MsiSetInternalUI,
MsiSetExternalUI, or MsiSetExternalUIRecord functions."

If you can use ShellExecute, that might be easier. Do something like:
ShellExecute(NULL,_T("open"), _T("msiexec.exe"), l_szParams,_T(""),
SW_SHOW );

where l_szParams is something like "-i mypackage.msi -qn".

--William Leara
wle...@hotmail.com

0 new messages