Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

Setup.exe Command Line


6 replies to this topic

DeanNapper

DeanNapper
  • Full Members
  • 6 posts

Posted 28 July 2005 - 17:12

Using the /v command line option of Setup.exe, it's possible to pass parameters to the MSI file it launches.

Now, I can do this:

msiexec /i "Test.msi" USERNAME="John Smith" SERIALNO="1123"

If I try to do this using Setup.exe it doesn't work e.g.

Setup /v"USERNAME=John Smith SERIALNO=1123"

I have tried the following, but again this does not work:

Setup /vUSERNAME="John Smith" SERIALNO="1123"

And even:

Setup /v"USERNAME="John Smith" SERIALNO="1123""

Please let me know how I can pass multiple properties which contain spaces to setup.exe.

Edited by DeanNapper, 28 July 2005 - 17:13.


finding_this_difficult

finding_this_difficult
  • Members
  • 21 posts

Posted 28 July 2005 - 17:21

From "Running Installations in Silent Mode"

If your release settings include Setup.exe, you can run the command Setup.exe /s /v"/qn".

So, I think if you weren't including the .exe and within the " " is where you would set your variables to their values. "/qn MYVAR=myVAlue"

Hope that helps.



Zweitze

Zweitze
  • Full Members
  • 522 posts

Posted 28 July 2005 - 21:00

I don't think this is possible.

I suspect that Setup.exe checks the installed MSI version, and then executes the command
MsiExec /i <project.msi> <all params passed at -v>

The command-line interpreter of Windows works like this: The arguments are split, space is the separator character. But, when double quote is encountered, all characters up to the next double quote are considered to be one argument, including the spaces, but the double quotes are removed.
Unfortunately there is no escape character for double quotes.

As a result, when Setup.exe starts the MsiExec.exe, it passes a command-line without double quotes, because it did not know about them.

An alternative is putting these parameters in Setup.ini.
Or create a CA that checks USERNAME, replacing every ~ with a space. Users could then do
Setup /v"USERNAME=John~Smith SERIALNO=1123"

finding_this_difficult

finding_this_difficult
  • Members
  • 21 posts

Posted 28 July 2005 - 21:43

You can if you use the escape character \ when you need the quote.

so for example:

setup.exe /s /v" /qn USERNAME=\"John Smith\" SERIALNO=\"1123\""

- A

Edited by finding_this_difficult, 28 July 2005 - 21:43.


DeanNapper

DeanNapper
  • Full Members
  • 6 posts

Posted 29 July 2005 - 13:16

QUOTE (finding_this_difficult @ 2005-07-28 21:43)
You can if you use the escape character \ when you need the quote.

so for example:

setup.exe /s /v" /qn USERNAME=\"John Smith\" SERIALNO=\"1123\""

- A

Works a treat! Thank you kindly for your help!

This site is yet to let me down!! biggrin.gif

suresh.m

suresh.m
  • Members
  • 1 posts

Posted 08 August 2005 - 20:51

Hi,
I am trying to do the same thing, pass in multiple parameters to msi from setup.exe. In setup.ini file, I call the setup.exe like
run=%EXTRACT_DIR%\setup.exe /s /v"/qn /L installing.log". Its not working, the installer just downloads the install.cab and dies.
Could anyone help me on this?
thanks
Suresh M

pmunsey

pmunsey
  • Members
  • 3 posts

Posted 16 September 2005 - 17:33

Multiple /v options can work too. For example:

setup.exe /v"/L* inst.log" /vUSERNAME=ME