Author Topic: How to run custom commands with Cortana  (Read 663 times)

Offline javajolt

  • Administrator
  • Hero Member
  • *****
  • Posts: 35122
  • Gender: Male
  • I Do Windows
    • windows10newsinfo.com
How to run custom commands with Cortana
« on: March 23, 2018, 01:22:02 PM »
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-line, 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

1. Use the Windows + R shortcut, or right click on the start menu and select “Run” to open the run command box

Enter the following:: 

Quote
C:\Users\USERNAMEGOESHERE\AppData\Roaming\Microsoft\Windows\Start Menu\Programs

2. Right-click on an empty area, select New and click on Shortcut.

3. 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



4. 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.

5. 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 customize your commands, have a look here for various other modifications to the shutdown command.

source