Jump to content
The simFlight Network Forums

Recommended Posts

Posted

Hi, 

I'm thinking about writing a simple installer for my Lua plug-in.

If I remember correctly, the user can freely choose an install location for FSUIPC7. Is there a way to read that location, maybe from the registry? 

Thanks in advance. 

Posted

You can read the installation location from the registry, from InstallDir under HKLM Software\Microsoft\Windows\CurrentVersion\Uninstall\FSUIPC7

But note that lua files don't necessarily go in the installation folder. If the LuaPath ini parameter is set (under [LuaFiles]), that will be used instead, so you would also need to read that. LuaPath can contain a relative or full path specification.

John

Posted
On 11/3/2022 at 11:20 AM, John Dowson said:

You can read the installation location from the registry, from InstallDir under HKLM Software\Microsoft\Windows\CurrentVersion\Uninstall\FSUIPC7

But note that lua files don't necessarily go in the installation folder. If the LuaPath ini parameter is set (under [LuaFiles]), that will be used instead, so you would also need to read that. LuaPath can contain a relative or full path specification.

John

Hi John,

I need to get back to you on this. On my Windows 11 installation the path is this: "Computer\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\FSUIPC7". Is this to be expected? Do you know what are the different path versions from Win7 until Win11 (both 32 and 64bit versions)? Thanks!

Posted

The installer just writes (and reads) the key as I specified. This is for FSUIPC6 and FSUIPC7 only, which are both  64-bit, so 32-bit OS (Win7) is not supported. Any translation to the registry path must be done by windows. I suggest you just try reading the key as specified.

John

Posted

That is strange... the installer writes and reads from that path...

I have just checked my registry and I also have the entries under the WOW6432Node, as you say. However, the installer still reads/writes to that location I specified. Strange.
I suspect this is some sort of voodoo that windows uses to split registry entries for 32 and 64-bit applications. Just use whatever works for you.

John

Posted
22 hours ago, NovemberUniform said:

Can you please repeat the exact string of the path you are looking for. 

I already did - it is this:

On 11/3/2022 at 11:20 AM, John Dowson said:

from InstallDir under HKLM Software\Microsoft\Windows\CurrentVersion\Uninstall\FSUIPC7

Maybe the exact location is determined by the installer API I am using, which is NSIS. I don't know how that resolves the input to the exact registry location, but, as O said, just use what you find and that should be sufficient. I suspect that the location I am using will be resolved to the WOW6432Node location dor all installs (as they are all 64-bit), so just use that, Otherwise, fig into the NSIS registry facilities, but I don't see why you just don't use what you see....

John

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.