cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
pbsdis
Level 6

How to get commandline inputs?

Hi,

I would like to create a log file to contain some information like when (date & time) the install starts and finishes, what commandline is invoked (e.g. setup.exe /v"bla bla bla")

Is there any existing properties I can use to retrieve the information? I am planning to use VBS.


Thanks
Labels (1)
0 Kudos
(4) Replies
pbsdis
Level 6

InstallScript project has 'CMDLINE' for that, is there any equivalent for Basic MSI project?
0 Kudos
Johannes_T
Level 6

The documentation states:
"In Basic MSI projects, you can pass public properties through Setup.exe to Msiexec.exe using the /v command-line argument. "
0 Kudos
Tim_Mayert
Level 9

But can you get the entire cmdline value?

We have a property in our property table set with a default value and during install we want to check to see if the admin has set that property on the command line. If they did then we will use that value. If it was not passed on the command line then then we use App Search to see if the registry key, that holds this value, has already been set. If it exists we use that value. but if these do not exist then we use the default value.

Now we could have 3 properties:
1. The Admin property that gets pushed in
2. The property that gets set if the key resided in the registry
3. The default property

Then we could have 3 custom actions that will then set the final property that will then get registered.

So we can get rid of some of this if we can simply read the cmdline to see if the property we want is listed on the cmdline and then just use it.

So if we can get the command line then that may help here.

Thanks,
0 Kudos
Johannes_T
Level 6

Hi Tim,
as far as I know (and I googled a lot), you have the following options depending on the project type:

Installscript: Use CMDLINE to acces the whole command line
Installscipt MSI: Pass variables with
setup.exe /z”arg1=value1 arg2=value2 arg3=value3″
Basic MSI: You can only set properties with
setup.exe /v"PROP=DATA"
I don't know of any way to access the whole command line in Basic MSI.

HTH,
Johannes
0 Kudos