how do you search for a program's installation path in the registry, check if it exists, run it...if

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • navajax
    Forum Member
    • Jun 2003
    • 4

    how do you search for a program's installation path in the registry, check if it exists, run it...if

    Ok I want to do a few things here:

    1. Check if a program is installed using a registry check.
    2. If the program is installed, grab the program location from the registry and use it to launch a file using that program.
    3. If the registry value does not exist (meaning the program is not installed), then run the program installer and then once installed, open a file with it.

    Any ideas? I can't seem to figure it out.
  • Derek
    Indigo Rose Customer
    • May 2001
    • 1254

    #2
    Re: how do you search for a program's installation path in the registry, check if it exists, run it.

    Depending on the program/file extension, you could use File.GetDefaultViewer and use the extension for that program.
    -
    = Derek
    ["All glory comes from daring to begin" - fortune cookie]

    Comment

    • navajax
      Forum Member
      • Jun 2003
      • 4

      #3
      Re: how do you search for a program's installation path in the registry, check if it exists, run it.

      That wouldn't really work, it's an avi file and I want it to launch in a specific media player (outside of the autoplay). This media player doesn't make file associations unless you set them manualy in the program settings. Also, if by chance you have set the file associations, it can cause problems if you install it twice in different locations on the same computer.
      Hence the registry check.

      Comment

      • Corey
        Indigo Rose Staff Alumni
        • Aug 2002
        • 9745

        #4
        Re: how do you search for a program's installation path in the registry, check if it exists, run it.

        Does *that player* have a name or install to the program folder? Because you can always do a file search for the .exe itself.

        Corey Milner
        Creative Director, Indigo Rose Software

        Comment

        • Derek
          Indigo Rose Customer
          • May 2001
          • 1254

          #5
          Re: how do you search for a program's installation path in the registry, check if it exists, run it.

          Does the player create an install log somewhere you can read thru to get its Reg entries?
          Failing that, use Corey's method or dig thru the Reg to find the entries [img]/ubbthreads/images/icons/smile.gif[/img]
          [perhaps u could try googling some info on it]
          -
          = Derek
          ["All glory comes from daring to begin" - fortune cookie]

          Comment

          • navajax
            Forum Member
            • Jun 2003
            • 4

            #6
            Re: how do you search for a program's installation path in the registry, check if it exists, run it.

            Well I thought about doing a file search but I figured reading it directly from the registry would be a lot quicker.
            It doesn't create a log file. I know the the reg entry, it's:
            HKEY_CURRENT_USER\Software\BST\BSplayer\AppPath (AppPath is the value name)
            So that's the registry entry I would get the autoplay to look for. But would I use that reg info to run the program??

            Comment

            • navajax
              Forum Member
              • Jun 2003
              • 4

              #7
              Re: how do you search for a program's installation path in the registry, check if it exists, run it.

              sorry, meant "how" would I...

              Comment

              • Corey
                Indigo Rose Staff Alumni
                • Aug 2002
                • 9745

                #8
                Re: how do you search for a program's installation path in the registry, check if it exists, run it.

                1. Use a REGISTRY > DOES KEY EXIST action to see if it exists, if not then launch your installer using a FILE EXECUTE action.

                2. If it exists (or once you've installed the player), since you say it makes no file associations then you'll have to find out how to use a command line argument to launch that file with that player, I'm not too sure as I've never heard of that player before... You can get the path of the file using a REGISTRY > GET VALUE DATA action...

                Corey Milner
                Creative Director, Indigo Rose Software

                Comment

                Working...
                X