Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Prevent Error reporting dialog in runtime apps

Status
Not open for further replies.

awaresoft

Programmer
Feb 16, 2002
373
DE
I'm not sure if the VFP error reporting system exists in the VFP 9 runtime, but I've been asked by a client to have this feature suppressed in one of their applications dealing with highly confidential data. I explained to this customer that the information collected is generic in nature but this customer wants to err on the side of safety and doesn't even want the choice of error reporting displayed to their users.

Any thoughts on how I might disable the error reporting system?

BTW: By error reporting system, I mean the dialog that VFP displays when an application is crashing that offers to send diagnostic info to Microsoft.

Thank you,
Malcolm
 
Somewhere in your main.prg (at the start of your application)
Code:
ON ERROR lErrorWasThrown = .T.
...what this will cause VFP to do is just set the lErrorWasThrown variable to .T. when an error is thrown, rather than bringing up the dialog you speak of. You could instead have VFP do a procedure when an error is thrown...
Code:
ON ERROR Do MyErrorHandler

PROCEDURE MyErrorHandler
     MESSAGEBOX("The system has encountered a problem and will need to shutdown." + chr(13) + "Please contact your system administrator.", 16, "System Problem")
     Quit
ENDPROC


boyd.gif

 
Hi Craig,

The Error Reporting system I'm talking about is the dialog that VFP displays when VFP crashes, i.e. like C0005 errors. This is the dialog that offers to report the error to Microsoft and gives you the choice of sending the error data or canceling the dialog.

I am not talking about the dialog that's displayed when an application raises unhandled errors.

Malcolm
 
Oh, well there is no way to do this. I mean there probably is by monitoring the message queue and trying ot intercept the event that brings up the error, but if that's even possible it would be a monstrous task and not worth the time and effort.

Perhaps, the best way to eliminate these dialogs is to get rid of the C5 errors.

boyd.gif

 
Hi Malcolm,

How long has this customer been using your app? It's not always a good idea to jump through hoops that customers put in your way. I can understand reluctance in saying "No" to the customer, but they aren't always right!

As you said, that dialog only sends generic info (which I think it also writes to a text file on the user's computer, which you could show to the customer) and as Craig said, it would probably take an enormous amount of time to achieve and, as we all know, the more code one writes, the more opportunities we have to introduce new errors.

This customer isn't, by any chance, using roaming profiles for their users logins are they? If they have XP & W2000 computers, this can result in C5 errors (although in my case it never triggered the dialog you are talking about).


Hope that helps,

Stewart
PS If you want to get the best response to a question, please check out FAQ184-2483 first.
 
Craig, Mike, Stewart,

I hear what you're saying about the customer not always being right, but this is an important customer of mine and to be honest, I have a difficult time keeping a straight face (hope that translates to UK) when I tell him that MS solutions are secure. This same customer recently had all IE icons removed from his company's workstations and is now running FireFox pretty much across the board. This has resulted in a significant decrease in security problems and has made him even more adament in his requirement that we disable Microsoft's builit-in Error Reporting functionality.

Here's what I've found out so far:

1. Applications may be able to register themselves as being excluded from ErrorReporting. I base this on my discovery of an ErrorReporting branch in my XP SP 2 registry with an Exclusion sub-branch containing Acrobat's EXE file. I haven't begun to research if this does what I think it might or how portable this convention is across varions flavors of Windows. Even if this is one way to prevent error reporting, the downside is that it requires registry access which is a pain for me as many of my users run my software on locked down PCs.

2. I searched the VFP9R.DLL for references to "DW". I found one DW====.EXE reference. BTW: DW15.EXE and DW20.EXE are the Dr. Watson applications that I believe (???) handle the error reporting we see when an application crashes and attempts to send info to Microsoft. So I'm thinking another strategy may be to edit this runtime DLL and remove the reference to DW (or its ErrorReporting registry string) by replacing the existing value(s) with nulls or an identically sized, but non-existant application or registry key.

Any thoughts?

Malcolm
 
John and Christof,

Thanks for your help. Here's the start of a solution thanks to Sergey on the UT. Here's my reply to Sergey that elaborates on the links he posted:

UT thread reference:

[snipped]
Here's the link I'm using to create a solution for my XP
users:

To exclude programs from error reporting

1. Open System in Control Panel.
2. On the Advanced tab, click Error Reporting.
3. Select Enable error reporting, and then click Choose Programs.
4. Under Do not report errors for these programs, click Add.
5. Type the program's executable name, such as winword.exe for Microsoft Word. If you don't know the program's executable name, click Browse, locate the folder that contains the program, and then double-click the file that has the extension .exe, or lists the file type as application.

[/snipped]

I'm not sure how this feature translates to other versions of Windows (above appears to be XP specific), but this at least gets me started.

Can anyone running Windows 2000 or 9X comment on what's available for these OS's?

Once I understand how ErrorReporting works across versions of Windows, I'm going to add the ability for users to disable Error Reporting for the application being installed based based on the registry keys being set.

Thanks again for everyone's help.

Malcolm
 
Ed,

Wow! Thanks for the link to:

M-005c: Office XP Error Reporting May Send Sensitive Documents to Microsoft

Microsoft Office XP and Internet Explorer version 5 and later are configured to request to send debugging information to Microsoft in the event of a program crash. The debugging information includes a memory dump which may contain all or part of the document being viewed or edited. This debug message potentially could contain sensitive, private information.

- Microsoft Office XP
- Microsoft Internet Explorer 5.0 and later
- Windows XP
- Microsoft has indicated that this will be a feature of all new Microsoft products

DAMAGE: Sensitive or private information could inadvertently be sent to Microsoft. Some simple testing of the feature found document information in one message out of three.

I guess my customer wasn't being as paranoid as we all thought he was. Moral of the story: It is possible for the customer to actually be right sometimes ;)

Malcolm
 

Well, I didn't know it was so easy to disable the "Send to Microsoft" message. I've just done that on my main development system (running XP). Not because I am worried about confidential information being sent, but because I seriously doubt it does any good.

Can anyone running Windows 2000 or 9X comment on what's available for these OS's?

I'll check that next time my old Windows 98 machine is switched on.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

My sites:
Visual FoxPro (www.ml-consult.demon.co.uk)
Crystal Reports (www.ml-crystal.com)
 
Mike,

> Can anyone running Windows 9X comment on what's available for these OS's?

I'll check that next time my old Windows 98 machine is switched on.

Thank you Mike, I'll follow-up on the Windows 2000 side unless someone beats me to the punch.

Malcolm
 
Well, I didn't know it was so easy to disable the "Send to Microsoft" message. I've just done that on my main development system (running XP). Not because I am worried about confidential information being sent, but because I seriously doubt it does any good.

Mike-you're dead wrong about that. The VFP team takes those reports seriously. I've been involved in or observed many discussions where the team worked hard to figure out what caused a particular crash.

While I don't have the same relationship with other teams at Microsoft, I know I've read comments from them on how helpful the error reporting by users has been in fixing bugs.

Tamar
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top