Question Detecting if user has VLC.

SDZ98

New member
Joined
Jun 12, 2012
Messages
3
Programming Experience
Beginner
Hi,

Does anyone know how to write the code so that when you start the application, the program detects whether or not the user has VLC installed on their computer? I can't use directory since it changes from person to person.

Thanks
 
Such applications often write information to a standard Registry key and store the application path there. If you have it installed on your machine then you can find the Registry key on your machine. You can then write code to look for that Registry key and, if it finds it, get the application path from there.
 
I have VLC installed and found a key in HKEY_LOCAL_MACHINE\SOFTWARE\VideoLAN\VLC. Don't know if that is always true, but initially I would check for presence of that key. In my system the default name-value pair also had the path to vlc.exe, if that was needed. Using the My.Computer.Registry object for example:
        Dim reg = My.Computer.Registry.LocalMachine.OpenSubKey("SOFTWARE\VideoLAN\VLC")
        If reg IsNot Nothing Then
            Dim exepath = reg.GetValue("")

            reg.Close()
        End If
 

Latest posts

Back
Top