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

Passing Serial Number via Command Line

574 views
Skip to first unread message

Lane Gustafson

unread,
Jan 24, 2002, 5:09:17 PM1/24/02
to
I need to be able to pass a serial number through the
MSIExec.exe command line. How do I do this?

My command line:
msiexec.exe /i myapp.msi SERIALNUM=%Prompt% /qr

Where SERIALNUM is the PROPERTY that the application uses
for the serial number.

This doesn't work. Because anything the user puts into the
%PROMPT% variable dialog box is validated as good, and the
install runs.

The MSI when run by itself does have a dialog box asking
for serial number and validates it. I want a silent
install, the user sees none of the usual MSI dialog boxes,
only my one PROMPT box asking for the serial number.

Any help would be appreciated.
Thanks
Lane Gustafson
remove nospam

Torgeir Bakken

unread,
Jan 24, 2002, 5:41:58 PM1/24/02
to
Hi

I don't know if /qr is the right parameter to use in this case, try e.g. qb-
instead. If that doesn't work, I guess the msi package doesn't define SERIALNUM
as a public propery. Is it documented that you can use this property on the
command line?

Public Properties:
http://msdn.microsoft.com/library/en-us/msi/prop_0ylv.asp

--
torgeir

Lane Gustafson

unread,
Jan 25, 2002, 9:50:34 AM1/25/02
to
It is not a Public property declared by MS, but by the MSI
writer/creator. I understood this to be permissable. Maybe
only MS declared public properties can be accessed through
the command line.

>.
>

Torgeir Bakken

unread,
Jan 25, 2002, 12:16:31 PM1/25/02
to
No, the MSI writer/creator can declare it: From the documentation: "Public
properties can be authored into the database".

My question was if the documentation that comes with your pacage specifies that
the SERIALNUM property _is_ a public property/can be used from the command line.

Did you try the qb- option?

Rich

unread,
Jan 25, 2002, 3:24:40 PM1/25/02
to
[Please do not mail me a copy of your followup]

"Lane Gustafson" <lane.g.g...@NOSPAMboeing.com> spake the secret code
<c13e01c1a5af$a473d900$a4e62ecf@tkmsftngxa06> thusly:

>It is not a Public property declared by MS, but by the MSI
>writer/creator. I understood this to be permissable. Maybe
>only MS declared public properties can be accessed through
>the command line.

There seems to be some confusion here about public properties and the
command line. A property is public if its name contains no lower case
letters (it may still contain digits and underscores). Any public
property can be set from the command-line with an argument of the
form '<property>=<value>'.
--
Ask me about my upcoming book on Direct3D from Addison-Wesley!
Direct3D Book http://www.xmission.com/~legalize/book/
Don't Support Spammers! Boycott Fractal Painter 7!
http://www.xmission.com/~legalize/spammers.html

Mark Richards

unread,
Jan 25, 2002, 6:12:59 PM1/25/02
to

You are bypassing the InstallUISequence and going directly to the
InstallExecuteSequence, which:
1) doesn't check the license, or
2) does, but the public property is not listed under
SecureCustomProperties, so its value does not get passed on from the
original command line to the command line of the process under which
InstallExecuteSequence runs.
Getting a verbose log of an install will reveal this.
Mark

"Lane Gustafson" <lane.g.g...@NOSPAMboeing.com> wrote in message
news:c13e01c1a5af$a473d900$a4e62ecf@tkmsftngxa06...

0 new messages