Another question (sorry for the lot for this week)!
I’m looking for way to get PC specs for computer rendering. I’ve found code for getting memory and 3ds Max version but am also trying to get info for what OS is being used, graphics card, and processor info.
for memory I’m using following:
for i=2 to 7 do r[i] /= (1024*1024.)
mem = (r as integer)
[size=2]and for Max version I’m using this:[/size]
[size=1]s = (MaxVersion() as string)
ss = substring s 3 2
s_version = (((ss as integer) * 0.1) as string)
Here is a function to get the Windows Version String via the command prompt:
fn getWindowsVersionString =
local theTempFilename = "c:\ emp\\_command.txt"
doscommand ("ver >"+theTempFilename)
local theFile = openFile theTempFilename
local windowsVersion = ""
while not eof theFile do
str = readline theFile
if matchPattern str pattern:"*Version*" then
windowsVersion = str
"Microsoft Windows XP [Version 5.1.2600]"
The MAX Version can be retrieved a lot easier using simply
theVer = (maxVersion())/1000.0
MAXScript can give you the number of CPUs but AFAIK not their type.
You might want to use some freeware external app. to scan your machine’s hardware and output the info to a file you can parse…
For the graphics card, you can get the Graphics Driver string which usually includes the card type, too. For example on my machine I get
"Direct3D 9.0 (NVIDIA Quadro FX 4000)"
There is a System Info activeX control installed on my PC, but I could not find enough info on its usage and when I tried to use it it locked up my Max so I had to kill it.
If you want, see what activeX controls are installed on your machine and play with them. I don’t have the time to solve every problem
Been looking for some sort of solution which might work to get pc spec data. Most activex’s I’ve found on net are shareware or pay so wouldn’t work for anyone wanting to get data easily. Could do something that could dig through the user’s registry but don’t want to go that in depth as of yet.
Thought I’d post what I had so far to see if anyone could help figure out how to get this to work.
BTW: to run you need to change:
global urlForm = “F:\plugins\pc info\pc spec\pc-test-8.html” to whatever folder is on your hard drive to run.
Yet again another update. This time it can read your local hard drive and tells you name of drive, file space, total size, etc. Each drive has progress bar which shows amount of file space for each drive as well as percentage. Let me know if anyone is able to get it to work.
Added new bit where listed hard drives are color coded according to what kind of drive they are (ex. Network drive, hard drive, CD, floppy). Also window is resized in height depending on number of drives listed for that local computer.