Saving bug report

contains all delphi packages mentioned below
Post Reply
A. Balslev
Posts: 15
Joined: Fri Apr 06, 2012 2:40 pm

Saving bug report

Post by A. Balslev »

Hi
IDE: Delphi XE2
OS: Win7
I do not know how I can decide an alternative path that the executables directory to store the bugreport.
The problem is that during installation of my application, it needs administrative rights with the permission to write files in the executable directory.
But in the daily life, the application runs, and the application cannot write, change or delete any file in the executable directory.
I do have a special folder which has no restriction in writing, and I want to make use of this folder to put bugreports in.
How can I do this?

Anders Balslev
madshi
Site Admin
Posts: 10754
Joined: Sun Mar 21, 2004 5:25 pm

Re: Saving bug report

Post by madshi »

If you're using the latest madExcept 3.0n, madExcept should automatically save the bug report to the user's "app data" folder (e.g. "C:\Users\Current User Name\Application Data\madExcept\bugreport.txt"), if your application doesn't have write access to the exe folder. If you don't like that, you can change the path here:

http://help.madshi.net/madExceptSettings7.htm

Just replace "bugreport.txt" there with a fully qualified file path. But be cautious, Windows special folders are not always at the same position, depending on OS version and language. You can use the %placeholders% listed here:

http://help.madshi.net/madExceptSettings10.htm

Or alternatively you can also change the bug report path at runtime, e.g. like this:

Code: Select all

program YourProgram;

[...]

begin
  MESettings().BugReportFile := 'c:\bla.txt';
end.
A. Balslev
Posts: 15
Joined: Fri Apr 06, 2012 2:40 pm

Re: Saving bug report

Post by A. Balslev »

Thank you very much
It was exactly what I was looking for

b.r.
Anders :D
Post Reply