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

How do I insert the Installation Path into a registry value?


6 replies to this topic

seier

seier
  • Members
  • 16 posts

Posted 17 January 2002 - 09:16

Hello and Thanks in Advance to anyone who replies.  I would like to have my application added to the following in the following sections:
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\IPNotify.EXE]
@="C:\\Program Files\\IPNotify\\IPNotify.exe"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run]
"IPNotify"="C:\\Program Files\\IPNotify\\IPNotify.exe"

I can figure out how to get windows installer to make all the keys all the way down those locations, but I don't know how to get the installer to populate the value to "installation folder"\IPNotify.exe.  What sort of keyword or constant does one enter to do that?  Please include as much detail as possible.  
Thanks a Zillion,
Christian blackburn



Dave I

Dave I
  • Members
  • 195 posts

Posted 17 January 2002 - 10:01

Which software are using InstallShield Windows Installer or InstallShield Developer, or neither?

For ISWI, use either Configure The Target System->Registry to create the registry structure, Or Component->Registry Data.  

Right click, create a new value and populate it with [INSTALLDIR]IPNotify.exe, this will expand when built.

Do the same for your other registry entry.

A quicker way to create larger registry trees is to just export the branch from regedit.exe and then import it into installshield, again by right-clicking on the registry key in the registry view or right-clicking on "Registry Data" in the component route....then just simply ammend the hardcoded value to [INSTALLDIR]

Hope this helps,
Dave.



seier

seier
  • Members
  • 16 posts

Posted 17 January 2002 - 12:20

Thanks Dave,  
I'm using the Windows Installer without InstallShield.   You don't happen to know if the [InstallDir] syntax still works directly in Visual InterDev.  Regardless I will give it a try in the morning.  

seier

seier
  • Members
  • 16 posts

Posted 17 January 2002 - 12:47

Okay that didn't work.  I tried all sorts of combinations and nothing seemed to work.  I have inserted directly into the value field combinations, [INSTALLDIR]IPNotify.exe,[APPDIR]\IPNOTIFY.exe, %TARGETDIR%IPNOTIFY, and nothing seems to work.  Every time oddly enough the the IPNOTIFY.exe ending appears for my value, but I need it to populate with the complete path.  Any Ideas out there?    

Ian Blake

Ian Blake
  • Members
  • 483 posts

Posted 17 January 2002 - 14:45

[#FileKey] where FileKey is a key in the file table expands  to the location of a file.

Why use AppPaths?  Get your apps to use MsiLocateComponent if they want to find bits of your product.  It will tell you if it is present and if its not you can call MsiGetProduct code and MsiInstallMissingComponnent to force a repair.




seier

seier
  • Members
  • 16 posts

Posted 18 January 2002 - 05:25

And the Envelope Please:
Dave thanks for your help.  I did have to mess with it for some time after.  I mean I tried all sorts of syntax it would appear that the appropriate thing to do is:
"[TARGETDIR]IPNotify.exe" where "IPNotify.exe" is the name of my application.  If you'd like a screenshot of the end product follow this URL:
http://www.rawsacram...rist....ue.htm.  
Have a nice day everyone :).  Thank you all who replied.  


seier

seier
  • Members
  • 16 posts

Posted 18 January 2002 - 07:16

The silly program screwed up my URL and put a period on it.    

http://www.rawsacramento.org/~christian/misc/How%20to%20plug%20the%20application%20directory%20into%20a%20registry%20value.htm