cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
ua_Skywalker
Level 2

Writing registry key values dynamically

Hi guys! 🙂

Firstly, sorry for the silly questions, but unfortunately I can’t find help anywhere else on the internet...

I need to accomplish the following tasks in a Basic MSI project (desirably without involving complex programming):

1. Write a value of a registry key that would contain a path which application is being installed in (that is, a destination path on a destination computer);

2. Call a command line utility from a custom action and pass as one of its parameters the very same path (mentioned above).

Well, I know I’m an illiterate fool, still... :confused:

Any help would be highly appreciated 🙂
Labels (1)
0 Kudos
(2) Replies
RobertDickau
Flexera Alumni

In a Basic MSI project, the overall installation directory is stored in a property called INSTALLDIR, and in InstallShield's registry views you can use value data [INSTALLDIR] (with the brackets) to have the value expanded at run time. No programming required!

Likewise, you can create a launch-an-EXE custom action with [INSTALLDIR] as one of the arguments, and the value will be expanded at run time.

The standard example is launching Notepad with a readme file you're installing, where your launch-EXE custom action runs the command:

notepad.exe "[INSTALLDIR]Readme.txt"

during deferred execution after InstallFiles runs, often with condition Not Installed.
0 Kudos
ua_Skywalker
Level 2

Thanks a lot! Damn it, it's so easy :cool:
0 Kudos