SRL Archive - OSR Help

OS Reader


Death12652

2010-08-21 15:59:39

Can you get scar to find out the OS on the computer that it is running on?

EvilChicken!

2010-08-21 16:37:23

I'm pretty sure you can with Simba ;)

Wizzup?

2010-08-21 16:38:48

With Simba you can use defines.


{$IFDEF WINDOWS}
os:='windows';
{$ELSE}
os:='linux';
{$ENDIF}


Death12652

2010-08-21 16:59:47

My script is in Scar and I want it to tell if its windows vista or windows 7. Anyone?

i luffs yeww

2010-08-21 17:10:10

Use Simba, first of all. Second of all, I'm sure there's a way. I dunno, personally, but someone has to.

Wizzup?

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?


http://stackoverflow.com/questions/57124/how-to-detect-true-windows-version
http://www.codeproject.com/KB/winsdk/osdetect.aspx

Dan Cardin

2010-08-21 18:24:36

From: EvilChicken!
I'm pretty sure you can with Simba ;)

you can in java too! with this!
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!

Wizzup?

2010-08-22 04:52:25

Why don't you offer a solution instead, Dan?

Daniel

2010-08-22 05:22:12

From: death12652
I want it to tell if its windows vista or windows 7.


For what purpose do you desire to know whether the Windows kernel version is Vista or 7?

Dan Cardin

2010-08-22 19:37:17

From: Wizzup?
Why don't you offer a solution instead, Dan?


my solution was equally as valid as his post (EvilChicken), your first, and iluffsyou's in relation to the question asked.

Wizzup?

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.


I don't think so. He asked for OS detection which we all interpreted as Windows/Linux/Mac etc. Not differences between NT kernels. It was before he clarified this that I posted my solution.
After he posted this, I linked him to two other solutions that he could try.
You just made a miserable post by pointing out that we didn't help him with SCAR but rather with Simba (as that is what SRL is supporting these days) and therefore posting Java trying to point out that posting Simba code didn't help him at all.

Dan Cardin

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"

Wizzup?

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"


Luckily the first part of my post (the one you didn't quote for whatever reason) already gave an argument to what you posted just now. Obviously the comparison you just made is utterly wrong and the worst is that you know it is… I hope.

You don't seem to realise that if someone wrote a function that used WinAPI functions to determine the NT version in Simba, it could be used in SCAR as well.

Dan Cardin

2010-08-23 21:04:55

who was arguing against any API functions? I mentioned your first post, EvilChicken's and i luffs yeww's posts. None of which mention any.

Then i didnt see how everyone interpretting his question as having to do with Windows/Linux/Mac etc being applicable to my argument because that is not at all what I was talking about. Nor, i think would it have to do with my metaphor. What i did quote was applicable though, and makes me wonder why you seem to be confusing the points of my speaking…since what I did quote shows you DO know afterall. :confused:

Death12652

2010-08-24 03:00:43

uuuhhhh. Okay big arguement there lol. Anyway thanks and I will see what I can do with what you gave me.

Wizzup?

2010-08-24 04:49:50

I'm also interested as to why you want to know the OS you're running on. ;)

Freddy1990

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.


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.

Death12652

2010-08-26 03:49:59

Hey thanks freddy1990. And I wanted to know the OS and Kernal or whatever it was called becuase of certain fuctions I have made using scar/simba.

Daniel

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.

Ooh, competition. The last one standing is the winner!
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.

Like what functions?