Archive: Verifying Directories


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


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?


You need to create a custom page using InstallOptions.

-Stu


Thnaks Stu, Will give it a try....


@Afrow UK
i dont know how to create a custom page for this Problem.
Can you give us an example ?? Thanks


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

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.