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!

whokarez
Posts: 2
Joined: Wed Sep 06, 2006 6:25 pm

Run on specific drive

I'm new to AI so please excuse me if this is a repeat.

My company is building new servers to replace the existing ones. The existing installation destination is on C: and the new location will be on D:.

I need to make the msi packages smart enough to install on the correct drive without user intervention.

I need something that says if C:folder\subfolder\file exist then install on C:, if not install on D:

Please help.

Thanks in advanced.
gigi
Posts: 2103
Joined: Tue Apr 11, 2006 9:55 am
Contact: Website

Hi,

Define two properties (upper cases) in "Install Parameters" page one with value: C:\ and other with value: D:\.

You need to remove the "FolderDlg" dialog from dialogs page so that the user can not modify the path where the package will be installed.

You can create a file search in "Search" page. To learn more about how to schedule a search please see:
http://www.advancedinstaller.com/user-guide/search.html

Switch to "Custom Actions" page and create two "Property Set With Formatted" custom actions under "CostFinalize" standard action with following options:
1. Property Name: [APPDIR] (folder where the application will be installed)
Formatted Text: the property defined in the "InstallParameters" page with value of "C:\"
Execution condition: RESULT_PROPERTY (the search property)

2. Property Name: [APPDIR] (folder where the application will be installed)
Formatted Text: the property defined in the "InstallParameters" page with value of "D:\"
Execution condition: NOT RESULT_PROPERTY (the search property)

If you encounter any problem please let me know.

Regards,
Gigi
______________
Gheorghe Rada
Advanced Installer Team
http://www.advancedinstaller.com
whokarez
Posts: 2
Joined: Wed Sep 06, 2006 6:25 pm

thanks

Your instructions were fine except for one peice. I had to create "Directory Set With Formatted" custom actions under "CostFinalize". Once I did this, everything ran perfectly.

Thanks again!

Return to “Common Problems”