March 29, 2024, 10:02:32 AM

News:

Own IWBasic 2.x ? -----> Get your free upgrade to 3.x now.........


CSystem class

Started by ExMember001, September 16, 2007, 01:43:02 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

ExMember001

September 16, 2007, 01:43:02 PM Last Edit: September 28, 2007, 11:09:56 PM by KrYpT
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;


Todd Riggins

Brought to you buy: http://www.exodev.com

pistol350

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
Regards,

Peter B.

ExMember001


ExMember001

should works now ;)
i dont have all the Windows OS on my machine so if your os is not display correctly, report here please

pistol350

Ok. I will give it another try and see exactly the change that you brought to the code  ;)
Regards,

Peter B.

pistol350

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
Regards,

Peter B.

Todd Riggins

Yup, XP Pro here... works with newer version ;D
Brought to you buy: http://www.exodev.com

ExMember001


Haim

Just saw it.
Great job!
Thanks.
Haim

ExMember001

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.