Menu

Friday, February 5, 2021

Windows 10 shortcuts to batch files and Store Apps

Windows 10.


Windows 10 is pretty inconsistent when it comes to creating and pinning shortcuts. Here's some information if you need to pin a batch file shortcut to the taskbar, if you want to create a desktop shortcut to a Microsoft Store App, or if you want to automate stuff...


I. Prepare

You need a folder with some batch files and shortcuts for this to work. The folder below is just an example. Me myself I prefer to add that batch folder also to my path, so I can easily call files from that path.

1. Create a folder ' c:\software\batch '

2. Control Panel / System / Advanced System Settings / Environment Variables

3. Edit either the user or system path, and add ' c:\software\batch' to it


II. MS Store Apps

You can't create shortcuts to MS Store Apps on your desktop. No idea why. The workaround:

1. Create a new shortcut to ' explorer shell:AppsFolder '

2. Dubbelclick that shortcut

3. One open look for the App of your choice, and use the RMB to create a new shortcut


III. Launch a 'Modern' Store App from a batch file

You can't (easily) find the executable for a Store App, so you can't call that App directly. You can use the shortcut though.

1. Create a shortcut to the MS Store App (as per II above)

2. Copy the shortcut into the ' c:\software\batch ' folder

3. You can now start the app from an batch file using ' start appname ' (no need for the extension)


IV. Launch a Windows executable from a batch file

Most Windows executables can simply be started by specifying their path+name, but not all. But the same trick for starting a Store App also works for starting troublesome Windows executables.

1. Copy the shortcut into the ' c:\software\batch ' folder

2. You can now start the app from an batch file using ' start programname ' (no need for the extension)


V. Creating a batch file that launches multiple programs

This is an example using some writing tools.

1. Copy all the shortcuts into the batch folder

2. Create a batch file ' mustwrite.bat '

3. In that batch file, start each App / program, for example:

start balabolka

start grammarly

start ambie

start chrome "https://docs.google.com/document/d/....."

start chrome "https://discord.com/channels/..."

start chrome "https://www.blogger.com/blog/comments/..."


VI. Create shortcut to the batch file that can be pinned to the taskbar

Using the batch file ' mustwrite.bat ' we just created

1. RMB on the desktop / New / Shortcut

2. Enter ' cmd.exe /c c:\software\batch\mustwrite.bat ' as the target

3. Use ' Must Write ' as the new shortcut name


This new shortcut can be pinned to the taskbar


VII. Fancy stuff

If you feel up to it there are some clover things you can do, for example start Chrome with different user profiles to separate your online identities, have windows open on a specific screen or position, etcetera.

Be aware though that things don't always work the way you'd like or expect to, and sometimes they don't work at all... Windows 10 does things differently again.

I'm still looking for something that does a snapshot of my window-locations, and opens anything still missing, but I haven't found anything yet that was reliable enough. I'll keep looking...




No comments:

Post a Comment