buildup
Posts: 13
Joined: Tue Jan 02, 2007 2:40 pm

local drive as destination

Hello,
we have written a service which has to be installed on a local drive. How can we configure the installer that only a local drive can be selected as destination?
gigi
Posts: 2103
Joined: Tue Apr 11, 2006 9:55 am
Contact: Website

Hi,

The installation directory can be selected in the "FolderDlg" when the package is installed. The default value for the installation directory can be set in the "Install Parameters" page ("Application Folder" field).

Best Regards,
Gigi
______________
Gheorghe Rada
Advanced Installer Team
http://www.advancedinstaller.com
buildup
Posts: 13
Joined: Tue Jan 02, 2007 2:40 pm

Hi,

my problem is that the user may not select e. g. a network drive. Our application may only be installed on a local drive.
How can I archieve this?

Thanks,
Jürgen Bauer
gigi
Posts: 2103
Joined: Tue Apr 11, 2006 9:55 am
Contact: Website

Hi Jürgen,

In the "BrwoseDlg" you can select only local drives. To prevent the user from writing a network path in the "Folder" field you can make the "Path Edit" control disabled.

If this is not what you need then could you please give me more details.

Best Regards,
Gigi
______________
Gheorghe Rada
Advanced Installer Team
http://www.advancedinstaller.com
buildup
Posts: 13
Joined: Tue Jan 02, 2007 2:40 pm

Hi,

thanks for your quick reply.
Unfortunately, I cannot change any properties at all in the FolderDlg. Do I have to activate anything in my project? Or is our version too "small" to modify these properties?

Bye,
Jürgen Bauer
gigi
Posts: 2103
Joined: Tue Apr 11, 2006 9:55 am
Contact: Website

Hi Jürgen,

This modification can be done through the Dialog Editor (available only for Enterprise type of projects).

Other way to do this is by manually modifying the FolderDlg.aip fragment from the AI working folder like this:
Open the "FolderDlg.aip" file from "fragments" folder with a text editor and modify the "Attributes" of the "FolderEdit" control from "7" to "5".

Hope this helps.

Best Regards,
Gigi
______________
Gheorghe Rada
Advanced Installer Team
http://www.advancedinstaller.com
buildup
Posts: 13
Joined: Tue Jan 02, 2007 2:40 pm

Hi,
I changed the code in the AIP file. But when I recompile my project, it is still possible to select a network drive.
What am I doing wrong?

Thanks,
Jürgen Bauer
gigi
Posts: 2103
Joined: Tue Apr 11, 2006 9:55 am
Contact: Website

Hi Jürgen,

After you made the modification from my previous post you need to close the project and reopen it. You will see the modification after you build and run the package.

Regards,
Gigi
______________
Gheorghe Rada
Advanced Installer Team
http://www.advancedinstaller.com
buildup
Posts: 13
Joined: Tue Jan 02, 2007 2:40 pm

Hi,
... it is a long way to go. Sorry, but the result is not still what I want to archieve.
When the user opens the combobox of the available drives, there should be only local drives selectable.
Your advise to change the attribute value to 5, does only lead to a disabled button "One hierarchie up".

Bye,
Jürgen Bauer
gigi
Posts: 2103
Joined: Tue Apr 11, 2006 9:55 am
Contact: Website

Hi Jürgen,

This can be done trough the "Dialog Editor" (available only for Enterprise type of projects) by modifying the "Remote Volumes" attribute of the ComboBox from "True" to "False".

However if you don't have the "Dialog Editor" then you need to do like this:
Open the AIP file with a text editor and copy this row in the caphyon.advinst.msicomp.MsiControlComponent component:

Code: Select all

<ROW Dialog_="BrowseDlg" Control="DirectoryCombo" Type="DirectoryCombo" X="86" Y="55" Width="204" Height="80" Attributes="131083" Property="_BrowseProperty" Control_Next="Up" MsiKey="BrowseDlg#DirectoryCombo"/>
After you made this modification you need to close the project and reopen it. You will see the modification after you build and run the package.

Best Regards,
Gigi
______________
Gheorghe Rada
Advanced Installer Team
http://www.advancedinstaller.com
buildup
Posts: 13
Joined: Tue Jan 02, 2007 2:40 pm

Hi,

thanks for your reply. Your tip worked fine. Unfortunately, the user is still able to enter a network drive manually. Can this be suppressed by an attribute?

Bye,
Jürgen Bauer
gigi
Posts: 2103
Joined: Tue Apr 11, 2006 9:55 am
Contact: Website

Hi,

Copy this line to the same component as my previous post:

Code: Select all

<ROW Dialog_="FolderDlg" Control="FolderEdit" Type="PathEdit" X="18" Y="126" Width="252" Height="18" Attributes="5" Property="APPDIR" Control_Next="Browse" Help="|" HelpLocId="Control.Help.FolderDlg#FolderEdit" MsiKey="FolderDlg#FolderEdit"/>
Best Regards,
Gigi
______________
Gheorghe Rada
Advanced Installer Team
http://www.advancedinstaller.com
buildup
Posts: 13
Joined: Tue Jan 02, 2007 2:40 pm

Hi,
thanks for your reply. Now the user is not able any longer to change the path. But in the dialog of the selection of the destination path (where the combobox is restricted to only local drives) it is still possible to overwrite the path with a network drive.
Bye,
Jürgen Bauer, Germany
gigi
Posts: 2103
Joined: Tue Apr 11, 2006 9:55 am
Contact: Website

Hi,

You need to make that "Edit Box" disabled too. To do that add this line to the AIP file in the same component as my previous post:

Code: Select all

<ROW Dialog_="BrowseDlg" Control="PathEdit" Type="PathEdit" X="100" Y="202" Width="246" Height="18" Attributes="9" Property="_BrowseProperty" Control_Next="BottomLine" MsiKey="BrowseDlg#PathEdit"/>
Best Regards,
Gigi
______________
Gheorghe Rada
Advanced Installer Team
http://www.advancedinstaller.com
buildup
Posts: 13
Joined: Tue Jan 02, 2007 2:40 pm

Hi,
thanks for your tip. Now in one of my msi installations everything works fine. But when I want to have the same behaviour in another project and copy your suggested code into the aip file, it does not work.
The user may not select another drive or edit the path directly in the browse dialog but he is still able to change the destination path directly in the folder dialog.
What am I missing?

Bye,
Jürgen Bauer

Return to “Common Problems”