IonicWind Software

Aurora Compiler => Tips and Tricks => Topic started by: ExMember001 on September 16, 2007, 01:43:02 PM

Title: CSystem class
Post by: ExMember001 on September 16, 2007, 01:43:02 PM
Here's a little class to get some system informations and launch an external application

Methods include:

Execute an application and wait until it close
App = path to application in a string
Command = string that contain the command
WaitTillClose = true to wait until app close, false|null doesnt wait  (Optionnal)
Hide = true to hide, false|null to show the console                   (Optionnal)
LaunchAPP(string App, string Command, opt int WaitTillClose, opt int Hide);

Return the current Windows Username in a String
GetSystemCurrentUsername(),STRING;

Return current window version name in a String
GetWinOSName(),STRING;

Return current windows version type in a String
GetWinOSProductTypeNT(),STRING;

Return the current Service Pack into a string
GetWinOSServicePack(),STRING;

Title: Re: CSystem class
Post by: Todd Riggins on September 16, 2007, 03:11:52 PM
Pretty cool class  ;D
Title: Re: CSystem class
Post by: pistol350 on September 16, 2007, 03:52:06 PM
Yep!Nice code.
The only mistake i found through the answers given by the test is about my OS which is not XP Pro but XP Home

Anyway, great code as Todd said  ;)

Cheers,
PeterB
Title: Re: CSystem class
Post by: ExMember001 on September 16, 2007, 04:02:30 PM
oups ;)
will check that  ;D
Title: Re: CSystem class
Post by: ExMember001 on September 16, 2007, 04:15:12 PM
should works now ;)
i dont have all the Windows OS on my machine so if your os is not display correctly, report here please
Title: Re: CSystem class
Post by: pistol350 on September 16, 2007, 04:28:26 PM
Ok. I will give it another try and see exactly the change that you brought to the code  ;)
Title: Re: CSystem class
Post by: pistol350 on September 16, 2007, 04:42:48 PM
Yep!
It works fine here now.
But i 'll be completely relieved when someone who runs it under Xp Pro tells us that it works well  :D


Cheers,
PeterB
Title: Re: CSystem class
Post by: Todd Riggins on September 16, 2007, 04:58:33 PM
Yup, XP Pro here... works with newer version ;D
Title: Re: CSystem class
Post by: ExMember001 on September 16, 2007, 06:12:59 PM
great thanx  ;D
Title: Re: CSystem class
Post by: Haim on September 16, 2007, 11:43:30 PM
Just saw it.
Great job!
Thanks.
Haim
Title: Re: CSystem class
Post by: ExMember001 on September 28, 2007, 11:09:38 PM
I just got my new Rocket fire Hp pavillon ... great machine ;) which come with vista ...
and i've found thats some info for vista was'nt correct with the method GetWinOSName(),STRING;

so here's a fix, now vista is correctly found ;)
... well home and premium, i don,t see a way to detect ultimate ...

file can be found in the first post.