Death12652
2010-08-21 15:59:39
Can you get scar to find out the OS on the computer that it is running on?
2010-08-21 15:59:39
2010-08-21 16:37:23
2010-08-21 16:38:48
{$IFDEF WINDOWS}
os:='windows';
{$ELSE}
os:='linux';
{$ENDIF}
2010-08-21 16:59:47
2010-08-21 17:10:10
2010-08-21 17:10:48
From: death12652
My script is in Scar and I want it to tell if its windows vista or windows 7. Anyone?
2010-08-21 18:24:36
From: EvilChicken!
I'm pretty sure you can with Simba ;)
public class DetermineOS {
public static void main(String[] args) {
/*
* Get os.name system property using
* public static String getProperty(String name) method of
* System class.
*/
String strOSName = System.getProperty("os.name");
System.out.print("Get OS name example.. OS is ");
if(strOSName != null)
{
if(strOSName.toLowerCase().indexOf("windows") != -1)
System.out.println("Windows");
else
System.out.print("not windows");
}
}
} what a coincidence!
2010-08-22 04:52:25
2010-08-22 05:22:12
From: death12652
I want it to tell if its windows vista or windows 7.
2010-08-22 19:37:17
From: Wizzup?
Why don't you offer a solution instead, Dan?
2010-08-23 05:31:12
From: Dan Cardin
my solution was equally as valid as his post (EvilChicken), your first, and iluffsyou's in relation to the question asked.
2010-08-23 09:16:59
You just made a post by pointing out that we didn't help him with SCAR but rather with Simba and therefore posting Java trying to point out that posting Simba code didn't help him at all.yep basically. It's like asking for help with firefox and being told, "I can help you if you were using Chrome". My post was the same in that i was telling him "This is your solution in Opera"
2010-08-23 09:34:11
From: Dan Cardin
yep basically. It's like asking for help with firefox and being told, "I can help you if you were using Chrome". My post was the same in that i was telling him "This is your solution in Opera"
2010-08-23 21:04:55
2010-08-24 03:00:43
2010-08-24 04:49:50
2010-08-24 11:24:25
From: death12652
uuuhhhh. Okay big arguement there lol. Anyway thanks and I will see what I can do with what you gave me.
begin
if OperatingSystem = osWin7 then
WriteLn('Windows 7!');
end.
2010-08-26 03:49:59
2010-08-26 03:58:56
From: Freddy1990
I've added a function "OperatingSystem" to SCAR 3.25, was on my todo list as 3.25 has a few platform specific components. You can find it here: http://freddy1990.net/svn/scarprerelease/begin
if OperatingSystem = osWin7 then
WriteLn('Windows 7!');
end.
From: death12652
And I wanted to know the OS and Kernal or whatever it was called becuase of certain fuctions I have made using scar/simba.