Bilou_Gateux Posted April 11, 2006 Share Posted April 11, 2006 Is HPQSI.EXE publicly available? I know I have a copy of IBM's SMBIOS.EXE, I'll try to see if I can do anything with the output of these files. I don't want to build my script around files that are not freely available to the public. We can use another command line tool call GetSys.exe, which is part of 'Mitec System Information Component Suite'.ReadMe.txtMSICS is freeware.Sources are available on purchase/registration. Price is 110 euro (EUR).For registration details see Order.txt file in this package.Distribution pack:------------------The zip file has subdirectories in it. You must use the pkunzip -d optionto restore this directory tree or you will have problems because the fileswill not be in their proper subdirectories.This is the subdirectory layout:.\ Info directory.\apps Applications written using this component.\demos Sample applications.\dll MSICS.DLL library for using MSI data from any app.\help HTML Help file.\D5 compiled units containing components and packages for installing for Delphi 5 (not in registered version).\D6 compiled units containing components and packages for installing for Delphi 6 (not in registered version).\D7 compiled units containing components and packages for installing for Delphi 7 (not in registered version).\BDS3 compiled units containing components and packages for installing for Delphi 2005 (not in registered version).\BDS4 compiled units containing components and packages for installing for Delphi 2006 (not in registered version).\Sources source files (only in registered version)You can get it by downloading the full package, extract and grab the exe in \Apps\GetSys folder. Link to comment Share on other sites More sharing options...
Bezalel Posted April 11, 2006 Author Share Posted April 11, 2006 We can use another command line tool call GetSys.exe, which is part of 'Mitec System Information Component Suite'.Have you used this program during setup? The output looks more like WMI than SMBIOS. Link to comment Share on other sites More sharing options...
RogueSpear Posted April 11, 2006 Share Posted April 11, 2006 I origionally wanted to use the clipboard but MS doesn't let VBScript files access the clipboard. I changed the code from MsgBox to WScript.Echo so you can redirect the output to a text fileI'm a little late coming to the thread, but if you still have any interest in utilizing the clipboard from a VBscript, just use AutoItX.Set ai = WScript.CreateObject("AutoItX3.Control")text = ai.ClipGet()WScript.Echo "Clipboard contains:" & textYou just need to have AutoItX.dll registered. Link to comment Share on other sites More sharing options...
Bezalel Posted April 11, 2006 Author Share Posted April 11, 2006 I'm a little late coming to the thread, but if you still have any interest in utilizing the clipboard from a VBscript, just use AutoItX.Set ai = WScript.CreateObject("AutoItX3.Control")text = ai.ClipGet()WScript.Echo "Clipboard contains:" & textYou just need to have AutoItX.dll registered.Thanks, but I prefer to use built-in features of the OS or stand-alone applications for OS deployment and management. Link to comment Share on other sites More sharing options...
RogueSpear Posted April 11, 2006 Share Posted April 11, 2006 (edited) Just lettin ya know. You never know when something like that might come in handy Edited April 11, 2006 by RogueSpear Link to comment Share on other sites More sharing options...
Bilou_Gateux Posted April 13, 2006 Share Posted April 13, 2006 Have you used this program during setup? The output looks more like WMI than SMBIOS. Yes i've launched Getsys.exe @T39. Here the output:MiTeC System Information Utility 10.2.0 - Copyright © 1997-2006 Michal MutlType /? for optionsSYSTEM OVERVIEW...OKMachine: MACHINENAMESystem : PC multiprocesseur ACPIModel : Hewlett-Packard HP Compaq dc7600 Convertible MinitowerUpTime : 2 Minutes, 47 Seconds.-------------------------------------------------------------------------------CPU : 1 x Intel Pentium 4 - 2990 MHzCache: 16 KB L1 + 2048 KB L2 + 0 KB L3-------------------------------------------------------------------------------Mainboard: Hewlett-Packard 09F0hMemory : 503 MB-------------------------------------------------------------------------------Operating system: Windows XP Professional [5.1.2600]Service pack : 2.0Logged user : SYSTEM-------------------------------------------------------------------------------Display adapter: Intel® 82945G Express Chipset FamilyMemory : 128 MB-------------------------------------------------------------------------------Fixed : Promise 1X2 Mirror/RAID - 76316 MB (SCSI) C: (Primary NTFS - 76308 MB)DVD : LITE-ON DVD SOHD-167T - 0 MB (ATAPI) D: -------------------------------------------------------------------------------Keyboard: -------------------------------------------------------------------------------Mouse: -------------------------------------------------------------------------------Default printer: -------------------------------------------------------------------------------As you can see, @T39 we don't get full infos about PCI PnP Devices because they're not yet installed. Link to comment Share on other sites More sharing options...
Bezalel Posted April 27, 2006 Author Share Posted April 27, 2006 I took a look a GetSys and decided not to use it because it merges the manufacturer and model into 1 long string. I've decided to use IBM's SMBIOS but need some help extracting the manufacturer's name from the output file. Link to comment Share on other sites More sharing options...
Djé Posted April 27, 2006 Share Posted April 27, 2006 Do you mean something like indy_dba's way in this post?If you need further help, I would be glad to give a hand. Link to comment Share on other sites More sharing options...
Bigbrit Posted April 27, 2006 Share Posted April 27, 2006 Manufacturer: Elitegroup Co. Model: i-Buddie 456C6974 6567726F 75702043 6F2E2020 20202020 20202020 20202020 20202020 Hope this helps Link to comment Share on other sites More sharing options...
Bezalel Posted April 27, 2006 Author Share Posted April 27, 2006 Do you mean something like indy_dba's way in this post?If you need further help, I would be glad to give a hand.With indy_dba's method I would need to hardcode every manufacturer's name in my script or have every user modify their own scripts based on which computers they own. (Even worse the script might see a component manufacturer's name and miskake it for the system manufacturer.)This is what I need my script to do:Run SMBIOS (I think /G) and redirect the output to a text fileSearch the output file for the "System Information" sectionSearch the "System Information" section for the "Manufacturer" lineConvert the manufacturer string into hex and replace the OEMBIOS files with files named with the hex string.My script would not have to be modified when you by another PC from a a new manufacturer all you have to do is collect the OEMBIOS files from your new computer rename them with the manufacturer's hex string (I've already written these scripts) and drop the files onto your CD. Link to comment Share on other sites More sharing options...
Bezalel Posted April 27, 2006 Author Share Posted April 27, 2006 Manufacturer: Elitegroup Co. Model: i-Buddie 456C6974 6567726F 75702043 6F2E2020 20202020 20202020 20202020 20202020 Hope this helps I don't thing this unit uses preactivation Also notice that the manufacturers name has 18 spaces after it, this is the reason I converted the string to hex. Link to comment Share on other sites More sharing options...
Bilou_Gateux Posted April 27, 2006 Share Posted April 27, 2006 (edited) This is what I need my script to do:Run SMBIOS (I think /G) and redirect the output to a text fileSearch the output file for the "System Information" sectionSearch the "System Information" section for the "Manufacturer" lineConvert the manufacturer string into hex and replace the OEMBIOS files with files named with the hex string.My script would not have to be modified when you by another PC from a a new manufacturer all you have to do is collect the OEMBIOS files from your new computer rename them with the manufacturer's hex string (I've already written these scripts) and drop the files onto your CD. @for /f "tokens=1* delims=: " %%i in ('smbiosd /t:1 ^|findstr "Manufacturer"') do @set "Manufacturer=%%j" &@call echo/%Manufacturer%Previous script based from an original script by Yzöwlfor converting manufacturer string into hex with batch script, ask Yzöwl batch expert. If you use vbs or wsh, you could not run the script @T39 Edited April 27, 2006 by Bilou_Gateux Link to comment Share on other sites More sharing options...
Djé Posted April 27, 2006 Share Posted April 27, 2006 (edited) May I suggest the attached script for including conversion to hex...It may not be very elegant, but it should work at any time as soon as CMD.EXE works (@T39,...).EDIT3 : repaired the broken handling of spaces. Simplified and commented the code.optimized version --> the Hex conversion works with some of the 7-bits printable ASCII characters: 32 (x20: <space>) to 126(x7E: ~).Many many many problems with the double quote (") and the CMD special characters (&<|>^). Yappari.Hex codes grouped by 4, separated with spaces.ManufacturerHex.cmd Edited April 28, 2006 by Djé Link to comment Share on other sites More sharing options...
Bezalel Posted April 27, 2006 Author Share Posted April 27, 2006 I'n using this line of codefor /F "tokens=1* delims='" %%a in ('smbios.exe /G ^|findstr "Manufacturer"') do converttohex.bat "%%b"Currently it is calling converttohex each time it encounters the string "Manufacturer". How can I make only call converttohex for the first occurance. Link to comment Share on other sites More sharing options...
Djé Posted April 27, 2006 Share Posted April 27, 2006 (edited) Currently it is calling converttohex each time it encounters the string "Manufacturer". How can I make only call converttohex for the first occurance.If you would use the smbiosd linked to by indy_dba, and use the '/t:1' switch as shown by bilou, I think you would have only ONE occurance of "Manufacturer".Search the output file for the "System Information" sectionSearch the "System Information" section for the "Manufacturer" linethe '/t:1' switch perform your 1st point, and the 'FOR' loop the 2nd However, if you want to stick to IBM's SMBIOS which I don't know and may not have the same switch, you can exit the loop after the first occurance by doing it this way:for /F "tokens=1* delims='" %%a in ('smbios.exe /G ^|findstr "Manufacturer"') do (converttohex.bat "%%b"GOTO ENDFOR):ENDFOR Edited April 27, 2006 by Djé 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