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

Manual use of RunOnce


4 replies to this topic

tcowan

tcowan
  • Members
  • 2 posts

Posted 11 November 2003 - 18:52

I have a situation where I think I need to add an entry, and also remove an entry, to the RunOnce registry setting.

The situation is that during my installation I launch an executable which is itself a self extracting executable. This executable will prompt the user to reboot. If the user decides to reboot, I want my MSI to kick off automatically, so I need to put it into the RunOnce registry setting. However, if the user does NOT choose to reboot, I will need to remove it from the registry.

As far as I can see, the trick is to know which drive the MSI is on, so that I can build the string correctly to place into/remove from the registry. Is there any way to know what drive the MSI has been launched from, in InstallScript, for instance?

Neo

Neo
  • Members
  • 48 posts

Posted 12 November 2003 - 09:33

If the MSI is launched by an InstallShield Setup.exe, the SETUPEXEDIR property will be set at command line. Otherwise you can use the SourceDir property to access the directory, which contains the MSI. You can use the InstallScript functions MsiGetProperty() to retrieve the value of these properties.

-Neo

tcowan

tcowan
  • Members
  • 2 posts

Posted 12 November 2003 - 17:02

Thanks, Neo!

I tried the SourceDir and it does exactly what I needed it to do. Next problem they threw at me is that the name of the .MSI file is modified during our Release phase. The name has the release version and the build date worked into it. So I don't know at the time I am building the .MSI file what the name will be! Is there a property similar to SourceDir that will tell me the name of the .MSI?

Troy

Zweitze

Zweitze
  • Full Members
  • 522 posts

Posted 13 November 2003 - 09:18

Try the property "OriginalDatabase". Note that the docs suggest that this property may point to the cached version of the MSI.

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 13 November 2003 - 12:39

Renaming the .msi file is not a good idea. Note that in order to install a Minor Update, you must use the same .msi file name as the original install.