pantz Posted January 16, 2008 Share Posted January 16, 2008 I am having a problem with this statement. I think it is a very simple error but I don't see whats wrong. Of course I am building an If then statement if it is going to be a laptop then I it will install the wireless client. Anyone have something like that built already? Thanks, $var = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Dell Computer Corporation\Sysinfo", "Model") If $var = "Latitude D620" Then MsgBox(4096, "You have a...", $var) Else MsgBox(4096, "You have a...", "desktop.") EndIf Link to comment Share on other sites More sharing options...
Developers Jos Posted January 16, 2008 Developers Share Posted January 16, 2008 Try: $var = StringStripWS(RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Dell Computer Corporation\Sysinfo", "Model"),3) 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...
DjDeep00 Posted January 16, 2008 Share Posted January 16, 2008 @pantz...First check to see what value $var is by using a message box like this.. MsgBox(4096,"",$var) If you get a blank value then the reg path you are reading is incorrect. Search the forums...i think many people have made scripts that collect computer hardware information.... Link to comment Share on other sites More sharing options...
pantz Posted January 16, 2008 Author Share Posted January 16, 2008 Thanks Jos!! That fixed it. Now I will try putting in the rest of my code for installing the wireless client and give it a try! Link to comment Share on other sites More sharing options...
DirtDBaK Posted January 16, 2008 Share Posted January 16, 2008 If $var = "Latitude D620" Then You may want to use If StringInString($var,"Latitude") Then That way any model of a 'Latitude' will work with your script [center][/center] Link to comment Share on other sites More sharing options...
pantz Posted January 16, 2008 Author Share Posted January 16, 2008 If StringInString($var,"Latitude") Then Gives me: error: unknown function name. Link to comment Share on other sites More sharing options...
Developers Jos Posted January 16, 2008 Developers Share Posted January 16, 2008 maybe: StringInStr 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...
pantz Posted January 16, 2008 Author Share Posted January 16, 2008 That was it. Thanks!! Link to comment Share on other sites More sharing options...
pantz Posted January 16, 2008 Author Share Posted January 16, 2008 Here is my script.. If it is a latitude it will run the wireless. If a desktop then it will not. This script is in my sysprep. $var = StringStripWS(RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Dell Computer Corporation\Sysinfo", "Model"),3) WinWaitActive("System Settings Change") Send("!n") If StringInStr($var,"Latitude") Then RunWait("c:\dell\drivers\Dellwireless.exe") ;MsgBox(4096, "You have a...", $var) EndIf RunWait("c:\dell\drivers\FramePkg.exe") WinActive("McAfee Agent and Updater Setup","Setup completed successfully.") Send ("{ESC}") RunWait("c:\dell\drivers\ghost\install.cmd") WinWaitClose("C:\Windows\System32\cmd.exe") Runwait( @comspec & " /c "& "regedit /s c:\dell\drivers\secondboot.reg") RunWait("shutdown.exe -r -t 60") Link to comment Share on other sites More sharing options...
DirtDBaK Posted January 19, 2008 Share Posted January 19, 2008 lol I meant stringinstr, aha... glad it works for you.. And do you use the help file? [center][/center] 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