Gordoni Posted December 31, 2008 Share Posted December 31, 2008 (edited) Func _Diablo_Run()($iMode = -1, $iWait = 5) If $iMode = -1 And ProcessExists("game.exe") Then Return 1 Local $iAutoItVersion_Compare = _VersionCompareEx(@AutoItVersion, "3.2.10.0") If $iAutoItVersion_Compare <= 0 Then Local $iOld_Opt_REF = Opt("RunErrorsFatal", 0) Local $iError = 0, $iPID Local $sDiabloII_RegPath = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Blizzard Entertainment\DiabloII", "") If FileExists($sDiabloII_RegPath) Then $iPID = Run($sDiabloII_RegPath & "\Diablo2.exe") $iError = @error Else $iError = 1 EndIf If $iAutoItVersion_Compare <= 0 Then Opt("RunErrorsFatal", $iOld_Opt_REF) If $iWait And Not $iError Then ProcessWait($iPID, $iWait) WinWait($sDiabloII_CLASS, "", $iWait) EndIf If $iError Then Return SetError(1, 0, 0) Return 1 EndFunc ;==> Diablo II Start Adding screen of registry from HKEY_LOCAL_MACHINE\SOFTWARE\Blizzard Entertainment\DiabloII That what i have here dont wanna work . Can any 1 help me ? Edited December 31, 2008 by Gordoni Link to comment Share on other sites More sharing options...
DjDeep00 Posted December 31, 2008 Share Posted December 31, 2008 @Gordoni... I dont see the valuename in your regread: RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Blizzard Entertainment\DiabloII", "") As per the helfile: RegRead ( "keyname", "valuename" ) Link to comment Share on other sites More sharing options...
Varian Posted January 1, 2009 Share Posted January 1, 2009 Yep..the way you have it it's reading the (default) key if it exists..I think you want to read the InstallPath value RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Blizzard Entertainment\DiabloII", "InstallPath") 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