| Author |
How To Get OS Version
|
Gregg Bolinger
Ranch Hand
Joined: Jul 11, 2001
Posts: 15229
|
|
I am writing an app that uses some commands such as CMD.EXE and COMMAND.COM to do the same tasks. So I need to know which OS version the App is running on to determine which one I need to use. Is there a way to do this? ------------------ Happy Coding, Gregg Bolinger
|
 |
Junilu Lacar
Bartender
Joined: Feb 26, 2001
Posts: 4115
|
|
The only thing I can think of right now is to parse the output of the DOS ver command. Junilu
|
Junilu - [How to Ask Questions] [How to Answer Questions] [MiH]
|
 |
Gregg Bolinger
Ranch Hand
Joined: Jul 11, 2001
Posts: 15229
|
|
Is that not a similar command such as DIR which I would then need the correct CMD or COMMAND to execute it? I guess I could try both and find out which one works and use it. Thought maybe there was a more programmable way to do it. ------------------ Happy Coding, Gregg Bolinger
|
 |
Junilu Lacar
Bartender
Joined: Feb 26, 2001
Posts: 4115
|
|
I don't know what I was thinking earlier...
|
 |
Gregg Bolinger
Ranch Hand
Joined: Jul 11, 2001
Posts: 15229
|
|
Ah, you kick butt. Thanks a lot!! Another question. In the API anywhere does it tell what Strings are allowed in the getProperty() method? ------------------ Happy Coding, Gregg Bolinger
|
 |
Junilu Lacar
Bartender
Joined: Feb 26, 2001
Posts: 4115
|
|
|
http://java.sun.com/j2se/1.3/docs/api/java/lang/System.html#getProperties()
|
 |
Gregg Bolinger
Ranch Hand
Joined: Jul 11, 2001
Posts: 15229
|
|
Once again, you kick serious tail. Thanks so much!! ------------------ Happy Coding, Gregg Bolinger
|
 |
 |
|
|
subject: How To Get OS Version
|
|
|