SitX Posted March 13, 2008 Posted March 13, 2008 (edited) Hello,what is wrong in my Code?I get no output, because the $KeyCheck has inside the Select Case no value ??Dim $KeyCheck $var = RegEnumKey("HKEY_LOCAL_MACHINE\SOFTWARE\Adobe\Acrobat Reader\", 1) $KeyCheck = $var ;just for info MsgBox(64, "Ifno", $KeyCheck) Select Case $KeyCheck = "3" MsgBox(64, "Info", "Es ist Adobe Acrobat Reader " & $KeyCheck & " installiert") ;show the installed acrobat version Case $KeyCheck = "37" MsgBox(64, "Info", "Kein Adobe Acrobat Reader installiert!") ;info, that is no acrobat installed EndSelecttanks in advance! Edited March 13, 2008 by SitX
rasim Posted March 13, 2008 Posted March 13, 2008 The requested key really exist? $var = RegEnumKey("HKEY_LOCAL_MACHINE\SOFTWARE\Adobe\Acrobat Reader\", 1) If @error Then Exit MsgBox(64, "Ifno", $var)
SitX Posted March 13, 2008 Author Posted March 13, 2008 damn, i'm stupid... i wanted to output the string in length but i forgot to say -> Case StringLen($var)... that's the right solution: $var = RegEnumKey("HKEY_LOCAL_MACHINE\SOFTWARE\Adobe\Acrobat Reader\", 1) Select Case StringLen($var) = 3 MsgBox(64, "Info", "Es ist Adobe Acrobat Reader " & $var & " installiert") Case StringLen($var) = 37 MsgBox(64, "Info", "Kein Adobe Acrobat Reader installiert!") EndSelect
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