stomanova
Posts: 6
Joined: Thu Jan 22, 2009 10:58 am

Install to custom path - read from registry

I think I understand how to create the custom path for the installation. But I need one special case - I read the path of another part of the software from registry - and I get something like C:\HereItIsInstalled\Exe. I need to use only C:\HereItIsInstalled for my files. Is there any solution, how to remove part of the string, which I get from the registry and use it as my own path, please ? Thank you.
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Install to custom path - read from registry

Hi,

The filename can be removed from the path by using a custom action. Please note that the Remove a file or a folder during installation how-to contains some sample VBScript code which may help you.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
stomanova
Posts: 6
Joined: Thu Jan 22, 2009 10:58 am

Re: Install to custom path - read from registry

Hi, thank you, it works fine with Custom action - vbs script.

Now I like to read some Property value from existing INI file. (I use AI Professional)
Is it possible to connect existing value from imported INI with the value of any Property, please ?
Or should I use next Custom action for reading the ini file ? I did it and it seems to work, but I like to know if there is better solution ?
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Install to custom path - read from registry

Hi,

Unfortunately Windows Installer does not offer support for reading files during the install process. However, it can be done through a custom action (like the one you are using). The custom action can set installer properties after it reads and interprets the INI file.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”