unclefishy Posted June 15, 2006 Share Posted June 15, 2006 (edited) ok, so I am still in the noob phase, but learning quickly... I am tweaking my unattended disk... but am using autoit to auto install a bunch of programs for our "base install"... and I got all that working nicely... but since all of our pc's are white boxes (that we built) there are a few different ones out on the floor... and I would like to make a "MASTER" disk... that I can use on any pc in house.... as opposed to creating a disk/script for each individual motherboard. I have been toying with the idea of using the "PROCESSOR_IDENTIFIER" variable... seem each board does in fact have a different set of attributes (though only minor) probabally because, each has a different proc speed. {Model 4 Stepping 1} or {model 2 Stepping 9} i am not sure what those mean exactly... is there a different variable for... say... my chipset, or some other distingushing feature that I could use? and how reliable would this be? I would like to do a simple IF... THEN.... (though I havn't tried it yet... i am still theorizing which way is best) like if I have an msi-a, motherboard... then install this set of drivers... or if I have an msi-b, motherboard... then install this set of drivers... or if I have an intel board-a... install these drivers... or if I have an intel board-b... install these drivers... etc... else... skip driver install I realize that I could do a pop up box, asking you to select which board you have... and have it install the appropriate drivers (sound/video lan etc)... based on which one you selected... but would love to keep it "automated" how would you guys go about this? or would you do something entirley different? thanks in advance fishy Edited June 15, 2006 by unclefishy Link to comment Share on other sites More sharing options...
GaryFrost Posted June 15, 2006 Share Posted June 15, 2006 look for scriptomatic in scripts and scraps You'll need beta. I think that maybe Win32_ComputerSystem might provide what you need. SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
unclefishy Posted June 15, 2006 Author Share Posted June 15, 2006 what about using the dos command "systeminfo"... is there a way to parse that info???? I could totally use the "system model" output... that lists the model of my mobo. I just don't know how to "pull out" that info... and keep in mind that I am trying to keep it simple... thanks, fishy Link to comment Share on other sites More sharing options...
piccaso Posted June 15, 2006 Share Posted June 15, 2006 Run(@ComSpec & " /c " & 'systeminfo > temp.txt', "", @SW_HIDE) $fp = FileOpen("temp.txt",0) $search = "Systemmodell:" ; This is for german windows! While 1 $buff = FileReadLine($fp) If @error Then ExitLoop If StringInStr($buff,$search) Then MsgBox(0,"System Model",StringStripWS(StringReplace($buff,$search,""),1+2)) EndIf WEnd FileClose($fp) ... for example CoProc Multi Process Helper libraryTrashBin.nfshost.com store your AutoIt related files here!AutoIt User Map Link to comment Share on other sites More sharing options...
unclefishy Posted June 16, 2006 Author Share Posted June 16, 2006 wonderful!! Great help Piccaso, you rock! I am not very good with loops yet, but let me play with it and I will get back... but what I don't understand is... where/how would I use that data (string) that is displayed in the msgbox, to compare it to different values... so that string ie my motherboard = $search right? so I could use something like? if $search=D915GAV_ then Run(d:\drivers\inteldrivers.exe) (my intel mobo) if $search=AWRDACPI then Run(d:\drivers\msidrivers.exe) (my msi mobo) Link to comment Share on other sites More sharing options...
unclefishy Posted June 16, 2006 Author Share Posted June 16, 2006 it doesn't display the screen after the first run through... it just creates the txt file... but once it is there, (if I run it again) it does display the info... i have tried moving a couple of sleeps around and it is still acting querky... but deffiently on the right path Link to comment Share on other sites More sharing options...
piccaso Posted June 16, 2006 Share Posted June 16, 2006 I used Run instead of RunWait... dont ask me why about compareing stuff see comments. #include <file.au3> $sTempFile = _TempFile () RunWait(@ComSpec & " /c " & 'systeminfo > "' & $sTempFile & '"', "", @SW_HIDE) $hTempFile = FileOpen($sTempFile, 0) $sSearch = "Systemmodell:" ; This is for german windows! $iSearchLen = StringLen($sSearch) While 1 $sBuff = FileReadLine($hTempFile) If @error Then ExitLoop ; EOF or Error If StringLower(StringLeft($sBuff, $iSearchLen)) = StringLower($sSearch) Then $sResult = StringStripWS(StringTrimLeft($sBuff, $iSearchLen), 1 + 2) ; you can compare here: If $sResult = "AWRDACPI" _ ; your intel MB - 'exact match' Then Run("d:\drivers\inteldrivers.exe", "", @SW_HIDE) If StringInStr($sResult, "AWRDACPI") _ ; your intel MB - 'AWRDACPI' is inside $sResult (case insensitive) Then Run("d:\drivers\inteldrivers.exe", "", @SW_HIDE) If $sResult = "MS-6590" Then MsgBox(0,"Heureka","Its my Mainboard :)") MsgBox(0, $sSearch, $sResult) ExitLoop EndIf WEnd FileClose($hTempFile) FileDelete($sTempFile) CoProc Multi Process Helper libraryTrashBin.nfshost.com store your AutoIt related files here!AutoIt User Map Link to comment Share on other sites More sharing options...
unclefishy Posted June 16, 2006 Author Share Posted June 16, 2006 seriously, you rock... thanks I will play with it! again... many, many thanks fishy 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