Folder based on registry key - Advanced Installer Community

We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

JLavalley
Posts: 38
Joined: Tue Mar 03, 2009 7:28 pm

Folder based on registry key

I'm building an install that is really an update (for various reasons it is a new project). I need to read a path out of the registry, and create a new directory on the same volume.

I have defined a variable with a default value (NEWPATH ="c:\foo")
I have a search that returns the path from the registry as a string (OLDPATH)
I then have an inline script that parses the drive letter off and appends the new directory name and stores this in a new variable (NEWPATH).
In Files and Folder I have defined a new property based folder using the new variable (NEWPATH)
I also add a new registry value with NEWPATH as the data.
I have wired the inline script to fire when the user clicks the "Next" button on the welcome dialog box (I duplicated the inline script and it also runs during "InstallInitialize".
I have placed a static text object on the 2nd dialog box that displays the value of "NEWPATH", it is correct ("E:\newpath").

However, when I run the msi, the directory "C:\foo" is created, however the new registry value has "E:\newpath"..

How do I accomplish this? What am I doing wrong?

Jerome
- Jerome
JLavalley
Posts: 38
Joined: Tue Mar 03, 2009 7:28 pm

Re: Folder based on registry key

I created a test project to duplicate this and it functions as it should in the test project.. hmm..
- Jerome

Return to “Common Problems”