The installer creates the key "Install_Dir" with the string value of the installation folder under HKLM\Software\Oolite. You can try searching for that.
Expansion packs download failed..
Moderators: winston, another_commander, Getafix
-
- Quite Grand Sub-Admiral
- Posts: 6696
- Joined: Wed Feb 28, 2007 7:54 am
- hiran
- Theorethicist
- Posts: 2410
- Joined: Fri Mar 26, 2021 1:39 pm
- Location: a parallel world I created for myself. Some call it a singularity...
Re: Expansion packs download failed..
Now we're talking!
As I dont't have Windows to verify,, could you confirm this command prints the desired path to stdout?
Code: Select all
reg query HKLM\Software\Oolite /v Install_Dir
Sunshine - Moonlight - Good Times - Oolite
-
- Quite Grand Sub-Admiral
- Posts: 6696
- Joined: Wed Feb 28, 2007 7:54 am
Re: Expansion packs download failed..
Unfortunately the PC I am on right now is restricted and I can't check (registry access is off-limits due to policy). Will do at first opportunity, but I don't know when that will be - it may take a while.hiran wrote: ↑Wed Oct 11, 2023 9:08 amNow we're talking!
As I dont't have Windows to verify,, could you confirm this command prints the desired path to stdout?
Code: Select all
reg query HKLM\Software\Oolite /v Install_Dir
-
- Quite Grand Sub-Admiral
- Posts: 6696
- Joined: Wed Feb 28, 2007 7:54 am
Re: Expansion packs download failed..
I did the test and it was interesting to say the least. Here are the observations, followed by my conclusion.
- The registry query command yields no results. Apparently, the HKLM\Software\Oolite key is not present.
- After some further investigation, it turns out that, for some reason - maybe related to the fact that the Windows installer is a 32-bit app - the key we are looking for will be located under HKLM\SOFTWARE\WOW6432Node\Oolite.
- Following a normal install of the game, the key is still NOT created. The only way to get the installer to successfully write it to the registry is to run it as administrator. This actually makes sense from a security point of view, as you don't want installers to be noodling around with the registry whenever they feel like it. The interesting part is that the uninstaller still works fine and uninstalls using the correct path to the game, even without the registry keys being there.
- After you have run the installer as administrator, the key is at the location mentioned earlier and the reg query command yields the game's installation path as expected.
- All the above is on Windows 10 and 11. I do not know what exactly happens with Windows 7 (which we theoretically still support). The registry keys may be different there.
- hiran
- Theorethicist
- Posts: 2410
- Joined: Fri Mar 26, 2021 1:39 pm
- Location: a parallel world I created for myself. Some call it a singularity...
Re: Expansion packs download failed..
That is interesting indeed. How does the uninstaller correctly locate the installation? Or, if the uninstaller easily finds it in it's own install path - how does Windows know where to look for the uninstaller?another_commander wrote: ↑Wed Oct 11, 2023 5:41 pmI did the test and it was interesting to say the least. Here are the observations, followed by my conclusion.
Conclusion: Reading the registry key HKLM\SOFTWARE\WOW6432Node\Oolite can yield the install folder only if the installer has been run as administrator. Most users do not do that, they just execute it normally. So, under normal circumstances, I would not expect the install path to be in the registry. I have a way of making the installer request administrator privileges on startup, but I would really like to avoid that, mainly for security reasons (installers requesting admin rights normally trigger antivirus heuristics a lot and are generally not trusted by users, especially if they are not signed).
- The registry query command yields no results. Apparently, the HKLM\Software\Oolite key is not present.
- After some further investigation, it turns out that, for some reason - maybe related to the fact that the Windows installer is a 32-bit app - the key we are looking for will be located under HKLM\SOFTWARE\WOW6432Node\Oolite.
- Following a normal install of the game, the key is still NOT created. The only way to get the installer to successfully write it to the registry is to run it as administrator. This actually makes sense from a security point of view, as you don't want installers to be noodling around with the registry whenever they feel like it. The interesting part is that the uninstaller still works fine and uninstalls using the correct path to the game, even without the registry keys being there.
- After you have run the installer as administrator, the key is at the location mentioned earlier and the reg query command yields the game's installation path as expected.
- All the above is on Windows 10 and 11. I do not know what exactly happens with Windows 7 (which we theoretically still support). The registry keys may be different there.
And please let me have a concise command that I can invoke. Now I need to guess which line to execute:
Code: Select all
reg query HKLM\Software\Oolite /v Install_Dir
reg query HKLM\SOFTWARE\WOW6432Node\Oolite /v Install_Dir
reg query HKLM\SOFTWARE\WOW6432Node\Oolite
Sunshine - Moonlight - Good Times - Oolite
- hiran
- Theorethicist
- Posts: 2410
- Joined: Fri Mar 26, 2021 1:39 pm
- Location: a parallel world I created for myself. Some call it a singularity...
Re: Expansion packs download failed..
I have changed something in OoliteStarter v0.1.21-elul.7.
Would you like to check if the file browse function is faster now?
Sunshine - Moonlight - Good Times - Oolite
- phkb
- Impressively Grand Sub-Admiral
- Posts: 4830
- Joined: Tue Jan 21, 2014 10:37 pm
- Location: Writing more OXPs, because the world needs more OXPs.
Re: Expansion packs download failed..
It may be prudent to invest in a Windows VM of some sort. I've used VirtualBox with a Windows VM quite successfully. It would at least allow you to debug the installer on Windows and see the results directly.
-
- Quite Grand Sub-Admiral
- Posts: 6696
- Joined: Wed Feb 28, 2007 7:54 am
Re: Expansion packs download failed..
My guess is that the uninstaller (filename UninstOolite.exe) simply runs from the folder it's in if no specific paths are given and that folder happens to be the game's base install one so it just works. A shortcut to the uninstaller is also placed in the Start menu entry for the game and this is how it is normally executed so Windows has no issue finding it.
I will do that in a few hours, once I am back at a PC with registry access. I still think that this way of locating the game's installation is not very reliable though, simply because I don't expect most users to have the required keys written to the registry. It's maybe ok as a backup method, but as a primary one, I am not sure...And please let me have a concise command that I can invoke. Now I need to guess which line to execute:
Also I have no clue about process exit codes and what output to expect on stdout/stderr so I can start parsing.Code: Select all
reg query HKLM\Software\Oolite /v Install_Dir reg query HKLM\SOFTWARE\WOW6432Node\Oolite /v Install_Dir reg query HKLM\SOFTWARE\WOW6432Node\Oolite
- hiran
- Theorethicist
- Posts: 2410
- Joined: Fri Mar 26, 2021 1:39 pm
- Location: a parallel world I created for myself. Some call it a singularity...
Re: Expansion packs download failed..
Been there, done that.
https://bb.oolite.space/viewtopic.php?p=289848#p289848
But for whatever reasons Virtualbox has stopped working for me. Not only on the Windows VM but completely, and all attempts I took so far did not restore it.
I believe the system needs to be reinstalled - something I am more scared of than having no virtualization.
Sunshine - Moonlight - Good Times - Oolite
- hiran
- Theorethicist
- Posts: 2410
- Joined: Fri Mar 26, 2021 1:39 pm
- Location: a parallel world I created for myself. Some call it a singularity...
Re: Expansion packs download failed..
That would be a reasonable pattern. But I remember uninstalling Oolite through Windows Control panel (if that is still the correct name).another_commander wrote: ↑Thu Oct 12, 2023 5:19 amMy guess is that the uninstaller (filename UninstOolite.exe) simply runs from the folder it's in if no specific paths are given and that folder happens to be the game's base install one so it just works. A shortcut to the uninstaller is also placed in the Start menu entry for the game and this is how it is normally executed so Windows has no issue finding it.
Given that we have a menu entry pointing to the uninstaller, how can Windows know/find the uninstaller? Somewhere the installer must have registered something.
No worries, OoliteStarter will still scan the full disk. But I can bias it with locations to check first - and these values may come from the registry as well.another_commander wrote: ↑Thu Oct 12, 2023 5:19 amI will do that in a few hours, once I am back at a PC with registry access. I still think that this way of locating the game's installation is not very reliable though, simply because I don't expect most users to have the required keys written to the registry. It's maybe ok as a backup method, but as a primary one, I am not sure...
Sunshine - Moonlight - Good Times - Oolite
-
- Quite Grand Sub-Admiral
- Posts: 6696
- Joined: Wed Feb 28, 2007 7:54 am
Re: Expansion packs download failed..
OK, here are some more results.
The reg command variants that are of interest to us are these two:
The first lists all the subkeys under HKLM\SOFTWARE\WOW6432Node\Oolite, the second shows only the one we specify after /v. In this particular case, the output is the same for both because we only have one subkey.
The game has been installed in the path C:\OoliteTest01.
If the game is installed without admin rights, both above commands yield this output to stdout:
If the game is installed by running the installer as administrator, the same commands ooutput to stdout this:
I don't see any output going to stderr in any of those cases. As for return values, reg's /? command line switch gives us this:
Finally, for completeness sake, I should mention that there are also two more registry keys generated by the installer (again, only if run as administrator). Their location is HKLM\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Oolite. The reg query command tells us this about them (note that the install folder has been changed to C:\Oolite0001 here):
Of those two, the first one is there only for information purposes and the second one is used for automatically checking whether there is a previous version of the game in the install path, in which case the installer offers to remove it automatically before proceeding to install the new one.
The reg command variants that are of interest to us are these two:
Code: Select all
reg query HKLM\SOFTWARE\WOW6432Node\Oolite
reg query HKLM\SOFTWARE\WOW6432Node\Oolite /v Install_Dir
The game has been installed in the path C:\OoliteTest01.
If the game is installed without admin rights, both above commands yield this output to stdout:
Code: Select all
C:\ooinst>reg query HKLM\SOFTWARE\WOW6432Node\Oolite
ERROR: The system was unable to find the specified registry key or value.
C:\ooinst>reg query HKLM\SOFTWARE\WOW6432Node\Oolite /v Install_Dir
ERROR: The system was unable to find the specified registry key or value.
Code: Select all
C:\ooinst>reg query HKLM\SOFTWARE\WOW6432Node\Oolite
HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Oolite
Install_Dir REG_SZ C:\OoliteTest01
C:\ooinst>reg query HKLM\SOFTWARE\WOW6432Node\Oolite /v Install_Dir
HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Oolite
Install_Dir REG_SZ C:\OoliteTest01
Code: Select all
Return Code: (Except for REG COMPARE)
0 - Successful
1 - Failed
Finally, for completeness sake, I should mention that there are also two more registry keys generated by the installer (again, only if run as administrator). Their location is HKLM\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Oolite. The reg query command tells us this about them (note that the install folder has been changed to C:\Oolite0001 here):
Code: Select all
C:\ooinst>reg query HKLM\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Oolite
HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Oolite
DisplayName REG_SZ Oolite 1.91.0.7499-230913-4549f87-dev
UninstallString REG_SZ "C:\Oolite0001\UninstOolite.exe"
- hiran
- Theorethicist
- Posts: 2410
- Joined: Fri Mar 26, 2021 1:39 pm
- Location: a parallel world I created for myself. Some call it a singularity...
Re: Expansion packs download failed..
Thank you. That investigation is really complete.
A first attempt to use this is in OoliteStarter v0.1.21-elul.8.
I'm happy if someone could test this on Windows and let me know
- if scanning for Oolite works
- let me have the logfile
Sunshine - Moonlight - Good Times - Oolite
Re: Expansion packs download failed..
Unfortunately, scanning didn't work for me.A first attempt to use this is in OoliteStarter v0.1.21-elul.8.
I'm happy if someone could test this on Windows and let me know
- if scanning for Oolite works
- let me have the logfile
"Select OOlite Home Directory" window, with
"So you don't know where you installed Oolite? No worries, I can help you find it?
Then an "installations" sub-window that is blank
I do want to add though - the manual add , then "Browse" buttons now work really well (They were freezing before) - and everything auto-populates properly, including the version number now. Well done
- hiran
- Theorethicist
- Posts: 2410
- Joined: Fri Mar 26, 2021 1:39 pm
- Location: a parallel world I created for myself. Some call it a singularity...
Re: Expansion packs download failed..
Hmmm. Could you provide a logfile? I added a bias where to look first but that seems not to work.
Thank you for the feedback.
Sunshine - Moonlight - Good Times - Oolite
Re: Expansion packs download failed..
Sure - Does your app have a logfile? What files would you like?Hmmm. Could you provide a logfile? I added a bias where to look first but that seems not to work.