Indigo Rose Software

Professional Software Development Tools

 
Page 1 of 2 1 2 LastLast
Results 1 to 15 of 16

Thread: CPU Info

  1. #1
    Join Date
    Oct 2003
    Location
    West Monroe, LA
    Posts
    294

    CPU Info

    How can I report CPU information like; Type, Speed, Load etc.
    I use the memory function in AMS just fine just looking for more info.

    Mark

  2. #2
    Josué Alba Guest
    Well just a question you ask for type, but type of waht?? you mean the pocessor info??

  3. #3
    Join Date
    Oct 2003
    Location
    West Monroe, LA
    Posts
    294
    Yes, Intel, AMD, Pent IV any info I can get from a system.

  4. #4
    Join Date
    Dec 2003
    Location
    Location! Location!
    Posts
    6,137
    This link has a couple ways of accomplishing such:

    http://www.indigorose.com/forums/sho...light=msinfo32

    Sincerely,
    Intrigued

  5. #5
    Join Date
    Jan 2000
    Posts
    2,002
    There is no built-in variables for those things in AMS50. We have looked at doing that in the past but due to the fact that we need to support a wide range of operating systems and the different ways to get this information for different processors, it has not been feasible so far.

  6. #6
    Join Date
    Oct 2003
    Location
    West Monroe, LA
    Posts
    294
    Thanks again for the quick responces.

  7. #7
    SUF6NEWBIE Guest
    You may also like to explore the below Registry Key:

    [HKEY_LOCAL_MACHINE\HARDWARE\DESCRIPTION\System\Cen tralProcessor\0]

    There is a wealth of reliable information that can be returned from this area
    of the registry:

    the value: ~MHZ if read by AMS will return the CPU Clock speed
    (if the 'length' of returned string is 4 - then you are in the GigHz range)

    the value: VendorIdentifier will return CPU manuafacturer

    Above are present on Win2K and later..so could use the first two at least

    not on all systems: ProcessorNameString

    note: if system is 'Multi-threading' capable and has been Enabled in the BIOS

    [HKEY_LOCAL_MACHINE\HARDWARE\DESCRIPTION\System\Cen tralProcessor\1]

    is present also (or if genuine 'Dual Processors)

    May come in handy for quick Cpu speed checking at least ..(and manufacturer
    Last edited by SUF6NEWBIE; 12-10-2004 at 10:24 PM.

  8. #8
    SUF6NEWBIE Guest
    Here's some LUA code for AMS5 and SUF70
    (tested on Win2k and later OSs only)

    Returns a boolean as to whether 'required CPU specs' have been met

    Code:
    function GetCPUSpecs() --test for Cpu Speed and Manufacturer
    --set some values for 'Min CPu speed' and 'Supported Manufacturer'
    local CpuMin = 500; --500 Mhz clock speed-minimum requirement
    local Man1 = "intel"; -- approved manufacturer target strings
    local Man2 = "amd"; --      "           "      "        "
    bCpuspecsmet = false; -- set global initial value
    local strCpuRegKey = "HARDWARE\\DESCRIPTION\\System\\CentralProcessor\\0\\";
    local CpuInfo_T = Registry.GetValueNames(HKEY_LOCAL_MACHINE, strCpuRegKey);
    --cycle valuenames for 'required' specifications
    for cpuindex, cpuvalue in CpuInfo_T do
    	Dialog.Message("Debug info only: valuename-", cpuvalue);
    	if (cpuvalue == "~MHz") then
    		Cpuspec = String.ToNumber(Registry.GetValue(HKEY_LOCAL_MACHINE, strCpuRegKey, cpuvalue, true));
    	end
    	if (cpuvalue == "VendorIdentifier") then
    		Manspec = Registry.GetValue(HKEY_LOCAL_MACHINE, strCpuRegKey, cpuvalue, true);
    	end
    end
    if (Cpuspec ~= "") and (Manspec ~= "") then
    	if (Cpuspec >= CpuMin) then
    		if (String.Find(Manspec, Man1, 1, false) ~= "-1") or (String.Find(Manspec, Man2, 1, false) ~= "-1") then
    		Dialog.Message("Debug info only: returned Specs", "CPU clock speed:-"..Cpuspec.."\r\nManufacturer:-"..Manspec.."\r\n\r\nMin target Cpu speed:-"..CpuMin);
    		bCpuspecsmet = true;				
    		end	
    	end
    end
    return bCpuspecsmet;
    end --GetCPUSpecs()
    TO CALL IT ..say in startup actions..

    Code:
    GetCPUSpecs();
    -- will return true or false as below example:
    
    if (not bCpuspecsmet) then
    Dialog.Message("This Application Cannot Continue","Minimum Required System CPU Specifications were not met");
    end
    if (bCpuspecsmet) then
    Dialog.Message("This Application Can Continue","Minimum Required System CPU Specifications Have been met");
    end
    ..there is also another value named: Identifier.
    (if you wish to include this one in above function..what you are looking for is
    eG: Stepping 3)
    as far as I am aware:
    'Stepping 1' equates to Celeron -Amd Duron equiv
    'Stepping 3' equates to PIII or equivelent
    'Stepping 9' is one known value for PIV (with multi threading)

    I anyone can confirm the 'stepping values' during testing let us know..
    Please report if Code Functions reliably for your testing.
    (so far so good at my end..)

  9. #9
    SUF6NEWBIE Guest
    ..fiddle with the code if only wish to check for and or display CPu speed etc.
    (supported manufacturer 'required' stuff --only if essential ?)

    ..if want to display CPu speed suggest checking if length of string is 4
    then string.mid (first 2) then modify the string to show eg:
    if value is 2411 for cpu speed , a 'user friendly' would be 2.4ghz or similar

  10. #10
    SUF6NEWBIE Guest
    Here's a 'safer' modifiaction ..only does CPu Check and provides a display string

    Code:
    function GetCPUSpecs()
    bCpuspecsmet = true;
    local CpuMin = 500; --500 Mhz min req
    local strCpuRegKey = "HARDWARE\\DESCRIPTION\\System\\CentralProcessor\\0\\";
    local CpuInfo_T = Registry.GetValueNames(HKEY_LOCAL_MACHINE, strCpuRegKey);
    for cpuindex, cpuvalue in CpuInfo_T do
    	if (cpuvalue == "~MHz") then
    		strCpuspec = Registry.GetValue(HKEY_LOCAL_MACHINE, strCpuRegKey, cpuvalue, true);
    			if (String.Length(strCpuspec) == 4) then
    				strcpumid = String.Mid(strCpuspec, 1, 2);
    				CpuDisp = String.Left(strcpumid, 1).."."..String.Right(strcpumid, 1).." Ghz"; --display ready
    			else
    			CpuDisp = strCpuspec.." Mhz"; --display ready
    			end
    		Cpuspec = String.ToNumber(strCpuspec);	
    		break;
    	end	
    end
    if (Cpuspec < CpuMin) then
    bCpuspecsmet = false;
    elseif (strCpuspec == "") then
    CpuDisp = "No Data"; --display ready
    end
    return bCpuspecsmet;
    end --GetCPUSpecs
    works for Win2k and later(may work for Win98 -Me..hav'nt tested)

  11. #11
    Join Date
    Oct 2003
    Location
    West Monroe, LA
    Posts
    294
    Thanks alot for the HELPFUL info. I didn't even think about the Registry.

    Your code works fine on XP Pro SP2.

    Thanks again.

  12. #12
    SUF6NEWBIE Guest
    noproblemo Mark...happy its doin its thing...tks for the confirmation

  13. #13
    Join Date
    Oct 2001
    Location
    Norway
    Posts
    939
    Quote Originally Posted by SUF6NEWBIE
    as far as I am aware:
    'Stepping 1' equates to Celeron -Amd Duron equiv
    'Stepping 3' equates to PIII or equivelent
    'Stepping 9' is one known value for PIV (with multi threading)
    I didn't know, but are you sure? I could give my word that my old laptop was equipped with a Celeron processor, but the Registry has these data:
    "Identifier"="x86 Family 6 Model 6 Stepping 10"
    "ProcessorNameString" = value does not exist

    On the Intel site I found:
    * The "family" and "model" information determines what kind of processor it is (Pentium® processor, Pentium® Pro processor, Pentium® II processor, etc.).
    * The "stepping" of a processor can be compared to the "version" of a piece of software.
    * Intel Pentium 4 processors have a Family value of "F"

    I think 'value of F' means the hex value = decimal 15. At least my main computer returns:
    "Identifier" = x86 Family 15 Model 2 Stepping 4
    "ProcessorNameString" = Intel(R) Pentium(R) 4 CPU 2.40GHz

    The old Intel Utility CPUID.exe displays:
    This system has an unknown Genuine Intel processor with MMX(TM) technology
    Processor Family: F / Model: 2 / Stepping: 4

    Intel has some test apps at http://support.intel.com/support/pro.../CS-015477.htm

    Thanks to the flexibility in both AMS50 and SUF70 (the LUA engine) it is possible to get the information you need (with the conditions that are suitable to your needs). But, what to do in another app without the capabilities of reading the Registry? Thanks to a previous link in this forum I use AutoIt . It's a really nice tool. You use Notepad to write a script file (.au3) like this:
    Code:
    $Speed = RegRead("HKLM\Hardware\Description\System\CentralProcessor\0","~MHz")
    If $Speed <> "" Then
    	$Speed = Round($Speed / 1000,1) & " GHz"
    Endif
    You can compile the script to an exe file (with your own icon). In the attached example I write the info to an ini file which can be read by "the other app". Of course you can run the Env_info.exe from AMS and then read the ini file…

    My main computer has this output (Env_Info.ini, with Norwegian data labels, sorry):
    [System]
    WindowsVersjon=Windows XP 5.1.2600 Service Pack 2
    Prosessor=Intel(R) Pentium(R) 4 CPU 2.40GHz
    CPU Speed=2.4 GHz
    CPU Identifier=x86 Family 15 Model 2 Stepping 4


    My old laptop:
    [System]
    WindowsVersjon=Windows NT4 4.0.1381 Service Pack 6
    Prosessor=x86 Family 6 Model 6 Stepping 10
    CPU Speed=0.4 GHz <== Impressive!
    CPU Identifier=x86 Family 6 Model 6 Stepping 10


    A real OLD Compaq (with a 1.95 GB hard disk); from the trash dump)
    [System]
    WindowsVersjon=Windows 98 4.10.2222 A
    Prosessor=Pentium(r) Processor
    CPU Speed=
    CPU Identifier=Pentium(r) Processor


    It should be nice to have more reports about the "Family" issue.
    Attached Files
    Last edited by csd214; 12-13-2004 at 04:30 AM.

  14. #14
    SUF6NEWBIE Guest
    'If anyone can confirm the 'stepping values' during testing let us know..'


    Thanks for all the Information CSD...yep the Proccessor 'Capabilities' I mentioned (stepping value) is obviously not reliable info...

    It would be great if we could get basic CPU capability ....
    Last edited by SUF6NEWBIE; 12-13-2004 at 07:54 AM.

  15. #15
    Join Date
    Aug 2005
    Posts
    1

    Hdd Id

    It is all ok... but... can anyone help me to get my hard disk id....

Page 1 of 2 1 2 LastLast

Similar Threads

  1. INFO: Visual Basic 6.0 (SP5) Runtime Notes
    By Desmond in forum Setup Factory 6.0 Knowledge Base
    Replies: 0
    Last Post: 11-28-2003, 10:30 AM
  2. INFO: Visual Basic 5.0 (SP3) Runtime Notes
    By Desmond in forum Setup Factory 6.0 Knowledge Base
    Replies: 0
    Last Post: 11-28-2003, 10:29 AM
  3. INFO: JET and MDAC (Complete) Runtime Notes
    By Desmond in forum Setup Factory 6.0 Knowledge Base
    Replies: 0
    Last Post: 11-28-2003, 08:35 AM
  4. INFO: JET 4.0 SP7-SP8 Runtime Notes
    By Desmond in forum Setup Factory 6.0 Knowledge Base
    Replies: 0
    Last Post: 11-28-2003, 08:34 AM
  5. INFO: Microsoft Data Access Components 2.8 Runtime Notes
    By Desmond in forum Setup Factory 6.0 Knowledge Base
    Replies: 0
    Last Post: 11-28-2003, 08:20 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts