The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 4,184 other subscribers

Opening shell folders from the command-prompt

Posted by jpluimers on 2021/09/09

I knew I could run shell:startup and similar shortcuts from the Explorer address bar or the Windows-R “run” prompt.

First I learned that via [WayBack] tablet – How to set Google Chrome to automatically open up and in full screen – Super User.

Then via [WayBack] “shell:startup” – Google Search, I found [WayBack] Location of the Startup folder in Windows 10.

It took a while before I realised you can also run them from the command-prompt, batch-files or PowerShell scripts prepending them with start:

start shell:startup

That one will open a new explorer window in the user startup folder from either the command-prompt, a batch file or PowerShell script..

The shell: shortcuts can contain spaces. So for instance there is shell:common startup that opens the common startup folder.

Starting it from the command prompt, batch file or PowerShell script is different: because of the spaces you will get the error on the right unless you add double quotes:

start "shell:common statartup"

All shell: commands that you can run in the same way: double quotes work for both the ones requiring spaces and the simple ones nor requiring spaces.

Virtually each new Windows version (even most Windows 10 major builds) gets new shell: commands.

A good source with an up-to-date and historically accurate of shell: commands list is at [WayBack] Shell Commands to Access the Special Folders in Windows 10/8/7/Vista/XP » Winhelponline,

You can get the current list by recursively enumerating the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions registry key, which consists of a list of Explorer folder GUIDs having Name, ParentFolder and RelativePath value names.

–jeroen

The error on the right copied as text gives you this:

[Window Title]
shell:common

[Content]
Windows cannot find 'shell:common'. Make sure you typed the name correctly, and then try again.

[OK]

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

 
%d bloggers like this: