i need the possibility to select files in the dialog section (files outside the msi package) and save the selected file into a property.
I need also basic file operations (e.g. rename) with the selected file.
thanx.
dani
Advanced Installer does not support this type of control because windows installed does not support it. All supported controls resides on the toolbox.In the toolbox there is a "directory list" but no "file list".
Code: Select all
Function fBrowseForFile()
sBrowsePath = "C:\"
sBrowseFilter = "All Files|*.*"
Set oBrowseDialog = CreateObject("UserAccounts.CommonDialog")
oBrowseDialog.Filter = sBrowseFilter
oBrowseDialog.InitialDir = sBrowsePath
oBrowseDialog.Flags = &H80000 + &H4 + &H8
oBrowseDialog.ShowOpen
fBrowseForFile = oBrowseDialog.FileName
End Function
strFileName = fBrowseForFile
if(strFileName <> "") then
Session.Property("MY_FILEPATH") = strFileName
end ifRegards,b) Name: SetProperty (after you select from combo change the "SetProperty" text with [MY_FILEPATH]), Argument: [MY_FILEPATH]
Q1: I have created this custom dialog and everything* works fine. However, the edit control does not have focus when the dialog is displayed, which means that my users need to click with the mouse into the box or do a number of tabs.Create under your dialog an edit and a button control. Select the edit control and set a property for it like this: MY_FILEPATH
Code: Select all
<ROW Dialog_="LicenseFileDialog" Control="Back" Type="PushButton" X="180" Y="243" Width="56" Height="17" Attributes="3" Text="[ButtonText_Back]" Control_Next="BannerBitmap" TextLocId="-"/>
<ROW Dialog_="LicenseFileDialog" Control="BannerBitmap" Type="Bitmap" X="0" Y="0" Width="370" Height="44" Attributes="1" Text="[BannerBitmap]" Control_Next="BannerLine"/>
<ROW Dialog_="LicenseFileDialog" Control="BannerLine" Type="Line" X="0" Y="44" Width="372" Height="0" Attributes="1" Control_Next="BottomLine"/>
<ROW Dialog_="LicenseFileDialog" Control="BottomLine" Type="Line" X="5" Y="234" Width="368" Height="0" Attributes="1" Control_Next="Description"/>
<ROW Dialog_="LicenseFileDialog" Control="Cancel" Type="PushButton" X="304" Y="243" Width="56" Height="17" Attributes="3" Text="[ButtonText_Cancel]" Control_Next="Back" TextLocId="-"/>
<ROW Dialog_="LicenseFileDialog" Control="Description" Type="Text" X="25" Y="23" Width="280" Height="15" Attributes="196611" Text="Supply the license file" Control_Next="Title" TextLocId="Control.Text.TemplateDlg#Description"/>
<ROW Dialog_="LicenseFileDialog" Control="Logo" Type="Text" X="4" Y="228" Width="88" Height="12" Attributes="1" Text="G&&R Software Installer" Control_Next="LicenseFileDialogBrowseButton" TextLocId="Control.Text.TemplateDlg#Logo"/>
<ROW Dialog_="LicenseFileDialog" Control="Next" Type="PushButton" X="236" Y="243" Width="56" Height="17" Attributes="3" Text="[ButtonText_Next]" Control_Next="Cancel" TextLocId="-"/>
<ROW Dialog_="LicenseFileDialog" Control="Title" Type="Text" X="15" Y="6" Width="200" Height="15" Attributes="196611" Text="Install license" TextStyle="[DlgTitleFont]" Control_Next="FolderLabel" TextLocId="Control.Text.TemplateDlg#Title"/>
<ROW Dialog_="LicenseFileDialog" Control="FolderLabel" Type="Text" X="21" Y="120" Width="348" Height="12" Attributes="3" Text="&License file:" Control_Next="Text" Help="|" TextLocId="Control.Text.FolderDlg#FolderLabel" HelpLocId="Control.Help.FolderDlg#FolderLabel"/>
<ROW Dialog_="LicenseFileDialog" Control="Text" Type="Text" X="22" Y="71" Width="320" Height="49" Attributes="3" Text="Select the file which contains the license information. The file should be supplied by your software distributor. Note that [ProductName] [Setup] cannot continue without valid license information." Control_Next="LicenseFileDialogText_348" TextLocId="Control.Text.FolderDlg#Text"/>
<ROW Dialog_="LicenseFileDialog" Control="LicenseFileDialogBrowseButton" Type="PushButton" X="274" Y="132" Width="56" Height="17" Attributes="3" Text="Br&owse" Control_Next="Next"/>
<ROW Dialog_="LicenseFileDialog" Control="LicenseFileDialogText_348" Type="Text" X="25" Y="174" Width="243" Height="49" Attributes="65539" Text="[GAR_LICENSE_FILE_STATUS]" Control_Next="LicenseFileDialogEdit_346"/>
<ROW Dialog_="LicenseFileDialog" Control="LicenseFileDialogEdit_346" Type="Edit" X="22" Y="132" Width="246" Height="17" Attributes="3" Property="GAR_LICENSEFILEPATH" Control_Next="Logo" Help="|"/>
<ROW Dialog_="SetupTypeDlg" Control_="Back" Event="NewDialog" Argument="LicenseFileDialog" Condition="AI_INSTALL" Ordering="1"/>
<ROW Dialog_="PlatformDialog" Control_="Next" Event="NewDialog" Argument="LicenseFileDialog" Condition="AI_INSTALL" Ordering="1"/>
<ROW Dialog_="LicenseFileDialog" Control_="Cancel" Event="SpawnDialog" Argument="CancelDlg" Condition="1" Ordering="1"/>
<ROW Dialog_="LicenseFileDialog" Control_="Back" Event="NewDialog" Argument="PlatformDialog" Condition="AI_INSTALL" Ordering="1"/>
<ROW Dialog_="LicenseFileDialog" Control_="Next" Event="NewDialog" Argument="SetupTypeDlg" Condition="AI_INSTALL AND GAR_VALIDATED_LICENSE_FILE="TRUE"" Ordering="2"/>
<ROW Dialog_="LicenseFileDialog" Control_="LicenseFileDialogBrowseButton" Event="DoAction" Argument="PickupLicenseFileFromDisk" Condition="AI_INSTALL" Ordering="1"/>
<ROW Dialog_="LicenseFileDialog" Control_="LicenseFileDialogBrowseButton" Event="[GAR_LICENSEFILEPATH]" Argument="[GAR_LICENSEFILEPATH]" Condition="AI_INSTALL" Ordering="2"/>
<ROW Dialog_="LicenseFileDialog" Control_="Next" Event="DoAction" Argument="ValidateLicenseFile" Condition="AI_INSTALL" Ordering="1"/>
<ROW Dialog="LicenseFileDialog" HCentering="50" VCentering="50" Width="370" Height="270" Attributes="3" Title="[ProductName] [Setup]" Control_First="Next" Control_Default="Next" Control_Cancel="Cancel"/>
FOLLOW US