No announcement yet.

VP can't find software from registry on Vista x64

  • Filter
  • Time
  • Show
Clear All
new posts

  • VP can't find software from registry on Vista x64

    Hello I have the following code:

    local MainKey = HKEY_LOCAL_MACHINE;
    --Debug.Print("MainKey =" .. MainKey .. "\r\n");
    local SubKey = SessionVar.Expand("Software\\JohnDeere\\IVS\\JDLin kMMSDirect\\");
    --Debug.Print("subkey =" .. SubKey .. "\r\n");
    local ValueName = "InstallPath";
    local FolderPath = Registry.GetValue(MainKey, SubKey, ValueName);
    --Debug.Print("FolderPath =" .. FolderPath .. "\r\n");
    local InstallPath = Registry.GetValue(MainKey, SubKey, ValueName);

    I keep getting a software not found screen when I know it is. I have tested this code and it works fine on XP and VIsta 32 bit. But for some reason I can't get the path for Vist x64 bit. I have a log error 1605 saying it couldn't get the specified value's data when trying to load the installpath variable and the folderpath variable. ANy ideas on why this would be?


  • #2
    Is that path in the 64-bit portion of the Registry? If so, Visual Patch may not be able to access it directly because it is running as a 32-bit process, without turning the Registry redirection off.

    There is an API call that can be used to turn Registry redirection off, but it isn't available in Visual Patch 2.0.

    You should be able use a DLL to do that, though. In fact I think someone on these forums (Eagle?) already made such a DLL, so you might be able to find a solution with a forum-wide search.
    --[[ Indigo Rose Software Developer ]]


    • #3
      Hwo do I find if it is in the 64 bit part of the registry? IS there a part of the registry I Can put it that is the 32 bit part so I can avoid turning off the redirector.


      • #4
        I believe it's determined by the kind of process -- i.e. a 32-bit application will see the 32-bit registry, a 64-bit application will see the "real" 64-bit registry.

        So it depends how that registry key is getting created in the first place. Is it being put there by your application? If so, is your application a 64-bit or 32-bit app?

        If a 64-bit application is creating that registry key, you'll either need to change how the key is created (so it gets put in the 32-bit section) or you'll need to use a DLL to turn the "32-bit" redirection off for VP, so that it can see the registry key. Which method you use is up to you, but generally I think it would be better to leave the registry key where it is and turn the redirection off for VP.
        --[[ Indigo Rose Software Developer ]]