Reading Install Path From Registry

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • Staggan
    Forum Member
    • Apr 2006
    • 94

    #31
    Hi...

    I have created a new project exactly as suggested, version 1 and version 2. I use the version.txt file as the key file for each version, and version 1 version.txt has an MD5 that matches the MD5 of the installed version.txt.

    The only difference between version 1 and version 2 are the version.txt files.

    I then got the "Software Not Found" error, the same as before.

    As a test, I changed the key file in version 1 to the executable and rebuilt the patch.

    Everything worked fine... except of course I want to use a single file to denote software version...

    Comment

    • Lorne
      Indigo Rose Staff Member
      • Feb 2001
      • 2729

      #32
      Originally posted by Staggan
      Hi...

      I have created a new project exactly as suggested, version 1 and version 2. I use the version.txt file as the key file for each version, and version 1 version.txt has an MD5 that matches the MD5 of the installed version.txt.

      The only difference between version 1 and version 2 are the version.txt files.

      I then got the "Software Not Found" error, the same as before.
      What registry key did you use? Note that the default registry key is HKEY_CURRENT_USER/Software/<company name>/<product name>/InstallFolder (not Install_Dir).

      Does the value of that registry key point to the installation folder?

      As a test, I changed the key file in version 1 to the executable and rebuilt the patch.

      Everything worked fine... except of course I want to use a single file to denote software version...
      I just performed the test myself, with no problems. Here's exactly what I did:
      1. Copied C:\Program Files\7-Zip into C:\Temp\VP Test and renamed it "7-Zip 1"
      2. Made a second copy and renamed it "7-Zip 2"
      3. Added a file named version.txt inside "7-Zip 1" and put this text in it: This is version 1
      4. Copied the version.txt file into "7-Zip 2" and changed the text to: This is version 2
      5. Started Visual Patch and used the project wizard to create a project. I used "Lorne's Testing Service" as the company name, and "7-Zip" as the product name. Used default settings for the next 3 wizard steps.
      6. On the "Define Versions" step, I clicked Add, changed the Version number from 1.0 to 1, set C:\Temp\VP Test\7-Zip 1 as the source folder, and C:\Temp\VP Test\7-Zip 1\version.txt as the key file. Then I clicked OK.
      7. I clicked Add once more, left the Version number at 2, set C:\Temp\VP Test\7-Zip 2 as the source folder, and C:\Temp\VP Test\7-Zip 2\version.txt as the key file. Then I clicked OK.
      8. For the next wizard step (Locate Installed Version), I left all three options enabled.
      9. For the Read Location step, I left the main key as HKEY_CURRENT_USER, left the sub-key as Software\Lorne's Testing Service\7-zip, and left the value as InstallFolder.
      10. I started regedit, navigated to HKEY_CURRENT_USER\Software, added a new key named Lorne's Testing Service. Inside that, I added a new key named 7-zip. Inside that, I added a new String value named InstallFolder. I double-clicked on InstallFolder and set its value to "C:\Program Files\7-Zip"
      11. For the next project wizard step (File Search), I left the default values, but unchecked "Search all local hard drives"
      12. On the Project Options step, I left all the default options enabled.
      13. Clicked Finish, and voila, fully working project.
      14. I pressed F7 to build the patch, change the output folder to C:\Temp\VP Test, and changed the patch filename to 7-Zip patch.exe
      15. I ran the patch - software not found. Good -- I didn't copy the version.txt file into the installation folder yet.
      16. I copied the version.txt file from C:\Temp\VP Test\7-Zip 1 into C:\Program Files\7-Zip
      17. Ran the patch again, it found the software, and was able to patch it with no problems.
      18. Opened C:\Temp\VP Test\7-Zip 1\version.txt and confirmed that it now contains "This is version 2" proving that the patch succeeded.


      I'm not sure what you're doing wrong, but since I was able to perform the same test without any difficulties, and since we haven't received any reports of any problems with any of this functionality, it seems to me there must be something wrong with your test procedure. I thought it might be hard drive issue (file corruption) but comparing the MD5 signatures of the files should rule that out.

      There isn't much more I can suggest without seeing your project. I know you didn't want to post too many details about your project publically. Perhaps another option would be to contact our support department (issue a ticket at support.indigorose.com), so you can provide a bit more information in confidence?
      --[[ Indigo Rose Software Developer ]]

      Comment

      • Staggan
        Forum Member
        • Apr 2006
        • 94

        #33
        Hi Lorne...

        My registry info is correct, otherwise when I just changed the key file, it would still not work.

        I will try a patch again shortly, but as far as I can see, I am doing nothing wrong and following all instructions.

        Failing this, I will try to create a test application that I can send, showing the problems... would that be alright ?

        Comment

        • Lorne
          Indigo Rose Staff Member
          • Feb 2001
          • 2729

          #34
          Originally posted by Staggan
          My registry info is correct, otherwise when I just changed the key file, it would still not work.
          Yeah, I found that strange as well.

          I will try a patch again shortly, but as far as I can see, I am doing nothing wrong and following all instructions.

          Failing this, I will try to create a test application that I can send, showing the problems... would that be alright ?
          Definitely. If you're able to produce a setup and project that will duplicate your test results that's something we would want to see for sure.
          --[[ Indigo Rose Software Developer ]]

          Comment

          Working...
          X