Neato Posted February 17, 2005 Share Posted February 17, 2005 Hi, I need some help to make a script for inventory of a computer. Any information from a computer, like: Username Username Describtion Computername S/N RAM Model of the computer CPU and speed OS and what kinds of program there is installed. Thx very much. /Neato Link to comment Share on other sites More sharing options...
Developers Jos Posted February 17, 2005 Developers Share Posted February 17, 2005 I am sure i've seen ppl posting ideas on the very subject before. Best bet is to seatch the forum for ideas... SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Blue_Drache Posted February 17, 2005 Share Posted February 17, 2005 and what kinds of program there is installed.<{POST_SNAPBACK}>You'll have to read the registry for that. Most programs would be located under the "Uninstall" registry key....except for those of us that can add programs to the computer without actually using the install function. UsernameUsername DescribtionComputernameS/NRAMModel of the computerCPU and speedOSOn NT/Win2k/WinXP systems, some of this information can be obtained though a "SET" command at the command line. Other ways are through the use of the built in @variables in AutoIt. Look in the help file under "@"For the rest of it, follow JdeB's advice. Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache Link to comment Share on other sites More sharing options...
Neato Posted February 18, 2005 Author Share Posted February 18, 2005 (edited) I am sure i've seen ppl posting ideas on the very subject before.Best bet is to seatch the forum for ideas... <{POST_SNAPBACK}>I have tried to do a search, but with no luck. I have a script, but I can't find a solution on the S/N and what computer it is. For exampel, is it a desktop or laptop and what brand ect. Edited February 18, 2005 by Neato Link to comment Share on other sites More sharing options...
tazdev Posted February 18, 2005 Share Posted February 18, 2005 (edited) Any information from a computer, like: Username @UserNameUsername Describtion (Need to use a third part program to access AD)Computername @ComputerNameS/N (Not stored in Windows so need third party software)RAM ....Model of the computer ....CPU and speed ....OS @OSType or @OSVersionand what kinds of program there is installed. (C:\Program Files\*.)Thx very much./NeatoDo a listing of the directories on the root of C:\Program Files\ . That should give you a quick and dirty listing of most of the programs installed. If you want something more than that then you will need to dig a lot deeper. Also double check your search. This has been done already. I even wrote one. The Ser# and Model Type is tough. I haven't figured out that part eitherhttp://www.autoitscript.com/forum/index.php?showtopic=7371 Look down the thread and you will see my script. Edited February 18, 2005 by tazdev Link to comment Share on other sites More sharing options...
chamach Posted February 18, 2005 Share Posted February 18, 2005 The Ser# and Model Type is tough. I haven't figured out that part eitherI found Hey, Scripting Guy! on microsoft.com. It can be really useful ! The VBS scripts work as is ! Cervélo Soloist 2004 & Cervélo P3C 2007 Link to comment Share on other sites More sharing options...
SPTech Posted February 18, 2005 Share Posted February 18, 2005 Although Neato has found another solution for his issue, I thought I'd post a UDF that I use to get the System Model information for those who might be following the thread. It's a bit crude, and is meant for W2K which does not have a command line WMI capability like XP. If anyone has a better way of doing this, please post your code. Func SystemModel() ;Returns the global variable $sm for the System Model If FileExists(@CommonFilesDir & "\Microsoft Shared\MSInfo\msinfo32.exe") Then Global $sm Dim $line, $smo, $wmi RunWait('"' & @CommonFilesDir & '\Microsoft Shared\MSInfo\msinfo32.exe" /categories +systemsummary /report ' & @TempDir & '\sum.txt') ;Line below parses UniCode to ASCII RunWait(@ComSpec & ' /c type ' & @TempDir & '\sum.txt>' & @TempDir & '\sum1.txt', '', @SW_HIDE) $wmi = FileOpen(@TempDir & '\sum1.txt', 0) If $wmi = -1 Then Exit (1) While 1 $line = FileReadLine($wmi) If @error = -1 Then ExitLoop $smo = StringInStr($line, 'System Model') If $smo <> 0 Then $sm = StringStripWS(StringReplace($line, 'System Model', ''), 3) ExitLoop EndIf WEnd FileClose($wmi) Sleep(1000) FileDelete(@TempDir & '\sum.txt') FileDelete(@TempDir & '\sum1.txt') EndIf EndFunc Fully automatic, comes in any sizeMakes me wonder what I did before I got synchronized... Link to comment Share on other sites More sharing options...
Flashz Posted February 19, 2005 Share Posted February 19, 2005 Hi there, this is my first post and I hope it helps. You can try something like that: RunWait(@ComSpec & " /c " & "systeminfo > %temp%\sysinfo.txt",@SW_HIDE) From that file you can then extract the info you want and delete it at the end of the script. For the serial number I have one vb script that I used inside the autoit: RunWait(@ComSpec & " /c " & "cscript %temp%\SerialNo.vbs > %temp%\serialno.txt",@SW_HIDE) Code of the vbs: On Error Resume Next strComputer = "." Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2") Set colItems = objWMIService.ExecQuery("Select * from Win32_BIOS",,48) For Each objItem in colItems Wscript.Echo "SerialNumber: " & objItem.SerialNumber Next Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now