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

  • Thread starter Thread starter Paul Bromley
  • Start date Start date
P

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top