(1) If the Destination Folder does not exist, installation actions will automatically create their required target folders. Is it possible to ask the user, if he wants to create the new folder or not.
(2) If it is not possible to create the Destination Folder (e.g. wrong format, no permission, …) the setup does not stop! What can I do to reask the user for a new valid Destination Folder.
Destination Folder
-
FrancescoT
- Site Admin
- Posts: 5361
- Joined: Sun Aug 22, 2010 4:28 am
Re: Destination Folder
Dear User,
Hope this helps you.
Regards
You could place a MessageBox just after your Destination Dialog (in a loop), to ask for a confirmation to your user;(1) If the Destination Folder does not exist, installation actions will automatically create their required target folders. Is it possible to ask the user, if he wants to create the new folder or not.
Code: Select all
label: Destination Directory
Set Variable MYCONTINUE to NO
while Variable MYCONTINUE Equals NO loop
Display Dialog: destination, wait for dialog to return (modal)
if Variable WIZARD Equals NEXT
Set Variable PATH_EXIST to FALSE
Does Folder Exist $TARGETDIR$ (get result into variable PATH_EXIST)
if Variable PATH_EXIST Equals FALSE
MessageBox: Debug, Path doesn't exist, do you want to create it?
else
Set Variable MYCONTINUE to YES
end
else
Set Variable MYCONTINUE to YES
end
wend
Code: Select all
~InstallAware Clipboard Data~
~Wend~
~{7C890109-24E3-40CD-AFB3-92DF8F695CF8}~
~End~
~{25454902-407E-49EB-A1EB-3F9B39E10ECB}~
~Set Variable~
~{F1F59BC9-2DB1-4833-BF4E-2ED9BC9D027E}~
~MYCONTINUE$MYAH$MYAH$FALSE~
~YES~
~Else~
~{5C68AA6B-936E-4488-9D02-B1FC3FA0AB96}~
~Comment~
~{E3BF3935-A674-498F-BB0B-F94D00BFC04D}~
~~
~End~
~{9EE43A17-8987-4BBC-A775-3C5D25CDFB0E}~
~Set Variable~
~{F952C9F7-21D3-49C4-9600-0EFBC73F88DB}~
~MYCONTINUE$MYAH$MYAH$FALSE~
~YES~
~Else~
~{1AFB2F33-A81C-40FE-B6AD-449C2964B24F}~
~MessageBox~
~{56BDF429-1A6C-4146-9BFB-94818279D5F5}~
~Debug~
~Path doesn't exist, do you want to create it?~
~0~
~4~
~MYCONTINUE~
~If~
~{BB27F97E-3041-4EAF-90B0-FC734DB3E156}~
~PATH_EXIST~
~0~
~FALSE~
~FALSE~
~Comment~
~{1572F961-56E3-4C73-B4AF-3586CF4577F9}~
~~
~Does File/Folder Exist~
~{FC8A864F-13D3-4357-BD54-49AB8677A082}~
~PATH_EXIST~
~$TARGETDIR$~
~FALSE~
~Set Variable~
~{EE7DC540-685B-4807-8D1C-B1B455C36A1F}~
~PATH_EXIST$MYAH$MYAH$FALSE~
~FALSE~
~If~
~{08EC56A3-0A00-416C-84FE-CC9747315E68}~
~WIZARD~
~0~
~NEXT~
~FALSE~
~Comment~
~{83DEC2A1-300B-4B59-930D-AB69B5059AFD}~
~~
~Display Dialog~
~{071F427E-D36E-40F7-81E3-DFEEA584AA1C}~
~destination~
~WIZARD~
~TRUE~
~~
~TRUE~
~FALSE~
~While~
~{D58D52B7-EE2C-46A2-A295-79E1E88B3B59}~
~MYCONTINUE~
~0~
~NO~
~FALSE~
~Set Variable~
~{0339AECD-2E44-44A7-96E4-C9886794F4B4}~
~MYCONTINUE$MYAH$MYAH$FALSE~
~NO~
~Label~
~{0940EEDA-8900-45D6-A164-D813A6B34C74}~
~Destination Directory~
Regards
Francesco Toscano
InstallAware Software
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
InstallAware Software
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
Re: Destination Folder
Thank you!
One more problem creating folders:
First: The folder "D:\INSTALL" does not exist.
Manuel Entering "D:\INSTALL" in the Destination Folder works correctly. But: Entering "D:INSTALL" does NOT create the new folder, there is no message and it seems the setup finishes correctly.
Checking it, there is neither a folder "INSTALL" nor any files are copied.
One more problem creating folders:
First: The folder "D:\INSTALL" does not exist.
Manuel Entering "D:\INSTALL" in the Destination Folder works correctly. But: Entering "D:INSTALL" does NOT create the new folder, there is no message and it seems the setup finishes correctly.
Checking it, there is neither a folder "INSTALL" nor any files are copied.
-
FrancescoT
- Site Admin
- Posts: 5361
- Joined: Sun Aug 22, 2010 4:28 am
Re: Destination Folder
Dear User,
Unfortunately with IA it is not available a command to verify if a path is correctly entered.
You could set the edit control property to "RedOnly". But doing this your user can only select a valid and already present path.
Otherwise you could create a custom DLL to handle the path validity.
Then ... you could also check it using the path creation command, just where in the above example you ask the user confirmation.
If the path is created (if exist) that is correct.
Regards
Unfortunately with IA it is not available a command to verify if a path is correctly entered.
You could set the edit control property to "RedOnly". But doing this your user can only select a valid and already present path.
Otherwise you could create a custom DLL to handle the path validity.
Then ... you could also check it using the path creation command, just where in the above example you ask the user confirmation.
If the path is created (if exist) that is correct.
Regards
Francesco Toscano
InstallAware Software
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
InstallAware Software
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
Re: Destination Folder
Thank you Francesco,
"creation command" and "if exist" seems to be the better way for me.
Regards Norbert
"creation command" and "if exist" seems to be the better way for me.
Regards Norbert
-
FrancescoT
- Site Admin
- Posts: 5361
- Joined: Sun Aug 22, 2010 4:28 am
Re: Destination Folder
Francesco Toscano
InstallAware Software
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
InstallAware Software
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE

