I revel in talking instructions to Cortana on my Home windows PC, on the other hand, there are positive duties Cortana can not do. And so, I went directly to give you the option to do more with Cortana with out looking forward to Microsoft so as to add extra instructions.

My function was once to increase the capability of Cortana and fortuitously, it permits to name or run any script or program put in at the laptop, in order that approach I will create a batch or shell script or create my very own program to do virtually the rest. Alright, allow us to get on with the academic.

“Whats up Cortana, open…”

I generally say “Whats up Cortana, open Chrome” to open Google Chrome, and this is identical command that got here to my rescue on this scenario. I discovered it cannot simply open system tools (like Job Scheduler) or installed programs (like Google Chrome), however can run any shortcut provide within the Get started menu. That suggests, any such shortcut can level to any program or script — even customized ones.

Create a shortcut in Get started menu

As any shortcut within the Get started menu can also be done by way of Cortana, so right here’s how you’ll create it:

  1. Press Win + R keys to open the Run window.
  2. Sort shell:techniques within the window, then click on OK.
  3. Open Run windowOpen Run window
  4. Report Explorer will open appearing “Get started Menu > Methods” folder.
  5. Proper-click on an empty house > make a choice New and make a choice Shortcut.
  6. Choose New  data-eio= Shortcut” />
  7. A Create Shortcut window will display up the place you want to offer main points.
  8. In ‘Sort the positioning of the thing’ textbox, you want to input a command or the trail of a program or script you need to run. You’ll additionally click on the Browse button and make a choice this system or script record interactively.
  9. Choose New > Shortcut” /></figure>
<li>A <strong>Create Shortcut</strong> window will display up the place you want to offer main points.</li>
<li>In ‘Sort the positioning of the thing’ textbox, you want to <strong>input a command or the trail</strong> of a program or script you need to run. You’ll additionally click on the <strong>Browse</strong> button and make a choice this system or script record interactively.</li>
<figure><img decoding=
  10. When you find yourself performed getting into the trail, simply click on the Subsequent button.
  11. Now you want to give a reputation for your shortcut. I can recommend to stay it significant and speakable as a result of this would be the command you will have to say to Cortana to run your customized process. For instance, if I give ‘Sesame’ because the identify of my shortcut, then I wish to say “Whats up Cortana, open Sesame“.
Enter name for the shortcutEnter name for the shortcut

Position a shortcut in Get started menu

We will additionally position a shortcut in Get started menu, if we have already got one. Even though this system does no longer paintings for instructions however we will create shortcuts for techniques or scripts simple approach after which position that shortcut within the Get started menu.

Apply the under steps to quick-create in addition to position a shortcut:

  1. Proper-click any program or script you need to create shortcut for.
  2. You’re going to see the context menu > make a choice ‘Create shortcut‘ possibility.
  3. Create shortcut of program or scriptCreate shortcut of program or script
  4. Now you’ll see a brand new shortcut in conjunction with this system or script.
  5. Proper-click the shortcut, make a choice ‘Rename‘ from the choice checklist.
  6. Rename the shortcut fileRename the shortcut file
  7. Sort in a useful and speakable identify for the shortcut. This would be the identify you’ll use to inform Cortana to execute it. For instance, in case you identify it ‘Secret’, you then will have to say “Whats up Cortana, open Secret” to run it.
  8. Now press the Win + R keys and you’ll see the Run window.
  9. Input shell:techniques within the window and click on the OK button.
  10. Type in Run windowType in Run window
  11. You’re going to see the Report Explorer with “Get started Menu > Methods” folder.
  12. Now lower the shortcut created in step #2 and paste it on this folder.
Paste shortcut in ProgramsPaste shortcut in Programs

Run customized duties

Run a command or program

If you want to run a command or a command-line program (say CCleaner) by way of simply talking to Cortana, then you’ll use this system. Apply the aforementioned steps beneath ‘Create a shortcut in Get started menu’ and whilst doing its step #6, input the total command within the ‘Sort the positioning of the thing’ box.

For instance, if you want to create a shortcut to hibernate your laptop, then you want to offer the next command shutdown /h in step #6. Additionally, in case you identify the shortcut as “hibernate me”, then on every occasion you want to hibernate, you’ll simply discuss “Whats up Cortana, open hibernate me” to Cortana.

Create shortcut to hibernateCreate shortcut to hibernate

Additionally, let’s say you want to wash your laptop the usage of CCleaner, then you’ll use its command-line choices to ease the cleansing procedure. You most effective wish to exchange the command within the above instance to "C:Program FilesCCleanerCCleaner.exe" /AUTO (it really works provided that CCleaner is put in in that location) and identify it “autoclean me”, then simply say “Whats up Cortana, open autoclean me” to wash your machine the usage of this repairs instrument.

Run a batch script

A batch script is a record with more than one instructions that get done by way of Home windows Command Urged. If you want to run more than one instructions, you then will have to create a batch script record (with .bat extension). For that, practice the stairs in ‘Position a shortcut in Get started menu’ educational from above to position that record’s shortcut in Get started menu.

Run a Bash shell script

A shell script is a record with more than one instructions, like a batch script. Even though a shell script (with .sh extension) is understood to run on Linux/Unix distributions however with the arriving of Bash on Ubuntu in Windows 10, thankfully, it’s now conceivable to run shell instructions or scripts without delay on Home windows as smartly. In reality, it’s considered one of my favourite features of Windows 10.

Not like batch scripts, shell scripts don’t execute without delay by way of simply opening, so we can not use the similar approach as with batch script. After you create a shell script, practice the stairs beneath ‘Create a shortcut in Get started menu’ and beneath its step #6, input this command bash '/mnt/SCRIPT-PATH'.

Create shortcut to run shell scriptCreate shortcut to run shell script

Rather than SCRIPT-PATH, you will have to input the script’s trail in Linux/Unix taste. For instance, a record named ‘my_script.sh’ on my desktop has the next trail on this taste: /mnt/c/Customers/aksinghnet/Desktop/my_script.sh.

Run a PowerShell command

PowerShell is the brand new, extra robust shell than Command Urged in Home windows. It brings in so much extra instructions and scripting functionalities than the older steered, and thus, it let you do much more issues on your machine.

To be able to create a shortcut for a PowerShell command, you will have to use the stairs given above beneath ‘Run a command or program’. Once more, within the step #6, you will have to input the PowerShell command that you need to execute.

Create shortcut to run PowerShell commandCreate shortcut to run PowerShell command

Additionally, you will have to write your command in following structure: PowerShell -Command "& { COMMAND-HERE }". For instance, if you want to disconnect and alternatively attach the Wi-Fi to a community named “FastWifi”, you then will have to use the command PowerShell -Command "& { netsh wlan disconnect ; netsh wlan attach identify=FastWifi }" whilst making a shortcut.

Run a PowerShell script

PowerShell too can run scripts (with .ps1 extension) having a number of its instructions. It’s extra useful for automating a handful of duties (even advanced ones) and I to find it has extra robust scripting than batch scripts.

If you want to create a shortcut for operating a PowerShell script, then you must practice the similar process as given above beneath ‘Run a PowerShell command’ however you will have to stay the command in structure: PowerShell -Report FILE-PATH. For instance, if record is “C:pscript.ps1”, then use PowerShell -Report C:pscript.ps1.

Create shortcut to run a PowerShell scriptCreate shortcut to run a PowerShell script

Troubleshoot problems

Cortana can not to find or run my customized shortcut.

To start with, please test that your shortcut is to be had within the Get started menu. You’ll simply search for it beneath the ‘Just lately added’ checklist within the Get started menu.

Find your shortcut in Start menuFind your shortcut in Start menu

Secondly, please test you aren’t naming it upon a regular command or identify like laptop, sleep, shutdown, and so on. If you’re, simply press Win + R keys, sort in shell:techniques and press Input, then to find your shortcut within the Report Explorer and rename it to one thing else — significant however some customized identify.

The submit How to Run Custom Tasks in Windows 10 with Cortana seemed first on Hongkiat.

WordPress Website Development Source: https://www.hongkiat.com/blog/make-cortana-do-custom-chores-in-windows-10/

[ continue ]