Home All Groups Group Topic Archive Search About

Error Trapping for trying to run an exe file without supporting files

Author
11 Jan 2006 7:54 PM
Paul Bromley
I have distributed an exe file that depends on a number of other files and
directories within the application directory. Do not ask me why some peopel
should choose to do this, but for some strange reason a number of people are
trying to run the exe file from the desktop or elswhere outside the file
structure that is required. Is there any easy way of error checking this,
and informing the user??

Best wishes

Paul Bromley

Author
12 Jan 2006 12:01 AM
PJ on Development
Hi Paul,

Well, the easiest way to do this is to check for the file presense
before running any real code.

I use to check for the files I need first, and when I don't find them I
ask the user where they are and store it on my application settings
(INI File, Registry, whatever) so the next time I know where to look
when I need them.

But if the files you need are somewhat a must have (such as Assemblies,
and other supporting file) then instead of asking the user where the
files are you just show the user an error message and exit the
application gracefully.

I hope it helps,

PJ
http://pjondevelopment.50webs.com
Author
14 Jan 2006 8:27 PM
Paul Bromley
Thanks PJ,

I thought that there may be an easier way rather than checking all my
required files, but I will do this.


Thanks

Paul

Show quoteHide quote
"PJ on Development" <pjondevelopm***@gmail.com> wrote in message
news:1137023995.474678.171150@o13g2000cwo.googlegroups.com...
> Hi Paul,
>
> Well, the easiest way to do this is to check for the file presense
> before running any real code.
>
> I use to check for the files I need first, and when I don't find them I
> ask the user where they are and store it on my application settings
> (INI File, Registry, whatever) so the next time I know where to look
> when I need them.
>
> But if the files you need are somewhat a must have (such as Assemblies,
> and other supporting file) then instead of asking the user where the
> files are you just show the user an error message and exit the
> application gracefully.
>
> I hope it helps,
>
> PJ
> http://pjondevelopment.50webs.com
>