AutoHotkey Community

It is currently May 27th, 2012, 1:23 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 16 posts ]  Go to page 1, 2  Next
Author Message
PostPosted: August 31st, 2009, 11:36 pm 
Offline

Joined: August 14th, 2009, 2:40 pm
Posts: 237
Location: Finland
Hi,
I'm trying to write a script to help tech support. A single-run script that outputs a textfile to A_MyDocuments and then displays it so the user can just copy-paste it into an email and/of forum post.

I read through some posts (other SysInfo scripts), but none of them provided some of the things I need.

I got the framework working (well that wasn't even hard), but a few spots still elude me. I need to get

1) CPU Speed.
2) OS version number (not A_OSVersion, as that gives too vague results. I need a number to distinguish if WIN_VISTA is Vista or Windows 7...)
3) Installed Service Pack version, and preferable OS Build version.

If possible, the state of firewall/antivirus (up-to-date/old/not available) from the security center.

There might be something else, but I don't remember right now. I got most of the stuff working already, so there's some info written.

Script doesn't need to work on anything older than XP.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 1st, 2009, 12:03 am 
Offline

Joined: April 4th, 2008, 8:15 pm
Posts: 538
Location: Canada
Tested on XP, if it doesn't work on vista, just find the new reg location

Code:
#NoTrayIcon
;Speed
Loop
 {
  RegRead Speed%A_Index%, HKEY_LOCAL_MACHINE, % "HARDWARE\DESCRIPTION\System\CentralProcessor\" . (A_Index-1), ProcessorNameString
  if Speed%A_Index% <>
   speed .= Speed%A_Index% . "`n"
  Break
 }

;Version

RegRead v1, HKEY_LOCAL_MACHINE, SOFTWARE\Microsoft\Windows NT\CurrentVersion, ProductName
RegRead v2, HKEY_LOCAL_MACHINE, SOFTWARE\Microsoft\Windows NT\CurrentVersion, CSDVersion
Version := v1 . " " . v2

Gui Add, Edit, Readonly, % Speed . Version
Gui Show
return

GuiClose:
ExitApp


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 1st, 2009, 12:17 am 
Offline

Joined: August 14th, 2009, 2:40 pm
Posts: 237
Location: Finland
Just noticed that myself :) I found these.

Code:
RegRead, CPUNAme, HKEY_LOCAL_MACHINE, HARDWARE\DESCRIPTION\System\CentralProcessor\0, ProcessorNameString
RegRead, BuildNum, HKEY_LOCAL_MACHINE, SOFTWARE\Microsoft\Windows NT\CurrentVersion, CurrentBuild
RegRead, OSName, HKEY_LOCAL_MACHINE, SOFTWARE\Microsoft\Windows NT\CurrentVersion, ProductName
RegRead, WinVersion, HKEY_LOCAL_MACHINE, SOFTWARE\Microsoft\Windows NT\CurrentVersion, CurrentVersion


What I still am missing is, OS "bitcount" (x86/x64). I thought the OS version strings would've included that somewhere, but no. Then I'd like to know the latest SP version, if any.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 1st, 2009, 12:24 am 
Offline

Joined: April 4th, 2008, 8:15 pm
Posts: 538
Location: Canada
http://www.lytebyte.com/2009/08/04/how- ... n-windows/


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 1st, 2009, 12:26 am 
Offline

Joined: August 14th, 2009, 2:40 pm
Posts: 237
Location: Finland
Yes, I'm using that string already, but it only tells if the CPU is *capable* of 64bits, not if the installed OS is 64 or 32bits. Most modern CPUs are 64bit (for a few years already) but still many, many are using 32bit OS'es.

If that pages tells me how to get that info (with an AHK script), then sorry I'm blind :D but I couldn't see any.

EDIT: From the page
Quote:
From ProcessorNameString you will be able to see the name of your processor and from Identifier you will see the family of the processor and if it has 64 then it is 64-bit capable.


EDIT2: I found a x64/x86 detection method from this post

EDIT3: I also found a registry key for the service pack, yay!

now I'm only (mostly) missing product-specific information, and for that I need to ask the guys who actually make the things... Thanks for help :)


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 31st, 2009, 8:43 pm 
Could you please post the regkey for servicepack?
Thanks


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: October 31st, 2009, 9:02 pm 
Offline

