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

how do i use msiexec command line?


4 replies to this topic

hsong3

hsong3
  • Members
  • 89 posts

Posted 04 August 2003 - 22:17

hello

I wanted to run a sample upgrading test after i read "Componet, package, product and upgread codes in windows installer".

For the first setup build, i included a sample text file.
For the second setup build, i included the updated text file and changed the product code. ( and kept the other GUIDs as same as first build)

this attampt created an error message. therefore, i tried to use msiexec command line:

msiexec /i {5CD60601-36F2-416C-8877-7C2DB0014FDE} REINSTALLMODE=vmous REINSTALL=ALL

(i inserted this line in the release entry, which located at the bottom of the field.)

after i compiled this build and ran setup.exe file, i get an error message, "incorrect parameter...."
(NOTE : this is working fine with dos command line prompt)

questions:
1. where do i run this msiexec command line ??
2. i even change the setup.ini, CmdLine, manually. But still fail to execute this.

thank you,
hsong3

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 05 August 2003 - 10:20

In this field you would only enter:
REINSTALLMODE=vmous REINSTALL=ALL
the rest is added automatically at runtime.
Of course this only works if you launch the setup using setup.exe, not by double clicking the .msi file.

Note that you must always change the PackageCode.
The above command line will only work for small and minor updates, i.e. if the ProductCode hasn't changed.

hsong3

hsong3
  • Members
  • 89 posts

Posted 05 August 2003 - 14:31

thank you Stefan.

So for the minor upgrade, i should change the packageCode. .. ^^

I have looked at other people's 'helpful' comments and they have some various thoughts about this : they got me all confused!!!
(someone tells me to change upgrade code and don't change product code,,, others say don't change any of them,, instead, just use upgrade table..)

thank you for clearing these out.

Could you tell me about the usage of upgrade table and how to use it?? (especially some examples of the ActionProperty. it is difficult to fine the samples of this identifier)

thank you,
hsong3



Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 05 August 2003 - 15:09

The Upgrade table is only used for Major Upgrades, i.e. after the ProductCode has changed.
Typically, if all you want to do is automatically remove the old version while installing the new, the action property is not used anywhere else. Just make sure it's unique and in upper case letters. (It can be used to condition some actions, e.g. to display text on a dialog that tells the user that his old version will be uninstalled)
The action property should also be listed in the SecureCustomProperties property, otherwise Windows Installer will block it use if setup is running with elevated reight from a non-admin account.

hsong3

hsong3
  • Members
  • 89 posts

Posted 06 August 2003 - 14:48

thank you Stefan.