Hello,
I have a dialog with a push button and a edit box. The edit box is populated with a variable that is initially set to the default installation directory. When the button is pushed, I perform a select custom folder and change the value in the edit box to whatever directory the user selected. The edit box is enabled so the user can type in the directory without having to use the folder selector.
Is it possible to validate the contents of the dialog to make sure the typed in path is valid? When dealing with Wix this is possible by specifying the CheckTargetPath control event. Is anything like this possible with InstallAware?
Thanks in advance for any help.
Validating a typed in path
Try:
Code: Select all
Set Variable CHECKFOLDER to FALSE
Set Variable USERFOLDERCHOICE to $TARGETDIR$
label: Destination Directory
Display Dialog: destination, wait for dialog to return (modal)
if Variable WIZARD Equals BACK
GoTo Label: <Previoous>
else
if Variable WIZARD Equals CANCEL
GoTo Label: Main Install
end
end
Does Folder Exist $USERFOLDERCHOICE$ (get result into variable CHECKFOLDER)
If Variable CHECKFOLDER Equals FALSE
GoTo Label: Destination Directory
end
Jim Oswell
Software Engineering Manager, Dental
Greenway Health, LLC
http://greenwaymedical.com
Software Engineering Manager, Dental
Greenway Health, LLC
http://greenwaymedical.com
Thanks for the response. Unfortunately, the user is able to type in a folder that doesn't currently exist. The directory may be created at a later point in the installation. The File/Folder Exist command will probably be insufficient. Is there some way to see if the types in directory is valid (eg: doesn't contain invalid characters, valid disk drive, etc) ??
Thanks,
Ryan
Thanks,
Ryan
Is there a way to access the Remaining Space value that is returned from the Browse folder code?
If you put in an invalid TARGETDIR the RemainingSpace text box will show a negative value.
That is the value that Ryan & I are trying to catch to display an error like:
Invalid Destination Directory
Creating the directory is not what should be done because it is just another thing to be cleaned up.
If you put in an invalid TARGETDIR the RemainingSpace text box will show a negative value.
That is the value that Ryan & I are trying to catch to display an error like:
Invalid Destination Directory
Creating the directory is not what should be done because it is just another thing to be cleaned up.
Sean
Who is online
Users browsing this forum: No registered users and 87 guests