PowerToys Command Pallete v100.2 Run commands wont keep shell open

Deric Hensel 40 Reputation points
2026-06-30T17:33:59.59+00:00

Whenever i use the > shortcut to run commands like i used to with "PowerToys Run", no matter what i set the settings to, when i run a command like "net user" or "ipconfig", it will open the shell for a moment then instantly close it, despite having the setting to keep shell open, on.

This is very frustrating

Windows for business | Windows 365 Enterprise
0 comments No comments

Answer accepted by question author

VPHAN 38,270 Reputation points Independent Advisor
2026-06-30T18:28:08.1+00:00

Deric Hensel

Natively, PowerToys Run does not currently have a built-in macro that allows you to automatically prepend arguments to the Shell plugin. However, you can easily bypass this by creating a one-letter "wrapper" script and placing it in a folder that Windows automatically recognizes (your System PATH).

1. Create the Script

Open Notepad.

  • Paste the following exact text into the empty document: cmd /k %*

2. Save it to a System Path

In Notepad, go to File > Save As.

Change the "Save as type" dropdown from Text Documents to All Files.

Name the file k.cmd (or c.cmd, whichever letter you prefer).

Save this file directly to C:\Windows. (You will likely need to click "Yes" on an Administrator prompt to save it here. Saving it in the Windows folder ensures PowerToys can instantly find it without you needing to manually edit your Environment Variables).

3. Use Your New Shortcut

Now, whenever you press Win + Alt + Space to bring up PowerToys Run, you can simply type your Shell trigger (>), followed by k and your command:

> k ipconfig > k net user

PowerToys will instantly launch your k.cmd script, which automatically injects cmd /k in front of your tools, keeping the window securely open with minimal keystrokes.

VPHAN

Was this answer helpful?

1 person found this answer helpful.
0 comments No comments

Answer accepted by question author

VPHAN 38,270 Reputation points Independent Advisor
2026-06-30T18:10:06.1466667+00:00

Hi Deric Hensel,

This originates from a configuration bug within the Microsoft PowerToys application suite, specifically affecting the PowerToys Run utility. When you toggle the graphical interface option to keep the shell open, the application fails to properly commit or read this variable within its background configuration file located at %LOCALAPPDATA%\Microsoft\PowerToys\PowerToys Run\Settings\settings.json. Because the executable effectively ignores your preference in this local application data path, standard console-based networking and user management commands execute normally and terminate the window immediately upon completion. Since modifying this JSON file directly does not force the interface to respect the setting, you will need to await an official repository patch from Microsoft for a permanent graphical fix.

You can bypass this interface failure by leveraging the native Windows command interpreter to force the session to remain active. Instead of typing your command directly into the Run prompt, invoke the command prompt executable followed by the keep-alive flag by typing cmd /k followed by your exact command, such as cmd /k ipconfig or cmd /k net user. The /k parameter natively instructs the Windows shell environment to carry out your string of instructions and then halt the termination process, holding the window open so you can review the generated output.

Hope this answer has brought you some useful information. If it did, please hit “accept answer”. Should you have any questions, feel free to leave a comment.

VPHAN

Was this answer helpful?

1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.