View Full Version : Determine OS
I have read several pages concerning how to determine the version of particular programs though I was currious if there were a way to obtain the name of the operating system? I have a really nice program, Aida32, which gives a huge portion of system information and it can even output the information to an html file. It has the ability to do all sorts of things including obtain the OS. I could also go to system properties to determine the OS but how would I determing the OS in AM4. I am a computer technician and I'm trying to automate the installation of system utilities and patches. I could simply select the files I want to install though I would rather have AM4 do it for me automatically. I need to be able to store the name of the OS in a variable in order to determine wich patches, files, programs, etc... to install. Would I have to use File.GetInformation (version) maybe? Is there a registry key that I could use to look up the OS and while I'm @ it, the version.
AMS has a number of built in system variables for checking what OS a machine is running, they are:
%IsWin2000%
%IsWin95%
%IsWin98%
%IsWinME%
%IsWinNT3%
%IsWinNT4%
%IsWinXP%
You can set up a series of IF/Then statements to test for each.
TJ_Tigger
11-11-2003, 01:42 PM
Just use the built-in variables to check and see what version of the OS you are using and set a variable accordingly. Here is something simple that checks the OS version and sets a variable to the name of the OS and jumps to the appropriate page in your project for you to install only those applications. Using actions like this you can name the variable whatever you want. Jut by adding the page jumps it doesn't really require the variable with the name of the OS.
IF (%IsWinNT4%)
%OS_Name% = "WinNT"
Page.Jump ("Windows 2000")
END IF
IF (%IsWin2000%)
%OS_Name% = "Win2000"
Page.Jump ("Windows 2000")
END IF
IF (%IsWinME% OR %IsWin98% OR %IsWin95%)
%OS_Name% = "Win9x"
Page.Jump ("Windows 98 & ME")
END IF
IF (%IsWinXP%)
%OS_Name% = "WinXP"
Page.Jump ("Windows XP")
END IF
See here (http://www.indigorose.com/forums/showthread.php?s=&threadid=5562) for a sample project that does something similar.
Tigg
That's just what I was looking for. Thanks. I'll test them out.:D
If anybody's interested I would suggest checking out Aida32. You can download it here (http://www.aida32.hu/download/aida32ee_385.exe).
Or if ya just want to check it out go to http://www.aida32.hu/aida32.php. Thanks again for the quick reply.
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.