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

"Initial Condition" for install not working


2 replies to this topic

garyflet

garyflet
  • Full Members
  • 36 posts

Posted 08 May 2017 - 22:46

I want my install to check for a related product and not install if the related product is installed. In System Search, there is a search for a registry key that only exists if the related product has been installed (so thekey is listed under "Search In"). Under "Store In", there is a variable SETUPNODRIVERINSTALLED. (Under "Search For", it just has "(Default)"). Now if the key doesn't exist, the related product has not been installed and I assume that SETUPNODRIVERINSTALLED will be empty. Under "General Information->Initial Condition" I have SETUPNODRIVERINSTALLED as the condition. However, even if the key doesn't exist, the condition is activated, and acts as though SETUPNODRIVERINSTALLED as a value, and doesn't allow the install to continue.

How do I get this to work? Thanks, Gary

deramor

deramor
  • Full Members
  • 187 posts

Posted 08 May 2017 - 22:56

Gary,

 

Look at your property in the property manager view.  By default, new properties are created with "0" as its value.

"0" means "I exist with a value" when you are talking about conditions.  If it is there, clear the value and try your test again.



gmpk82

gmpk82
  • Full Members
  • 40 posts

Posted 16 May 2017 - 11:01

You can achieve it in custom code too as I provided piece of code. Refer Installshield help article for more details.

 

#define  DEFAULTROOT   RegDBSetDefaultRoot ( HKEY_LOCAL_MACHINE );  

 

   if ( RegDBKeyExist ( "SOFTWARE\\CompanyName\\product name what you are looking for" ) = TRUE ) then
         RegDBGetKeyValueEx ( "SOFTWARE\\CompanyName\\product name what you are looking for", "CurrentVersion", nvType, sProductVersion, nvSize);