Generate system info without Exception?

contains all delphi packages mentioned below
Post Reply
ralfiii
Posts: 11
Joined: Mon Oct 19, 2009 1:13 pm

Generate system info without Exception?

Post by ralfiii »

Hello!

Is it possible to get a system information in a string? (like the 1st section of a bugreport).

My software behaves strange on a customers computer, but it doesn't crash.
I'd like to put together a tool that collects some data, also the operating system etc.

Thanks,
Ralf S.
madshi
Site Admin
Posts: 10754
Joined: Sun Mar 21, 2004 5:25 pm

Re: Generate system info without Exception?

Post by madshi »

Sorry for the late reply.

You have 2 options:

(1) madExcept.pas exports most of the functions used for generation the first section of the bug report. See here:

http://help.madshi.net/madExceptUnit.htm#IsUserAdmin

(2) You can also call "madExcept.CreateBugReport" and delete everything after the first empty line.
ralfiii
Posts: 11
Joined: Mon Oct 19, 2009 1:13 pm

Re: Generate system info without Exception?

Post by ralfiii »

madshi wrote: (1) madExcept.pas exports most of the functions used for generation the first section of the bug report. See here:
http://help.madshi.net/madExceptUnit.htm#IsUserAdmin
Superb, thanks! The only function that I am missing is one to generate a disk-info line like this one:
"free disk space : (C:) 75,85 GB (D:) 83,85 GB"

Cheers!
Ralf
madshi
Site Admin
Posts: 10754
Joined: Sun Mar 21, 2004 5:25 pm

Re: Generate system info without Exception?

Post by madshi »

You will find the code for that in madExcept.pas in this function:

function GetDiskStr(drive: AnsiChar) : AnsiString;
ralfiii
Posts: 11
Joined: Mon Oct 19, 2009 1:13 pm

Re: Generate system info without Exception?

Post by ralfiii »

madshi wrote:You will find the code for that in madExcept.pas in this function:
function GetDiskStr(drive: AnsiChar) : AnsiString;
Yeah, but you have to copy quite a bit of code around, simply cuttong out the GetDiskStr doesn't do it...
Post Reply