cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Active participant

Prerequisite condition for file not found - can it contain wildcard chars?

I have a prerequisite that I want to run but only if a directory does not exist in C:\Users\Public\Documents.

What I tried to use is  1) a file does or does not exist and 2) C:\Users\Public\Documents\QVI\qvi-install-logs\*.txt.

Is the wildcard not allowed in the filename?  It appears that way because it's always trying to run the prereq when it shouldn't.

Any thoughts or ideas are definitely welcome.  I am using InstallShield 2016 Pro.

0 Kudos
6 Replies
Highlighted
Flexera
Flexera

Re: Prerequisite condition for file not found - can it contain wildcard chars?

Hi @MattQVI ,

 

I dont think you can use wildcard characters in FileName field since it is meant only for filename in absolute pattern.

 

If you select this option, do one of the following:

Specify the path and name for the file. To specify a predefined folder, select the appropriate property in the list. The available properties are [CommonFiles64Folder], [CommonFilesFolder], [ProgramFiles64Folder], [ProgramFilesFolder], [System64Folder], [SystemFolder], and [WindowsFolder].

If you select one of the 64-bit folder locations, the installation checks the 64-folder location on 64-bit target systems and the 32-folder location on 32-bit target systems.

Specify just the file name—without the path or a property. The installation will search for the specified file in all directories defined for the PATH environment variable on the target machine.
Specify a registry key as a property. If you do this, the installation will resolve the registry key with the registry value. Note that the last element of the registry path is treated as a value name. If a backslash is the last character of the path, the value of the default registry entry for that registry key is used.

For example, if you type the following as the value, the installation checks if the path specified as the value for the HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\ORACLE_HOME registry entry contains a bin directory with a file named oci.dll:

[HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\ORACLE_HOME]bin\oci.dll

In addition, type the version number of the file. For example:

6.7.8.9

Then select the appropriate match option to indicate when to run the InstallShield prerequisite.

 

Referral link:

https://docs.flexera.com/installshield21helplib/helplibrary/IDlgPrereqCondition.htm#ref-dialogboxesn...

 

Thanks,

Jenifer

 

0 Kudos
Highlighted
Active participant

Re: Prerequisite condition for file not found - can it contain wildcard chars?

Thank you for your reply.

I understand about using the canned folders or using a filename and searching through the PATH variable.

In my case, I have a folder in Public Documents and if it already exists, I don't want to run the prerequisite.  Is there a canned Public Documents folder InstallShield would recognize?

0 Kudos
Highlighted
Flexera
Flexera

Re: Prerequisite condition for file not found - can it contain wildcard chars?

Hi @MattQVI ,

 

Yes it is.There is folder named PUBLIC in the predefined folder list.You can make use of that which will go to :

PUBLIC

This property holds the full path to the Users Public folder.

 

https://docs.flexera.com/installshield25helplib/helplibrary/IHelpISXFilesDestinations.htm

 

Thanks,

Jenifer

0 Kudos
Highlighted
Active participant

Re: Prerequisite condition for file not found - can it contain wildcard chars?

What should the syntax be for using the Public folder?  [PUBLIC]\Documents\QVI\qvi-install-logs\<somefilename>.txt or [PUBLIC]Documents\QVI\qvi-install-logs\<somefilename>.txt?

I added 4 file not found conditions.  One for each of the possible files that could exist in this directory.  If I am missing just one (it's a NOT FOUND condition), the prereq will run - correct?

 

The ideal condition is to NOT run the prereq if the folder already exists but it seems that I can not create a condition for the prereq that satisfies that.

0 Kudos
Highlighted
Active participant

Re: Prerequisite condition for file not found - can it contain wildcard chars?

It's been almost two weeks since my last post on this issue.  Is there a way to set the condition of a prereq to only run if a folder does not exist?

0 Kudos
Highlighted
Flexera
Flexera

Re: Prerequisite condition for file not found - can it contain wildcard chars?

Hi @MattQVI ,

 

Appreciate your thirst on improving InstallShield's product quality.

  • Took time to check further.When it comes to PATHVARIABLES, pre-requisite has run-time support only for selected directories those are available in Prq editor's file exists condition's combo list.
  • PUBLIC is not one among them,i pointed out PUBLIC as known folder to InstallShield starting 2018(not in Pre-requisite editor still).
  • There is additional directory support for registry variable,you can save some directory value(Say here it is [PUBLIC] in registry which you can point in file exists condition path.That would be resolved and validated for file existence condition.

Thanks,

Jenifer

0 Kudos