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

Run as admin and run at startup options do not persist after restart #20457

Closed
1 task done
Weddm opened this issue Sep 10, 2022 · 6 comments
Closed
1 task done

Run as admin and run at startup options do not persist after restart #20457

Weddm opened this issue Sep 10, 2022 · 6 comments
Labels
Issue-Bug Something isn't working Needs-Triage For issues raised to be triaged and prioritized by internal Microsoft teams

Comments

@Weddm
Copy link

Weddm commented Sep 10, 2022

Microsoft PowerToys version

0.61.1

Running as admin

  • Yes

Area(s) with issue?

Settings

Steps to reproduce

Run powertoys as user.
Choose "Always run as admin"
Choose "Run at startup"
Exit from menu bar.
Exit from taskbar icon.
Check Task manager processes - not listed.
Reboot
Check Task manager processes - not listed.
goto step 1

✔️ Expected Behavior

Powertoys to run at startup
Run as Admin & at startup options to persist in "on" state.

❌ Actual Behavior

Powertoys does not run at startup
Run as Admin & at startup options are in "off" state.

Other Software

No response

@Weddm Weddm added Issue-Bug Something isn't working Needs-Triage For issues raised to be triaged and prioritized by internal Microsoft teams labels Sep 10, 2022
@rigman
Copy link

rigman commented Sep 12, 2022

I have the same issue. I launch Powertoys from a short cut that has the properties set to run as admin. After the UI is open underneath the "Administrator mode" setting it shows "Running as administrator" and "Restart PowerToys as administrator" is greyed out. "Always run as administrator" is not selected, though I have had this option selected for as long as Powertoys has been released. After I select "Always run as administrator", when I close the UI it reverts back to what it was before. Also the option to enable Awake won't stay set either. I turn it on, exit the UI and it's turned back off.

I have also tried running directly from the exe in folder C:\Program Files\PowerToys, then selecting "Restart PowerToys as administrator". The UAC asks for permissions, and like above it shows "Running as administrator". But closing the UI still results in the settings reverting back.

I know this isn't just a UI issue because I normally use Awake to keep my windows logon from going to sleep. With PowerToys running in the system tray Windows locks at the 15 minute inactivity timer showing that the Awake option isn't working. If I leave the PowerToys UI open, but minimized then Awake prevents Windows from locking as it should.

If I select the option to "Report Bug" it pops up and says the zip file was created on my desktop. But there's no zip file there. I've tried refreshing my desktop and running "Report Bug" multiple times. Nothing. Also tried rebooting.

@UsernameIsAlreadyTakenByMe
Copy link

UsernameIsAlreadyTakenByMe commented Sep 14, 2022

Thank you for the workaround: "If I leave the PowerToys UI open, but minimized then Awake prevents Windows from locking as it should."
I only noticed this issue with version 0.62.

FYI: There is a workaround also for the bug report issue:
#20297
%userprofile%\AppData\LocalLow\Microsoft\PowerToys\Logs -> this folder needed to be created as a workaround

@rigman
Copy link

rigman commented Sep 22, 2022

I installed 62.1 and tried again to create a "Report Bug" zip file to help with triaging this issue (Running as admin settings doesn't retain), but Report Bug still doesn't create a zip file on the desktop. And yes, I created folder %userprofile%\AppData\LocalLow\Microsoft\PowerToys\Logs. Anyone researching the Run as Admin and Awake settings not persisting?

@rigman
Copy link

rigman commented Oct 6, 2022

FYI - I was able to fix mine by manually modifying the settings.json file in folder %userprofile%\AppData\Local\Microsoft\PowerToys

Not sure it's totally correct, but it's working for me. I changed "is_elevate", "run_elevated", and "is_admin" to true.

I don't have "Run at startup" toggled on because my user account is a standard account and I need to start PowerToys manually so I can enter my admin credentials. But I'm guessing you can change value "startup" to true to fix that as well.

{"startup":false,**"is_elevated":true,"run_elevated":true,"is_admin":true**,"theme":"system","system_theme":"light","powertoys_version":"v0.63.0","action_name":"","enabled":{"FancyZones":false,"Image Resizer":true,"File Explorer Preview":true,"Shortcut Guide":false,"Video Conference":true,"PowerRename":true,"Keyboard Manager":false,"PowerToys Run":false,"ColorPicker":false,"Awake":true,"FindMyMouse":true,"MouseHighlighter":true,"AlwaysOnTop":true,"MousePointerCrosshairs":false,"QuickAccent":false,"TextExtractor":true,"Measure Tool":true},"download_updates_automatically":false}

@Weddm
Copy link
Author

Weddm commented Oct 8, 2022

FYI - I was able to fix mine by manually modifying the settings.json file in folder %userprofile%\AppData\Local\Microsoft\PowerToys

Not sure it's totally correct, but it's working for me. I changed "is_elevate", "run_elevated", and "is_admin" to true.

I don't have "Run at startup" toggled on because my user account is a standard account and I need to start PowerToys manually so I can enter my admin credentials. But I'm guessing you can change value "startup" to true to fix that as well.

{"startup":false,**"is_elevated":true,"run_elevated":true,"is_admin":true**,"theme":"system","system_theme":"light","powertoys_version":"v0.63.0","action_name":"","enabled":{"FancyZones":false,"Image Resizer":true,"File Explorer Preview":true,"Shortcut Guide":false,"Video Conference":true,"PowerRename":true,"Keyboard Manager":false,"PowerToys Run":false,"ColorPicker":false,"Awake":true,"FindMyMouse":true,"MouseHighlighter":true,"AlwaysOnTop":true,"MousePointerCrosshairs":false,"QuickAccent":false,"TextExtractor":true,"Measure Tool":true},"download_updates_automatically":false}

The above fixed the 'run as admin' and 'run elevated' issues, but not the 'run at startup'

@Weddm Weddm closed this as completed Oct 8, 2022
@Weddm
Copy link
Author

Weddm commented Oct 8, 2022

As a standard user, the above fix worked. As admin the startup setting also worked after I placed a shortcut in the C:\Program data\Microsoft\Windows\Programs\Startup folder. I should be able to replicate this for the standard user.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Bug Something isn't working Needs-Triage For issues raised to be triaged and prioritized by internal Microsoft teams
Projects
None yet
Development

No branches or pull requests

3 participants