473,493 Members | 2,274 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

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

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
Jan 11 '06 #1
2 1008
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

Jan 12 '06 #2
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

"PJ on Development" <pj*************@gmail.com> wrote in message
news:11**********************@o13g2000cwo.googlegr oups.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

Jan 14 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

67
4188
by: Steven T. Hatton | last post by:
Some people have suggested the desire for code completion and refined edit-time error detection are an indication of incompetence on the part of the programmer who wants such features. ...
6
4706
by: Peter Frost | last post by:
Please help I don't know if this is possible but what I would really like to do is to use On Error Goto to capture the code that is being executed when an error occurs. Any help would be much...
3
6857
by: Nathan Bloomfield | last post by:
Hi there, I am having difficulty with a piece of code which would work wonders for my application if only the error trapping worked properly. Basically, it works as follows: - adds records...
13
4430
by: Thelma Lubkin | last post by:
I use code extensively; I probably overuse it. But I've been using error trapping very sparingly, and now I've been trapped by that. A form that works for me on the system I'm using, apparently...
9
3183
by: Tim D | last post by:
Hi, I originally posted this as a reply to a rather old thread in dotnet.framework.general and didn't get any response. I thought it might be more relevant here; anyone got any ideas? My...
2
4418
by: Keith Kowalski | last post by:
I anm opening up a text file reading the lines of the file that refer to a tif image in that file, If the tif image does not exist I need it to send an email stating that the file doesn't exist...
6
8144
by: sara | last post by:
I have a procedure to automate bringing several Excel files into our Access tables, on a daily basis. The problem is that if the user has a problem, and tries to run the import again (maybe 3...
0
9761
by: Buddy Home | last post by:
Hello, I'm trying to upload a file programatically and occasionally I get the following error message. Unable to write data to the transport connection: An established connection was aborted...
3
4492
by: GazK | last post by:
I have been using an xml parsing script to parse a number of rss feeds and return relevant results to a database. The script has worked well for a couple of years, despite having very crude...
0
6989
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7157
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7195
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7367
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5453
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4889
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3088
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3078
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1400
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.