Results 1 to 1 of 1
Here's an interesting one. I want to write a script, program, or what have you that is platform-independent and that will detect the operating system of the host computer. What ...
- 01-24-2010 #1Just Joined!
- Join Date
- Dec 2006
- Posts
- 41
Platform-independent way to detect operating system?
Here's an interesting one. I want to write a script, program, or what have you that is platform-independent and that will detect the operating system of the host computer. What I want to use it for is to execute os-specific operations when a flash drive is plugged in.
My initial thought was to do this in an autorun.inf file since most Linux distros can interpret these as well as Windows. However, I don't think there is a way to do conditional statements in an *.inf file since it's not technically a script. So, my second thought is to write a Java program that executes via a JVM since most people have JVM installed. If there is an *inf way to do it, that's easier. However, the Java way would work, too. Thoughts?
Thanks!


Reply With Quote