Joined: March 18th, 2009, 3:06 pm
Posts: 17
Location: Minnesota, USA
I found it.
Code:
RegRead, ServicePack, HKEY_LOCAL_MACHINE, SOFTWARE\Microsoft\Windows NT\CurrentVersion, CSDVersion


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 19th, 2009, 5:16 pm 
Offline

Joined: August 21st, 2006, 7:07 pm
Posts: 2925
Location: The Shell
I'm also trying to find out this info for a simple system info display for XP, Vista or Windows 7.

Any ideas if Vista and W7 will run the reg reads the same way?

I'm going also Google them and report back..


edit::

Ok I fired up the Vista machine and it the Reg keys work :)..

Onto W7...

_________________
Imageparadigm.shift:=(•_•)┌П┐RTFM||^.*∞


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 19th, 2009, 6:40 pm 
on w7 32bit pro
Image


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: November 19th, 2009, 7:19 pm 
Offline

Joined: August 21st, 2006, 7:07 pm
Posts: 2925
Location: The Shell
Anonymous wrote:
on w7 32bit pro
Image


Thats funny that it says XP :lol:

_________________
Imageparadigm.shift:=(•_•)┌П┐RTFM||^.*∞


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 19th, 2009, 8:33 pm 
same OS @ netbook
Image


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: November 19th, 2009, 10:32 pm 
Offline

Joined: August 21st, 2006, 7:07 pm
Posts: 2925
Location: The Shell
Is the code several posts up for the above GUI?

I had my own
Code:
FileDelete, % A_Desktop "\Computer Specs.txt"

RegRead, ServicePack, HKEY_LOCAL_MACHINE, SOFTWARE\Microsoft\Windows NT\CurrentVersion, CSDVersion

spaceCount=
Loop
    {
    RegRead Speed%A_Index%, HKEY_LOCAL_MACHINE, % "HARDWARE\DESCRIPTION\System\CentralProcessor\" . (A_Index-1), ProcessorNameString
    if Speed%A_Index% <>
   Loop, Parse, Speed%A_Index%,
   {
   cpuName := A_LoopField
   if cpuName is space
      spaceCount++
   Else
      Break
   }
    StringTrimLeft, Speed%A_Index%, Speed%A_Index%, % spaceCount
    speed .= "CPU " A_Index " " Speed%A_Index% . "`n"
    Break
    }

DriveGet, sysDrive, List, FIXED
Loop, Parse, sysDrive,,
    Drives .= "Hard Drive " A_Index " is: " A_LoopField "`n"

ThisProcess := DllCall("GetCurrentProcess")
if !DllCall("IsWow64Process", "uint", ThisProcess, "int*", IsWow64Process)
    IsWow64Process := false
osBit := IsWow64Process ? "win64" : "win32"

FileAppend, % "Operating System:`n" A_OSVersion " (" osBit ")`n`nCPU(s):`n" speed "`nHardDrive(s):`n" Drives "`n" ServicePack, % A_Desktop "\Computer Specs.txt"
Msgbox, % "Operating System:`n" A_OSVersion " (" osBit ")`n`nCPU(s):`n" speed "`nHardDrive(s):`n" Drives "`n" ServicePack


If not can you post the code? I just want to make sure 100% its the same reg keys for W7...

_________________
Imageparadigm.shift:=(•_•)┌П┐RTFM||^.*∞


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 19th, 2009, 11:07 pm 
ok here is the output using ur script
i dont know much about Reg, so yea, just showing what i got from my desktop
Image


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: November 19th, 2009, 11:09 pm 
note that i have Vista ultra installed in my other drive, but never use XP on this desktop, so i have no idea where that XP comes from


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: November 20th, 2009, 12:43 am 
Offline

Joined: June 12th, 2009, 11:36 pm
Posts: 1173
Location: Indianapolis IN, USA
Why not use Speccy? It's wonderful software I use. It gives detailed information about your system specs and goes into detail of each. Can give you the temperature of your CPU and other stuff down to the nitty gritty. You can find it here.

_________________
www.AutoHotkey.net/~Eedis
I love my wife and daughter so much.
Image


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 16 posts ]  Go to page 1, 2  Next

All times are UTC [ DST ]


Who is online

Users browsing this forum: Bing [Bot], iDrug, Ohnitiel and 21 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group