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

About create a MSI?


4 replies to this topic

fanzhengkun

fanzhengkun
  • Members
  • 2 posts

Posted 24 November 2005 - 03:32

I am a newer about windows installer, and I have some questions about creating a MSI file.

I want to write a MSI. And I have another Setup.exe from someone. This setup.exe file will call my msi and passing some arguments to my msi(like directory......,etc). After my msi completion, I must return the installation status to the setup.exe(like success, fail, reboot......).
Can someone tell me how to do this msi ? Is it a nested installation ?

Thanks for your answer.

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 26 November 2005 - 12:31

If the calling setup.exe is NOT msi based then it could launch msiexec.exe with the path to your .msi file. msiexec does return some useful values (success, failure, reboot required and the like). These values are hard coded and cannot be specified by you.

Glytzhkof

Glytzhkof
  • Moderators
  • 1,447 posts

Posted 26 November 2005 - 23:14

You could also have your setup write a log file or a registry key with installation results. The setup.exe could then read this information.
Regards
-Stein Åsmul

fanzhengkun

fanzhengkun
  • Members
  • 2 posts

Posted 27 November 2005 - 05:42

Sorry,Stefan and Glytzhkof, I am still confused about what you say.
Could you say clearly?

I want my created msi to receive installshield setup.exe arguments like this:
Setup.exe ”/Q Directory=XXXX ......”
the /Q parameter tells the MSI package to do a quiet install
the Directory is the MSI installation location,......

and MSI will also return installation result to main setup.exe like
ERROR_SUCCESS, ERROR_INSTALL_FAILURE,
ERROR_SUCCESS_REBOOT_REQUIRED......

Is that possible to do that ? And how do this MSI?
Thanks for your help.


Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 30 November 2005 - 08:16

If your own msi setup (the child setup) is an msi file then the parent setup can launch it like this:
msiexec.exe /i your.msi /q DIRECTORY="XXXX"
If you prefer using a setup.exe to launchyour msi file it depoends on that setup.exe how to pass through the parametrs (you didn't tell us yet which tool you are using)

In your msi setup DIRECTORY is available as property and be used. Note that only public properties (i.e. properties with names in all upper case letters) can be passed on the command line. You also should add this property name to the SecureCustomProperties property, as documented in msi help.