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