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] Ability to execute system/OS commands like shutdown #2408

Closed
thexamlguy opened this issue Apr 26, 2020 · 15 comments
Closed

[Run] Ability to execute system/OS commands like shutdown #2408

thexamlguy opened this issue Apr 26, 2020 · 15 comments
Labels
Help Wanted We encourage anyone to jump in on these and submit a PR. Idea-Enhancement New feature or request on an existing product Product-PowerToys Run Improved app launch PT Run (Win+R) Window Resolution-Fix Committed Fix is checked in, but it might be 3-4 weeks until a release.

Comments

@thexamlguy
Copy link

As per this twitter conversation, it would be nice to have the ability to execute system commands such as sleep, shutdown ,and switch user account from within the launcher via the use of friendly keywords.

Some keyword examples:
"sleep" - send the PC to sleep
"hibernate" - send the PC to sleep
"shutdown" - shut the PC down
"switch user" - switch user account

As current if we search for Sleep from within Windows Search we are only given the option to view Sleep and power settings. It is possible to run such commands from Win + R, although our command will instead look like this rundll32.exe powrprof.dll,SetSuspendState 0,1,0, not quite user friendly to be honest! :)

Screenshot taken from the twitter conversation showing how we could prioritize the UI for common Windows system commands above the search result.

image

@crutkas crutkas added Idea-Enhancement New feature or request on an existing product Product-PowerToys Run Improved app launch PT Run (Win+R) Window labels Apr 26, 2020
@crutkas
Copy link
Member

crutkas commented Apr 26, 2020

This is a great idea. We have a plugin based architecture so this should be possible.

@crutkas crutkas added the Help Wanted We encourage anyone to jump in on these and submit a PR. label Apr 26, 2020
@jyuwono jyuwono added this to the v1.0 Release milestone Apr 27, 2020
@crutkas crutkas changed the title [Launcher] Ability to execute system commands [Launcher] Ability to execute system/OS commands like shutdown Apr 30, 2020
@snaildos
Copy link

snaildos commented May 13, 2020

There is a launcher?
EDIT: What do you mean? The settings thing? Or am I missing something?

@crutkas
Copy link
Member

crutkas commented May 13, 2020

It is coming in 0.18 :)

@ohMoka
Copy link

ohMoka commented May 17, 2020

Any way to test out the launcher?

@crutkas
Copy link
Member

crutkas commented May 17, 2020

Clone master or wait a few days :)

@snaildos
Copy link

Clone master or wait a few days :)

Any idea how many days ;p ?
And... If I where to clone from master, will there be nonfunctional features? Or only features that are all made?

@fluffynuts
Copy link

This is a great idea. We have a plugin based architecture so this should be possible.

Is there an SDK that 3rd-party devs can work against to provide plugins? Or at least documentation on existing arch? A quick scan of the repo didn't highlight anything for me? This would also relate to my feature request: #3622

@fluffynuts
Copy link

instead look like this rundll32.exe powrprof.dll,SetSuspendState 0,1,0

@thexamlguy I want this feature as much as you do; just if it helps: you can achieve reboot, hibernate, log off and power-off with shutdown.exe:

  • reboot: shutdown -t 0 -r
  • hibernate: shutdown -t 0 -h
  • power-off: shutdown -t 0 -s
  • log off: shutdown -t 0 -l

the -t 0 means "just do it, don't show a warning and wait 30 seconds"

It's not ideal, but I hope it helps someone else. This is in my MRU for win+r :D

@GreenMan36
Copy link

I've done this as a workaround for now:

Using similar and identical commands as posted above. Added a /f to most.
I can just type them and for those who don't show up at the top I can start with /<command> instead.
Works perfectly!
Make sure to put these in folders that are getting indexed.
You can pretty much do anything this way.

@fluffynuts
Copy link

(thumbs-down isn't for the efforts of @GreenMan36 but because this hack has to be in place to provide simple functionality)

@GreenMan36 glad you found a workaround; until the perf and basic functionality issues are resolved, I'm back on KeyPirinha. It's not opensource, but, like Linus, I prefer stuff that works over ideals :/

@crutkas
Copy link
Member

crutkas commented Jun 6, 2020

, I'm back on KeyPirinha. It's not opensource, but, like Linus, I prefer stuff that works over ideals :/

Use what works for you. We are still in preview and adjusting a lot. .19 should have some pretty big perf tweaks and tons of stability issues resolved.

@crutkas
Copy link
Member

crutkas commented Aug 7, 2020

TLDR: can someone help port https://github.com/Wox-launcher/Wox/tree/master/Plugins/Wox.Plugin.Sys and we should get this ability

@benjamhooper
Copy link

benjamhooper commented Nov 16, 2020

@crutkas I'd like to tackle this port from Wox if that's okay? Honestly, my most used plugin. ETA for PR, end the week?

@enricogior enricogior added the Resolution-Fix Committed Fix is checked in, but it might be 3-4 weeks until a release. label Nov 26, 2020
@ghost
Copy link

ghost commented Nov 28, 2020

@enricogior This should be in Done not in To do

@crutkas
Copy link
Member

crutkas commented Dec 29, 2020

During the PR, we missed this wasn't in the installer WSX file. We caught this super late so we're moving this to 0.31

@enricogior enricogior changed the title [Launcher] Ability to execute system/OS commands like shutdown [Run] Ability to execute system/OS commands like shutdown Jan 9, 2021
@github-project-automation github-project-automation bot moved this to ⚠️Needs Walkthrough in 3. Help Wanted Mar 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Help Wanted We encourage anyone to jump in on these and submit a PR. Idea-Enhancement New feature or request on an existing product Product-PowerToys Run Improved app launch PT Run (Win+R) Window Resolution-Fix Committed Fix is checked in, but it might be 3-4 weeks until a release.
Projects
Status: ⚠️Needs Walkthrough
Development

No branches or pull requests

9 participants