Using Command line parameters or using public properties

Got a problem you cannot solve? Try here.
Ton_B
Posts: 115
Joined: Wed Nov 16, 2005 8:34 am
Location: Netherlands
Contact:

Using Command line parameters or using public properties

Postby Ton_B » Fri Jan 13, 2006 10:28 am

In addition to the topic Push Installs from Group Policy i have a question:

I'm trying to make one single Msi file, for both normal as silend mode.
reading the topic, the answer is clear, it is not possible to use one msi-file for both types of setups.

Searching for an alternative, i came across the option of using command line parameters. The question is simple:

Can I parse a variable to an msi file, and then let the unpacked executable use that variable?

ór

If I set an Public property in the commandline of the msi, like this:
c:\\msifiles\\testsetup.msi MSIMODE="silent"

can I use that property in the executable ?

MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Postby MichaelNesmith » Fri Jan 13, 2006 2:26 pm

Hi Ton

Not with the pre-built MSI that the wizard creates. But you can easily customize that MSI using Orca (or another text editor) to achieve your means. For instance looking at the Property table reveals the command line you specify in the wizard.

I'll try to find you an example of an easy customization that can be done here...
Michael Nesmith
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/

MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Postby MichaelNesmith » Fri Jan 13, 2006 4:05 pm

Hi

I've found a pretty convenient solution to this.

First, in Orca, set the CMDLINE property in the Property table inside the MSI to a space. This sets an empty property value without deleting the CMDLINE property that is required.

Running the MSI in this state opens the installer normally. It can therefore be used by end-users.

Next, if an unattended install is required, just specify the CMDLINE property from the command line. For instance:

Code: Select all

msiexec /i mypackage.msi CMDLINE="/s"


This will pass the value inside the double quotes into the InstallAware program. You may pass whatever custom values you would like in this way.

So you may build a single MSI which both end-users and sysadmins can use.
Michael Nesmith

InstallAware

Home of The Next Generation MSI Installer

Get your free copy today - http://www.installaware.com/

Gareth Owen
Posts: 149
Joined: Fri Oct 21, 2005 8:42 am
Location: UK

Postby Gareth Owen » Fri Jan 13, 2006 4:19 pm

Any chance we can use this same method to allow the sysadmin to specify the install directory :D

Or other IA variables

MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Postby MichaelNesmith » Fri Jan 13, 2006 7:24 pm

Oh yes, you can use any InstallAware variables in the command line.
Just put everything inside the CMDLINE="..." block.
Michael Nesmith

InstallAware

Home of The Next Generation MSI Installer

Get your free copy today - http://www.installaware.com/

Ton_B
Posts: 115
Joined: Wed Nov 16, 2005 8:34 am
Location: Netherlands
Contact:

Postby Ton_B » Tue Jan 17, 2006 4:48 pm

I tried to find a download site for downloading only the Orca program.
But Microsoft only provides this program in the SDK package.

Unfortuanally my laptop has some trouble installing this package......

Does someone know a site where to download just the Orca program?

Thanx.

Ton.

MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Postby MichaelNesmith » Tue Jan 17, 2006 4:54 pm

How about here :)

File Attached:

Orca.Msi
Michael Nesmith

InstallAware

Home of The Next Generation MSI Installer

Get your free copy today - http://www.installaware.com/

Ton_B
Posts: 115
Joined: Wed Nov 16, 2005 8:34 am
Location: Netherlands
Contact:

Postby Ton_B » Tue Jan 24, 2006 7:10 am

Thanx Michael!

That works great!
Simply add the CMDLINE to the database.

One question thought.

is it possible to change the value of the CMDLINE when the msi is called using the command line param. "/quiet" to "/s" ?

So if I want to run silently i do not have to start the installer using the command line :

Code: Select all

msiexec /i mypackage.msi CMDLINE="/s"

but simply :

Code: Select all

msiexec /i mypackage.msi /quiet


Or if this is not possible create my own command line parameter /s ?
If I try to start the msi like this:

Code: Select all

msiexec /i mypackage.msi /s
Windows shows a popup-screen showing all of the available command-line params.

MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Postby MichaelNesmith » Tue Jan 24, 2006 8:38 am

No, sorry that is not possible. Before InstallAware is involved, we need to supply command line parameters in the exact format that MSI expects them in.
Michael Nesmith

InstallAware

Home of The Next Generation MSI Installer

Get your free copy today - http://www.installaware.com/

Ton_B
Posts: 115
Joined: Wed Nov 16, 2005 8:34 am
Location: Netherlands
Contact:

Postby Ton_B » Tue Jan 24, 2006 9:00 am

Ok, thanx.

Maybe a nice feature for a next version of installaware ?
It seems to be a "hot" item to create just one msi for Active directory installing ánd normal installation.

It would be great if you could run the msi file in the "/quiet" mode, and that installaware will do the same!

Ton.

CandiceJones
Posts: 904
Joined: Thu Dec 22, 2005 7:03 pm
Contact:

Postby CandiceJones » Tue Jan 24, 2006 9:36 am

Hi Ton!

I'll be sure to forward your request to the product team!
Candice Jones
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/

Ton_B
Posts: 115
Joined: Wed Nov 16, 2005 8:34 am
Location: Netherlands
Contact:

Postby Ton_B » Wed Jan 25, 2006 3:01 am

Here I am again.....

Still looking for an answer, I was surfing the internet..
I saw it is possible to create custom functions within the MSI database.
allthought I could not find any usefull examples (most scripts are for Installshield only) I wonder if you could help me out. ?

I've read about something using vbscript to read out various setting and properties. see: http://www.installsite.org/


Return to “Technical Support”

Who is online

Users browsing this forum: No registered users and 128 guests