Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

How to check for invalid characters in path


2 replies to this topic

angp

angp
  • Full Members
  • 49 posts

Posted 12 January 2006 - 05:47

Hi,

Anyone knows how to check for invalid characters in installation path?

angp

angp

angp
  • Full Members
  • 49 posts

Posted 12 January 2006 - 05:47

I mean from custom action, using C++ code, how to validate that the installation path specified by user do not contain invalid characters.

Edited by angp, 12 January 2006 - 05:48.


Zweitze

Zweitze
  • Full Members
  • 522 posts

Posted 12 January 2006 - 09:27

If you want to validate a supplied folder:
The best way is using the control event (not custom action!) SetTargetPath, when the supplied path does not qualify, a suitable message is shown and all remaining control events are skipped.

SetTargetPath checks for many properties, eg. not existing drives, valid characters, read-only folders, volumes without support for long file names, etc.

If you're just after a name to be used for a file:
In the temp folder, create a unique folder, in that folder try creating a file with the supplied name.