Jump to content

What's wrong? :/


SitX
 Share

Recommended Posts

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
EndSelect

tanks in advance!

Edited by SitX
Link to comment
Share on other sites

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
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...