Installing a file into another program folder - 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!

ajordet
Posts: 2
Joined: Tue Jul 29, 2008 7:25 pm

Installing a file into another program folder

My program requires a certain file to be installed into another program's directory if the program is installed. Under Files and Folders I set up a property based folder that uses the registry key for that particular program and placed the file inside. If the other program is already installed, my installation goes smoothly and installs the file into the other program's directory. However, if the other program is not installed, my program creates a new folder in C:\ that contains the said file.

Is there any way I can have my program install without it creating this new folder? If the other program doesn't exist then my installer should do nothing with the file and just continue on with its installation.
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Installing a file into another program folder

Hi,

Your problem can be solved by conditioning the component of the file which is installed in the folder of the other program. This can be done by using the "Expression" field in the Component Properties page in the Organization field.

Since the installation of the file depends on the result of the registry search, you can use the property of the search as the condition (the file will be installed only if the search finds something).

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
ajordet
Posts: 2
Joined: Tue Jul 29, 2008 7:25 pm

Re: Installing a file into another program folder

Hi Cosmin,

Thanks for your help. I'm still having issues getting it to work correctly though. I'll try to explain the scenario as best I can.

I made a folder that was property based on PROGRAM_PATH, which is the registry key of the other program that I need to check if it is installed. I placed file.exe in to that folder. Under the component condition for file.exe I put PROGRAM_PATH <> "". It behaves as expected when PROGRAM_PATH is not "", but when it is "" it is still creating a folder on my C drive called "PROGRAM_PATH" with file.exe in it.

Any ideas?
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Installing a file into another program folder

Hi,

This happens because a property-based folder is always resolved to a valid path which contains the name of the property. Try using this condition:

Code: Select all

NOT (PROGRAM_PATH><"PROGRAM_PATH")
This condition will be true if the PROGRAM_PATH property doesn't contain its name.

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

Return to “Common Problems”