I have a Visual Studio setup project together with a C# bootstrapper. The app usually was installed system-wide and requires admin permissions to be started. The new version uninstalls the old version and installs the new version in a per-user environment.
For the first installation of the new software version, admin privileges are required, but for starting the software and updates, no admin permissions are needed. In case of an update, I want to get the version of the software installed by that user and compare it to the update version.
The problem is, that the version info is not written into normal user registry place:
HKEY_CURRENT_USER\Software\<SoftwareVendor>\<SoftwareName>
Instead it is written to
Computer\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{<..Product-Code...>}.
Every user writes to that HKLM location, so I don't know which version was installed by the specific user. Why is this version info written to this place? Is there a way to change this?
The Visual Studio setup project registry (project -> view -> registry) is set to HKEY_CURRENT_USER -> Software -> Manufacturer. Is this correct?
I know that I could use a file to save the version info, I was just wondering why the usual registry way is not working.
[Edit 1]: I'm setting the version number inside of the Visual studio setup project properties.