howser123
6th March 2005 01:12 UTC
Verifying Directories
Hi
Im trying to verify a file exsists within a directory that the user selects. Basically the program Im installing needs to know where msacess.exe is, so I have used PageEX directory to create a selection page that stores the directory in variable $acessdir. However, I cant for the life of me figure out how to verify that msacess.exe exists within the directory the user has chosen, and thus allow them to progress to the next page (ie. next> button is enabled).
Im a bot of a novice, so Im sure its an easy question....
Thanks
howser123
6th March 2005 10:43 UTC
While I was waiting for a perly I decided to search the archives, and found a few handy scripts to find access versions etc. I also thought that perhaps I could search for access in the registry, and make its path the default when the 'Choose location of msaccess.exe' page comes up. However, can I do this using PageEX, or will I have to use a custom page?
Afrow UK
6th March 2005 11:14 UTC
You need to create a custom page using InstallOptions.
-Stu
howser123
6th March 2005 22:26 UTC
Thnaks Stu, Will give it a try....
Fred4711
17th March 2005 08:56 UTC
@Afrow UK
i dont know how to create a custom page for this Problem.
Can you give us an example ?? Thanks
Afrow UK
17th March 2005 09:17 UTC
Oh sorry, you can still use your PageEx if you want a simple solution.
Inside your PageEX block, use:
PageCallbacks "" "" msaLeave
Then outside create a...
Function msaLeave
IfFileExists "$accessdir\msacess.exe" +3
MessageBox MB_OK|MB_ICONEXCLAMATION "msaccess.exe is not located in that folder!"
Abort
FunctionEnd
-Stu
Fred4711
17th March 2005 10:38 UTC
Thanx a lot, works fine
now only a little Question when i use the Browse Button to select the Directory, the Installer change the Directory when i select c:\temp to c:\temp\installdir.