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

Prerequisite trouble with "Registry Key Exists"


3 replies to this topic

Tyler Curtis

Tyler Curtis
  • Full Members
  • 24 posts

Posted 09 June 2010 - 00:31

I am familiar with using prerequisites to find if a file exists (or not) but am stumped when trying to set one up to determine if a registry key exists. After the project is built and run the test , the install acts like there is no prq as part of the install and ignores the requirements. (The prq is to run another .exe if the registry entry is found.)

I have also tried adding the prq to an existing project and although the UI shows the PRQ added to the project, testing the project displays all of the PRQs which test for a file installed, but not the PRQ for the registry entry.

I have rebuilt the PRQ but no improvement...

Any Ideas???
Thanks!
Tyler Curtis
Craftsman Book Company

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 09 June 2010 - 18:39

I find the logic for registry searches sometimes confusing, seemingly opposite to what I intended. So be very careful and double check every setting. Also, you could open an existing prerequisite to take a look how the registry test is defined.

Tyler Curtis

Tyler Curtis
  • Full Members
  • 24 posts

Posted 09 June 2010 - 21:59

Thanks for responding Stefan!
I have compared a couple of PRQs (not written by me) and don't find any differences except the major one of downloading the matching PRQ and file.

More information that should have been included originally...

I use the UI to create basic MSI's. I don't use InstallScript.

As for the prq, this one downloads the matching prq from a webserver and then downloads the exe if the conditions are met. In fact, all of my PRQs download the matching PRQ as well as download the file if conditions are met. All the others work fine, this one just happens to use the "registry key exists" condition.

See the code below...
CODE

<?xml version="1.0" encoding="utf-8"?>
<SetupPrereq>
<conditions>
 <condition Type="1" Comparison="1" Path="HKEY_LOCAL_MACHINE\SOFTWARE\Craftsman\Syscheck\2010_CDB_CD" FileName="" ReturnValue=""/>
 </conditions>
 <files>
  <file LocalFile="X:\Vss\DEV\InstallerReleases\2010_Costbooks\_NOT_Released\June2010_Updates.exe" URL="http://www.craftsmanbook.com/products/pub/tne/2010_Costbooks/June2010_Updates.exe" CheckSum="D9A93726DB8D24DE229B7C85342C9042" FileSize="0,7589056"/>
 </files>
 <execute file="June2010_Updates.exe"/>
 <properties Id="{EFA50906-CFEF-49E6-BB7C-EEC62BB691ED}" AltPrqURL="http://www.craftsmanbook.com/products/pub/tne/prerequisites/2010/June 2010 Updates for TNE 2.prq"/>
</SetupPrereq>


Still stumped...

Edited by Tyler Curtis, 09 June 2010 - 22:00.

Thanks!
Tyler Curtis
Craftsman Book Company

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 11 June 2010 - 11:24

So you want to install the prerequisite if that registry entry does exist? That's pretty unusual. Most of the time you would want to install it if the entry does NOT exist.