Skip to main content

Command Palette

Search for a command to run...

Creating a Windows Shortcut and Pinning Script to the Taskbar

Published
2 min read

If you'd like to quickly launch a script with one click, here’s how to create a shortcut and pin it to your taskbar for easy access.

Step-by-Step: Create a Shortcut for Script.bat

1. Create the Shortcut

  • Right-click on your Desktop or inside a folder.

  • Choose: New > Shortcut.

2. Set the Shortcut Target

In the “Type the location of the item” box, enter:

cmd.exe /k "C:\Users\roy.hayden\Desktop\Scripts\Scripts\Script.bat"

Replace the path with the full path to your actual .bat file.

  • /k keeps the Command Prompt open after running, useful for viewing script output.

  • Use /c if you want the window to close immediately after running the script.

Click Next, then give the shortcut a name like Script


Optional: Customize the Shortcut

Change the Icon:

  • Right-click the new shortcut > Properties.

  • Under the Shortcut tab, click Change Icon….

  • If prompted, click OK to continue.

  • Browse to:

      %SystemRoot%\System32\shell32.dll
    
  • Pick an icon you like, click OK > Apply.

Run as Administrator (if needed):

If your script needs elevated privileges:

  • Go to the Shortcut tab > click Advanced….

  • Check Run as administrator > OK > Apply.

Pin the Shortcut to the Taskbar

Method 1: Drag and Drop

  • Drag your shortcut directly onto the taskbar, it’ll pin instantly.

Method 2: Context Menu

  • Right-click the shortcut.

  • On Windows 11, click Show more options.

  • Choose Pin to taskbar.


You now have one-click access to your activity simulator which is useful for remote sessions, long-running processes, or simply keeping your workspace "awake."