Link to home
Start Free TrialLog in
Avatar of NettieCross
NettieCrossFlag for United States of America

asked on

check for adobe reader on 64 bit system.....

Check out this code, which works great, but uses the specific "Microsoft.Win32.RegistryKrey" namespace - I need thos code to also search for adobe on a 64 bit machine, anyone know how to modify this for 64 bit:


Public Sub IsAdobeInstalled()
        'the best way to find adobe when so many versions are out there, and adobe uses a new folder for each version
        'is to use the registry to see if adobe sits in the current users software keys
 
        Dim regKey As Microsoft.Win32.RegistryKey
        regKey = My.Computer.Registry.CurrentUser.OpenSubKey("Software\Adobe", False)
        Dim paths() As String = regKey.GetSubKeyNames
        Dim path As String
        Dim installed As Boolean = False
        For Each path In paths
            If path = "Acrobat" Then
                installed = True
                'MsgBox("Adobe Reader is installed")
            End If
        Next
        regKey.Close()
        If installed Then
            'ContinueCode()
        Else
            If MessageBox.Show("Adobe Acrobat Reader is not installed, would you like to install now?", "Acrobat Reader", MessageBoxButtons.YesNo, MessageBoxIcon.Question) = Windows.Forms.DialogResult.Yes Then
                System.Diagnostics.Process.Start("AdbeRdr812_en_US.exe")
                End
            Else
                'ContinueCode()
            End If
        End If
    End Sub

Open in new window

Avatar of melmers
melmers
Flag of Germany image

Have you tested the SubKeys for the 32 Bit programs which are installed on the 64Bit OS.
HKEY_LOCAL_MACHINE\Software\WOW6432node

http://support.microsoft.com/kb/896459
Avatar of NettieCross

ASKER

Not sure how to do that....?


        Dim reg64key = My.Computer.Registry.GetValue("HKEY_LOCAL_MACHINE\Software\WOW6432node", "Adobe", False)
        'NOW WHAT?
ASKER CERTIFIED SOLUTION
Avatar of melmers
melmers
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I will create a setup tonight and run it on the 64 bit test syetm I have and get back to you, if I can use the Win32 namespace (didn't think I could) then this should work - thanks!  Be back to you tonight to confirm and accept as solution if it does!