tags:

views:

31

answers:

2

I know the default install path of the app and the name of the .exe file, but is there a way to see if it is actually installed? I've seen suggestions for checking registry entries, but I don't know if this app uses any or if if varies for different users on different pc's.

Many of the registy entries have no default values set. I prefer not to dive too deep and have to rely on a value for the font setting.

I'd like to know if "App_Name" exists. I can't rely on it having a default value because it never does. Since I'm using .GetValueKind, I don't have to worry about "AboutSiteUR" having any value set assuming if it has a type it actually exists. Otherwise, I'm assuming the Try/Catch will trap the IO.IORegistry type error (I'm not sure about that one.).

Dim sDisplay_Reg_Value As String
Dim Everest_Registry As Microsoft.Win32.RegistryKey = _
        My.Computer.Registry.CurrentUser.OpenSubKey("Software\Company_Name\App_Name")
        Try
            sDisplay_Reg_Value = CType(Everest_Registry.GetValueKind("AboutSiteUR"), String)
A: 

Does the application show up in the "Add/Remove programs" control panel? If yes, then there are definitely some registry entries you can look at that would not vary by user.

use regedit.exe to search the subkeys of CLSIDs key, if the application folder appears in any of the subkeys, then this also would be something that doesn't vary by user.

Or your could ask them. I used to work for a company that made software you could buy at Best Buy, etc. In their software, there was a specific registry key that each application created so that all of their apps could find each other.

John Knoeller
I'm working on finding the folders since I don't want to have to check any of the values (many of the defaults have no value).
Jeff O
@Jeff: could you re-phrase that? I don't understand.
John Knoeller
Sorry for poor terminology. Example: "HKEY_CURRENT_USER\Software" does exist, but the Name: (default) Type: REG_SZ Data: (value not set) will not return a value. So, how do I know "HKEY_CURRENT_USER\Software\ACME Software\" exists because the value is not help.
Jeff O
+1  A: 

'If the key does not exist Everest_Registry will contain Nothing, otherwise the returned key will be populated. Try this:

    Dim Everest_Registry As Microsoft.Win32.RegistryKey = _
    My.Computer.Registry.CurrentUser.OpenSubKey("Software\Microsoft\Internet Explorer")
    If Everest_Registry Is Nothing Then
        'key does not exist
        MsgBox("Key does not exist")
    Else
        'key is valid, display actual name
        MsgBox(Everest_Registry.Name)
    End If
djbaldwin
Makes perfect sense. Thanks
Jeff O