Jump to content

Dell Computer type read If statement


pantz
 Share

Recommended Posts

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

  • Developers

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

@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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...