You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using my Windows 11 PC with a non-administrator user. When needed, UAC prompts me for administrator rights, and I enter the username and password of a user with administrator rights to authorize the action.
The installer doesn't count on administrator privilege given by UAC using another user and installs the application in the local appdata of the user that spawned the installation process. When UAC spawned the process from another user, the application appears to be installed in that user's local appdata and becomes unavailable.
My suggestion is if the application has and requires administrator privilege, it may be installed somewhere accessible to all users, for example in ProgramData. This way it will be accessible to all users.
Also, the shortcut that is generated on the Desktop, contains wrong target (local appdata, but for non-administrator user) but the right working directory (local appdata of the administrator user), this makes the shortcut unusable.
My workaround was to copy the application folder to the accessible folder for all users, but the application crashes with
---------------------------
Error
---------------------------
Unexpected exception occurred:
Couldn't read the AppsUseLightTheme setting.
Please report the issue on https://github.com/BartoszCichecki/LenovoLegionToolkit/issues/new/choose.
---------------------------
OK
---------------------------
I suspect the reason for this is in that the user that spawns the process isn't logged in.
How to reproduce the bug?
Launch the installer as a non-administrator user User.
UAC will prompt for elevation. Elevate the installation using the other, Administrator user credentials.
Try to launch the application via the shortcut on the desktop.
Try to launch the application via its executable.
What is the behavior that you expected?
The application is installed in a folder that is accessible for all users.
The application can be launched using the other user's administrator rights.
Logs
=== Exception ===
System.InvalidOperationException: Couldn't read the AppsUseLightTheme setting.
at LenovoLegionToolkit.Lib.System.SystemTheme.GetDarkMode()
at LenovoLegionToolkit.WPF.Utils.ThemeManager.get_IsDarkMode()
at LenovoLegionToolkit.WPF.Utils.ThemeManager.SetTheme()
at LenovoLegionToolkit.WPF.Utils.ThemeManager.Apply()
at LenovoLegionToolkit.WPF.App.Application_Startup(Object sender, StartupEventArgs e)
at System.Threading.Tasks.Task.<>c.b__128_0(Object state)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
=== Exception demystified ===
System.InvalidOperationException: Couldn't read the AppsUseLightTheme setting.
at bool LenovoLegionToolkit.Lib.System.SystemTheme.GetDarkMode()
at bool LenovoLegionToolkit.WPF.Utils.ThemeManager.get_IsDarkMode()
at void LenovoLegionToolkit.WPF.Utils.ThemeManager.SetTheme()
at void LenovoLegionToolkit.WPF.Utils.ThemeManager.Apply()
at async void LenovoLegionToolkit.WPF.App.Application_Startup(object sender, StartupEventArgs e)
at void System.Threading.Tasks.Task.ThrowAsync(Exception exception, SynchronizationContext targetContext)+(object state) => { }
at object System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, object args, int numArgs)
at object System.Windows.Threading.ExceptionWrapper.TryCatchWhen(object source, Delegate callback, object args, int numArgs, Delegate catchHandler)
Do you have Lenovo software installed?
Lenovo Vantage is installed
Lenovo Hotkeys is installed
None of the above
Did you disable any Lenovo software using Lenovo Legion Toolkit?
Lenovo Vantage
Lenovo Hotkeys
I disabled some things on my own (please write below what you did)
Additional information
Slava Ukraїni
The text was updated successfully, but these errors were encountered:
BartoszCichecki
changed the title
[BUG]: Application file system unavailable if installed using other user administrator rights
[FEAT]: Allow installation for non-admin users
Dec 22, 2022
Multi user setup are not supported very well and that includes your scenario. I don't have plans to add support for cases like yours any time soon so not sure if and when it will be done.
Version
2.7.1
OS
Windows 11 22000
Device
doesn't matter
BIOS version
doesn't matter
What's wrong?
I am using my Windows 11 PC with a non-administrator user. When needed, UAC prompts me for administrator rights, and I enter the username and password of a user with administrator rights to authorize the action.
The installer doesn't count on administrator privilege given by UAC using another user and installs the application in the local appdata of the user that spawned the installation process. When UAC spawned the process from another user, the application appears to be installed in that user's local appdata and becomes unavailable.
My suggestion is if the application has and requires administrator privilege, it may be installed somewhere accessible to all users, for example in ProgramData. This way it will be accessible to all users.
Also, the shortcut that is generated on the Desktop, contains wrong target (local appdata, but for non-administrator user) but the right working directory (local appdata of the administrator user), this makes the shortcut unusable.
My workaround was to copy the application folder to the accessible folder for all users, but the application crashes with
I suspect the reason for this is in that the user that spawns the process isn't logged in.
How to reproduce the bug?
What is the behavior that you expected?
Logs
=== Exception ===
System.InvalidOperationException: Couldn't read the AppsUseLightTheme setting.
at LenovoLegionToolkit.Lib.System.SystemTheme.GetDarkMode()
at LenovoLegionToolkit.WPF.Utils.ThemeManager.get_IsDarkMode()
at LenovoLegionToolkit.WPF.Utils.ThemeManager.SetTheme()
at LenovoLegionToolkit.WPF.Utils.ThemeManager.Apply()
at LenovoLegionToolkit.WPF.App.Application_Startup(Object sender, StartupEventArgs e)
at System.Threading.Tasks.Task.<>c.b__128_0(Object state)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
=== Exception demystified ===
System.InvalidOperationException: Couldn't read the AppsUseLightTheme setting.
at bool LenovoLegionToolkit.Lib.System.SystemTheme.GetDarkMode()
at bool LenovoLegionToolkit.WPF.Utils.ThemeManager.get_IsDarkMode()
at void LenovoLegionToolkit.WPF.Utils.ThemeManager.SetTheme()
at void LenovoLegionToolkit.WPF.Utils.ThemeManager.Apply()
at async void LenovoLegionToolkit.WPF.App.Application_Startup(object sender, StartupEventArgs e)
at void System.Threading.Tasks.Task.ThrowAsync(Exception exception, SynchronizationContext targetContext)+(object state) => { }
at object System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, object args, int numArgs)
at object System.Windows.Threading.ExceptionWrapper.TryCatchWhen(object source, Delegate callback, object args, int numArgs, Delegate catchHandler)
Do you have Lenovo software installed?
Did you disable any Lenovo software using Lenovo Legion Toolkit?
Additional information
Slava Ukraїni
The text was updated successfully, but these errors were encountered: