NovemberUniform Posted November 2, 2022 Report Posted November 2, 2022 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.
John Dowson Posted November 3, 2022 Report Posted November 3, 2022 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
NovemberUniform Posted November 3, 2022 Author Report Posted November 3, 2022 Thanks John! Much appreciated.
NovemberUniform Posted November 4, 2022 Author Report Posted November 4, 2022 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!
John Dowson Posted November 4, 2022 Report Posted November 4, 2022 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
NovemberUniform Posted November 4, 2022 Author Report Posted November 4, 2022 38 minutes ago, John Dowson said: I suggest you just try reading the key as specified. I can only read it succesfully (on my PC), if I use the path I have shown. It's not working with the path you provided.
John Dowson Posted November 4, 2022 Report Posted November 4, 2022 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
NovemberUniform Posted November 4, 2022 Author Report Posted November 4, 2022 Can you please repeat the exact string of the path you are looking for.
John Dowson Posted November 5, 2022 Report Posted November 5, 2022 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
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now