pc specs


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[2] 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
  	close theFile	
  	deleteFile theTempFilename 
 "Microsoft Windows XP [Version 5.1.2600]"

The MAX Version can be retrieved a lot easier using simply

  theVer = (maxVersion())[1]/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)"


Those worked great! Thanks for response. Wondering if there’s a activex or simple java command that could be used to get the processor information. It’s mainly just for geek data for now, though. :wink:


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 :wink:


Thanks for incredible help you’ve given. Wouldn’t be able to learn so much of this without help you’ve given. =)


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.

However found this which might work.

Links explain how javascript is being used on an html page to activex called: WbemScripting.SWbemLocator or WMI (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/wmi_classes.asp)

Have looked through activex’s available in 3ds Max (using VisualActiveX-swamitized! from swami) and can’t seem to find anything WMI listed. I’m guessing best way to get data would be to have html on maxscript page and simply get data into a string which could be put into edittext box. Hoping there’s better way to do this which skips html and javascript extra code completly though.


Here’s what I’ve been working on. Have managed to be able to find PC info such as memory, memory ram, os version, cpu info using WbemScripting.SWbemLocator which is accesable using javascript. Couldn’t figure out how to simply open javascript within activex in Max so opened using seperate html file. Code is still choped up but somewhat works.

Was planning on simply opening html at bottom of dialog box in Max and having maxscript read globals from javascript or html. That didn’t work so then tried using clipboard to copy information in one large string which could then be parsed and converted into maxscript strings before put into edittext boxes. Havn’t had any luck with that either.

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.


Here’s latest version of ‘pc spec’. Includes two files: maxscript and html (which includes javascript). To run be sure to change ‘global urlform’ to correct folder on your own computer.

Don’t know if it’s possible but would be easier if javascript or html code could be embeded within maxscript code. Tried doing this with MSHTML without much luck. Based on this post: http://forums.cgsociety.org/showthread.php?t=356371&highlight=MSHTML not to sure it’s possible.

Let me know if anyone has trouble with running this. Has anyone else experimented with being able to run javascript or html code within maxscript?


Here’s another update. Added “html” button which allows user to select html file with javascript code rather than having to go to maxscript code to make change. Also added error messagebox’s which determines if avgguard extension is installed (required to run) as well as checks to make sure html file is available to run code.


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.


This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.