Error: Path contains invalid characters

Got a problem you cannot solve? Try here.
anja_laenge
Posts: 121
Joined: Tue Nov 20, 2012 1:02 am

Error: Path contains invalid characters

Postby anja_laenge » Thu Jul 24, 2014 2:22 am

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

FrancescoT
Site Admin
Posts: 5361
Joined: Sun Aug 22, 2010 4:28 am

Re: Error: Path contains invalid characters

Postby FrancescoT » Thu Jul 24, 2014 11:14 am

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
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

anja_laenge
Posts: 121
Joined: Tue Nov 20, 2012 1:02 am

Re: Error: Path contains invalid characters

Postby anja_laenge » Fri Jul 25, 2014 1:04 am

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

FrancescoT
Site Admin
Posts: 5361
Joined: Sun Aug 22, 2010 4:28 am

Re: Error: Path contains invalid characters

Postby FrancescoT » Fri Jul 25, 2014 10:34 am

Dear Anja,

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


Return to “Technical Support”

Who is online

Users browsing this forum: Baidu [Spider] and 89 guests