How to run custom commands with Cortana
2 min. read
Updated on
Read our disclosure page to find out how can you help MSPoweruser sustain the editorial team Read more
Microsoft’s Cortana is built with a large number of commands in the Windows 10 app. With the Windows 10 Spring Creators Update, you’ll be able to do even more with Cortana, and it’ll be a springboard for timeline and activities.
Sometimes, however, Cortana doesn’t do just what you want it to do. Perhaps Microsoft hasn’t thought about implementing that command, or they don’t want to for their own reasons.
There’s a feature in Cortana that you can use to create new commands, and this relies on taking advantage of its “open file” command. in essence, if you create a new command file with Windows, and you name it something command-like, you can ask Cortana to open the file, which triggers the command, in essence triggering a custom command via Cortana
TL: DR; You’ll be using Cortana’s abilities to open a script or a command that executes a process not native to Cortana.
How to create custom commands for Cortana
- Use the Windows + R shortcut, or right click on the start menu and select “Run” to open the run command box
Enter the following:: C:\Users\USERNAMEGOESHERE\AppData\Roaming\Microsoft\Windows\Start Menu\Programs - Right-click on an empty area, select New and click on Shortcut.
- When you see the “Type the location of the item” field, use this to enter the command you want Windows to execute. Perhaps you want to restart your computer, then entering the following command would help:shutdown.exe -r
- Name the command shortcut whatever you want, preferably something that you can pronounce so you can issue it as a command. “Hey Cortana, Open ‘Restart My PC’ for instance. Of course, check that Cortana does not have an active command for that phrase already prior to naming your shortcut.
- Once done, using Cortana to open the command file should initiate a restart, or whatever you put in place of that.
Tip: There are a few more ways you can customise your commands, have a look here for various other modifications to the shutdown command.
User forum
0 messages