Sign in to follow this  
Followers 0
SitX

What's wrong? :/

3 posts in this topic

#1 ·  Posted (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
EndSelect

tanks in advance!

Edited by SitX

Share this post


Link to post
Share on other sites



The requested key really exist?

$var = RegEnumKey("HKEY_LOCAL_MACHINE\SOFTWARE\Adobe\Acrobat Reader\", 1)
If @error Then Exit
MsgBox(64, "Ifno", $var)

Share this post


Link to post
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

Share this post


Link to post
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
Sign in to follow this  
Followers 0