Jump to content

OS detection


87052402

Recommended Posts

I have a mirc script made by my own

 

Home is use Linux .. i run mirc with wine

 

And at my work is use windows

 

Now i wanne make a kind of system that can detect the os

 

So that if i run windows mirc run the programs for my work

 

and at home only the program's that i need home

 

but i have no idea to do this..

 

can somebody help me with that??

 

 

Link to comment
Share on other sites

This will check to see what operating system you are running, and if any of those systems are found will execute whatever commands you wish.

 

The else statement will only activate if said operating systems aren't found, and will execute whatever commands you put in...

 

on *:START: {
 if ($os == 95) || ($os == 98) || ($os == NT) || ($os == ME) || ($os == 2K) || ($os == XP) || ($os == NET) {
   <commands here>
 }
 else {
   <commands here>
 }
}

Link to comment
Share on other sites

$os returns the windows version you're using. i think wine returns an early windows version but i cant remember which.

i havent had much experience with wine but maybe you could use something like

if ($exists(/root)) { echo -a linux }

Link to comment
Share on other sites

  • 1 month later...
  • 2 months later...
Guest
This topic is now closed to further replies.
×
×
  • Create New...