Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhancement: Fallback to SysDriveRoot on Install if OneDrive detected #504

Merged

Conversation

dreamsyntax
Copy link
Contributor

Makes the Reloaded-II initial installation fallback to SysDriveRoot (commonly C:) if OneDrive is detected in the path to the user's Desktop.
Resolves #477

Makes the Reloaded-II initial installation fallback to SysDriveRoot
(commonly C:\) if OneDrive is detected in the path to the user's
Desktop.
Resolves Reloaded-Project#477
@dreamsyntax
Copy link
Contributor Author

Confirmed on Win 10 22H2 with OneDrive disabled / with recommended backup mode off, such that Desktop is not within [..]\OneDrive\ that the Installer successfully put Reloaded-II on C:\Users\myuser\Desktop

Confirmed on Win 11 24H2 with OneDrive "recommended backup" mode, which re-links Desktop that the Installer successfully put Reloaded-II on C:\ instead.

image

@Sewer56
Copy link
Member

Sewer56 commented Nov 29, 2024

Just as a quick check, does the launcher work fine after install?
I'm more so curious as I don't know if a non-admin user would have write permissions to that folder. I believe they should, but since you have a VM, might aswell doublecheck.

@dreamsyntax
Copy link
Contributor Author

Just as a quick check, does the launcher work fine after install?
I'm more so curious as I don't know if a non-admin user would have write permissions to that folder. I believe they should, but since you have a VM, might aswell doublecheck.

Would it need to be installed by a non admin user? I rarely if ever see non admin users used on windows

@Sewer56
Copy link
Member

Sewer56 commented Nov 29, 2024

Yeah pretty much, non-admin user. It's rare but it exists.

@dreamsyntax
Copy link
Contributor Author

dreamsyntax commented Nov 30, 2024

Non-Admin user experience is pretty broken it seems.
Flow was this:

Precondition:

  • Admin user exists with OneDrive setup, and password/pin - Reloaded-II never previously installed
  • Standard (non admin) user exists and does not have OneDrive setup.
  • Standard user is currently logged in.

Steps:

  1. Standard user runs Setup.exe. UAC asks to elevate to admin and requires Admin user's credentials.
  2. Admin user authorizes.
  3. Reloaded-II installer detects Admin User's OneDrive path to Desktop, since it's run under Admin context, and places Reloaded-II in C:\Reloaded-II
  4. No Shortcut to Reloaded-II is created on Standard User's Desktop. The Shortcut is instead placed on Admin's Desktop.
  5. Reloaded-II finishes launching, and is fully functional with Mod Downloads, Launching, etc.
  6. Reloaded-II is closed by the Standard User.
  7. Reloaded-II is directly launched by the Standard User by navigating to C:\Reloaded-II
  8. The program does not successfully initialize.
    image

There's a lot wrong.

Context is based on the Elevated Admin permissions, causing:

  • Shortcut is placed on Admin's Desktop instead of Standard User.
  • OneDrive detection is based on the Admin instead of Standard User.
  • Reloaded-II will work (because its running in the Admin user's context) until next launch.

I think perhaps this is an edgecase that could be isolated separately in another Issue/PR.
Ideally we'd just warn the user to instead use the Release.zip in the case of a non-admin account AND somehow detect a different user's context is used for the redist setups when the context is elevated for installing those.

@Sewer56
Copy link
Member

Sewer56 commented Nov 30, 2024

Well, for now a non-admin account wouldn't be able to elevate to admin to run the installer in any case; without some very special setup; that's fine to leave to another issue then.

@Sewer56 Sewer56 merged commit b7629cb into Reloaded-Project:master Nov 30, 2024
2 checks passed
@dreamsyntax dreamsyntax deleted the feature/onedrive-detection branch November 30, 2024 15:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enhancement: Detection of OneDrive during Reloaded Install
2 participants