Hi,
using a standard template for a win32 setup project I ran into the following situation:
In the destination folder dialog a user ibserted an invalid character into the path of the targetdir.
The setup continued without prompting the error, tried to install and stopped with an error.
I found no function to check via regexp or via string contains.
What is the correct way to ensure valid user input?
Regards
Anja
Error: Path contains invalid characters
-
- Site Admin
- Posts: 5361
- Joined: Sun Aug 22, 2010 4:28 am
Re: Error: Path contains invalid characters
Dear Anja,
Honestly, I never seen an installer that checks the destination path.
You could eventually create a specialized routine but there is nothing ready to use for this purpose.
Anyway the most efficient way to verify if the entered path is correct, it is ; first check if already exist and if not, try to create it.
Hope this helps you.
Regards
Honestly, I never seen an installer that checks the destination path.
You could eventually create a specialized routine but there is nothing ready to use for this purpose.
Anyway the most efficient way to verify if the entered path is correct, it is ; first check if already exist and if not, try to create it.
Hope this helps you.
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
-
- Posts: 121
- Joined: Tue Nov 20, 2012 1:02 am
Re: Error: Path contains invalid characters
FrancescoT wrote:Dear Anja,
Honestly, I never seen an installer that checks the destination path.
You could eventually create a specialized routine but there is nothing ready to use for this purpose.
Anyway the most efficient way to verify if the entered path is correct, it is ; first check if already exist and if not, try to create it.
Hope this helps you.
Regards
No. I don't want to check for a valid path reagarding the file system but the spelling/syntax.
A setup created with InstallAware starts with the installatiom process, tries to modify the target system and THEN notices that the secified path name contains an invalid character.
I would expect a validation when the user tries to leave the destination dialog so that he can be prompted for his error and is not allowed to continue.
Especially in a project where the user has to go through lots of dialogs to do configuration stuff it is really annoying to get a hint to the error at the very end; additionally the setup quits with a message of the failure and he has to start the whole process again without a chance to just go back several steps and correct his error and use the already entered values. That is inacceptable.
Regards
Anja
-
- Site Admin
- Posts: 5361
- Joined: Sun Aug 22, 2010 4:28 am
Re: Error: Path contains invalid characters
Dear Anja,
It is in this way with most of the installers (if not all)... even those distrubuted by Microsoft.
The above method is used to check the "path syntax" ... and the most efficient way to do it, it's to create the path.
Obviously, the same path should be deleted just after.
Regards
It is in this way with most of the installers (if not all)... even those distrubuted by Microsoft.
No. I don't want to check for a valid path reagarding the file system but the spelling/syntax.
The above method is used to check the "path syntax" ... and the most efficient way to do it, it's to create the path.
Obviously, the same path should be deleted just after.
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
Who is online
Users browsing this forum: No registered users and 120 guests