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

File Exist Launch condition?


5 replies to this topic

bjaber

bjaber
  • Full Members
  • 3 posts

Posted 25 April 2007 - 05:49

I'd like to set an install condition in my MSI to first check for a file that exists on the target system. If it exists, I'd like the installer to exit. If it's not there, then the installer would show the welcome screen. I have a basic MSI project which is being compiled as a single MSI file (not setup.exe bootstrap). It needs to be a single MSI file.

Is this possible to set as a launch condition? If so, can someone please indicate how?

Appreciate the help!


Glytzhkof

Glytzhkof
  • Moderators
  • 1,447 posts

Posted 25 April 2007 - 10:09

This can be done using a system search for the file in question. It essentially involves populating the following tables:
  • AppSearch
  • Signature
  • LaunchCondition
  • DrLocator

Regards
-Stein Åsmul

Glytzhkof

Glytzhkof
  • Moderators
  • 1,447 posts

Posted 25 April 2007 - 10:10

Please note that some tools such as Wise for Windows Installer schedule the LaunchCondition standard action prior to the AppSearch standard action. In these cases you must move the LaunchCondition action to run after AppSearch in both the UI and InstallExecute sequences.
Regards
-Stein Åsmul

bjaber

bjaber
  • Full Members
  • 3 posts

Posted 26 April 2007 - 04:11

QUOTE (Glytzhkof @ 2007-04-25 02:09)
This can be done using a system search for the file in question. It essentially involves populating the following tables:

  • AppSearch
  • Signature
  • LaunchCondition
  • DrLocator


Can you give me any details on how to set this up? I'm using InstallShield Developer 8 (old, I know, but we've had no real reason to update until recently...we're getting v12 soon).

I'm trying to check for a file on the system (I can give it the absolute path) and if it's there, I want the installer ot quit right away and not install anything. If the file isn't there, I want the installer to commence as normal and install the software package.

Have you done this before? I have a single MSI file and don't want to use InstallScript or a setup.exe bootstrap. It has to be a single MSI file.

Any ideas? Appreciate all the help!


Edited by bjaber, 26 April 2007 - 04:12.


Glytzhkof

Glytzhkof
  • Moderators
  • 1,447 posts

Posted 26 April 2007 - 21:59

I don't have Installshield available at the moment, but I made a small MSI which demonstrates AppSearch and use of LaunchCondition.

Usage:
1: Unzip contents to c:\ or similar
2: Run the MSI file directly, it should trigger a search and then fail to run (show a message that fakesetup.exe was not found)
3: Exit the MSI
4: Copy the FakeSetup.exe file into a sub folder underneath program files. For example: "C:\Program Files\Somefolder"
5: Launch the MSI again, it should now find the FakeSetup.exe file.

Check the tables in the MSI for an overall idea of how this is done, and then use the SDK to modify values for your own usage. Alternatively open the "System search" or similar view in Installshield. As I said I don't have installshield available at the moment, and can't tell you exactly what the view is called.

Attached Files


Regards
-Stein Åsmul

bjaber

bjaber
  • Full Members
  • 3 posts

Posted 26 April 2007 - 22:05

Thanks, Stein. I'll give it a try.