VP can't find app from registry

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • beeneeb
    Indigo Rose Customer
    • Sep 2006
    • 19

    #16
    It still does the same thing..."Software not Found"

    Comment

    • Lorne
      Indigo Rose Staff Member
      • Feb 2001
      • 2729

      #17
      What is reported in the first dialog message box? What is FolderPath set to?
      --[[ Indigo Rose Software Developer ]]

      Comment

      • beeneeb
        Indigo Rose Customer
        • Sep 2006
        • 19

        #18
        FolderPath = "C:\Program Files\York Furnace Service Guide"

        After I click "Okay", it then posts:

        %AppFolder% = "%AppFolder%"

        Comment

        • Lorne
          Indigo Rose Staff Member
          • Feb 2001
          • 2729

          #19
          Oops, that second Dialog.Message action should be moved to after the SessionVar.Set() action, like so:

          Code:
          -- Location method: Registry key
          -- Read a folder path from the Registry.
          if not g_InstalledVersion then
          	local MainKey = HKEY_LOCAL_MACHINE;
          	local SubKey = "SOFTWARE\\YORKFURNSRVGD";
          	local ValueName = "Location";
          	local FolderPath = Registry.GetValue(MainKey, SubKey, ValueName);
          	Dialog.Message("Temporary Debug Message:" , "FolderPath = \""..FolderPath.."\"");
          	g_InstalledVersion = VisualPatch.CheckFolderVersion("%AppFolder%", FolderPath);
          	if g_InstalledVersion then
          		SessionVar.Set("%AppFolder%", FolderPath);
          		[COLOR="DarkOrchid"]Dialog.Message("Temporary Debug Message:" , "%AppFolder% = \"" .. SessionVar.Expand("%AppFolder%").."\"");[/COLOR]
          	end
          end
          After this change, if the CheckFolderVersion action doesn't recognize the installed version, g_InstalledVersion will be nil, and the 2nd dialog message won't be shown.

          The good news is we know it's getting the value from the Registry okay, so the CheckFolderVersion action probably isn't recognizing the contents of that folder as a version.

          If that's the case, then it's generally just that (a) the installed version doesn't match the versions you added to your project or (b) you need to choose appropriate key files so the CheckFolderVersion action can make a positive ID.

          Here are some questions to ask:
          1. What version of the software is installed at that location?
          2. What key files did you select in your project?
          3. What is the MD5 signature of the key files that are installed? Do those signatures match the MD5 signatures of the key files in your project?
          4. Are the key files that you selected for each version different from each other so Visual Patch can use them to tell your versions apart?
          --[[ Indigo Rose Software Developer ]]

          Comment

          Working...
          X