Self-installer locates TRiVIA in user's -pr account by default, making the program inaccessible to non-elevated accounts
Expected Behavior
When starting the self-installer, the user should be asked to elevate privileges. The software should ask if TRiVIA should be installed for all users, or just the current user (which will be whoever elevated to -pr or -ou). If installation for all users is selected, the default destination folder should be in Program Files
rather than a user's Roaming
folder.
Upon installation the desktop shortcut should point to the exe launcher in a place which is reachable by the end user.
Current Behavior
The self-installer's default destination folder is listed as:
C:\Users\<username-pr\AppData\Roaming\U.S. Geological Survey\TRiVIA
where <username-pr>
is the elevated user profile for whoever is installing the software. If left unchanged, the software installs normally, and if the user checked the "Add shortcut to desktop" button, the shortcut created points to that user's Roaming profile, not to where the software is located. The target for this shortcut looks like this:
"C:\Users\<username>\AppData\Roaming\U.S. Geological Survey\TRiVIA\application\TRiVIA.exe"
where <username>
is the currently logged in user.
TRiVIA then fails to start because 1) the shortcut is not pointing to where the actual launcher is located, and 2) the non-elevated user does not have rights to start software installed in an elevated profile's account.
Possible Solution
A simple workaround is to add documentation stating users and IT who are installing the software should double check the self-installer destination folder to ensure the location is correct, and accessible to the end user.
A more complete solution would include changing the behavior of the self-installer to prompt if the program should be installed for all users, not just the user who executed the self-installer. This would mean that the TRiVIA installation directory would likely need to be moved to Program Files
rather than in a user's Roaming
directory.
Context (Environment)
This issue is likely present for all users but was noticed on a USGS Windows 10 machine (10.0.19044).
- A regular user profile is active (logged in to system, not -pr)
- The user starts the self-installer, and elevates user privileges using -pr