THE SQL Server Blog Spot on the Web

Welcome to SQLblog.com - The SQL Server blog spot on the web Sign in | |
in Search

John Paul Cook

Windows shell: commands

Windows shell: commands are like environment variables on steroids. If you haven’t been using them, you need to start because they will make your life easier. First, a quick review of what you can do with a few helpful environment variables.

You can enter an environment variable such as %temp%, %appdata%, %systemroot%, or %programfiles% into the address bar in Windows Explorer and directly navigate to the corresponding location on your machine. It’s much faster than trying to click your way to your desired destination.

image

Figure 1. Using the %temp% environment variable in Windows Explorer.

Windows shell: commands provide similar direct navigation. There is some overlap between environment variables and shell: commands, but most shell: commands offer functionality not provided by Windows environment variables. Notice that you must put a colon between the word shell and the shell command.


image

Figure 2. Using the shell:SendTo command in Windows Explorer.

Where are all of these shell: commands listed? On your machine, assuming you have access to the registry. In corporate environments, you just might be out of luck. Even if you have administrative rights and can view your registry, you are still out of luck because of how the commands are stored in the registry at HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions.

image

Figure 3. Shell: commands are under FolderDescriptions in the registry.

I exported the FolderDescriptions registry key, opened the file with a text editor, sorted it, and extracted the names of all of the shell: commands which I’ve listed below for you. Remember, the syntax you put in the address bar of Windows Explorer is of this format:

shell:nameOfShellCommand

You can also enter the shell: command into your search box as shown in Figure 4. It will start a new instance of Windows Explorer opened to the folder specified in the command.

image

Figure 4. Using a shell: command with the search box.

You may also enter a shell: command in a run dialog box.

image

Figure 5. Using a shell: command in a run dialog box.

List of shell: commands on my Windows 7 machine:

AddNewProgramsFolder
Administrative Tools
AppData
AppUpdatesFolder
Cache
CD Burning
ChangeRemoveProgramsFolder
Common Administrative Tools
Common AppData
Common Desktop
Common Documents
Common Programs
Common Start Menu
Common Startup
Common Templates
CommonDownloads
CommonMusic
CommonPictures
CommonRingtones
CommonVideo
ConflictFolder
ConnectionsFolder
Contacts
ControlPanelFolder
Cookies
CredentialManager
CryptoKeys
CSCFolder
Default Gadgets
Desktop
Device Metadata Store
DocumentsLibrary
Downloads
DpapiKeys
Favorites
Fonts
Gadgets
Games
GameTasks
History
HomeGroupFolder
ImplicitAppShortcuts
InternetFolder
Libraries
Links
Local AppData
LocalAppDataLow
LocalizedResourcesDir
MAPIFolder
MusicLibrary
My Music
My Pictures
My Video
MyComputerFolder
NetHood
NetworkPlacesFolder
OEM Links
Original Images
Personal
PhotoAlbums
PicturesLibrary
Playlists
PrintersFolder
PrintHood
Profile
ProgramFiles
ProgramFilesCommon
ProgramFilesCommonX64
ProgramFilesCommonX86
ProgramFilesX64
ProgramFilesX86
Programs
Public
PublicGameTasks
PublicLibraries
Quick Launch
Recent
RecordedTVLibrary
RecycleBinFolder
ResourceDir
Ringtones
SampleMusic
SamplePictures
SamplePlaylists
SampleVideos
SavedGames
Searches
SearchHomeFolder
SendTo
Start Menu
Startup
SyncCenterFolder
SyncResultsFolder
SyncSetupFolder
System
SystemCertificates
SystemX86
Templates
User Pinned
UserProfiles
UserProgramFiles
UserProgramFilesCommon
UsersFilesFolder
UsersLibrariesFolder
VideosLibrary
Virtual Machines
Windows

Published Wednesday, February 13, 2013 11:11 PM by John Paul Cook

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

 

Chintak said:

Thanks for nice tip. Also, I see shell commands really useful in windows 8 where there is no start menu or not at least by default.

February 16, 2013 11:41 AM

Leave a Comment

(required) 
(required) 
Submit

About John Paul Cook

John Paul Cook is both a Registered Nurse and a Microsoft SQL Server MVP experienced in Microsoft SQL Server and Oracle database application design, development, and implementation. He has spoken at many conferences including Microsoft TechEd and the SQL PASS Summit. He has worked in oil and gas, financial, manufacturing, and healthcare industries. Experienced in systems integration and workflow analysis, John is passionate about combining his IT experience with his nursing background to solve difficult problems in healthcare. He sees opportunities in using business intelligence and Big Data to satisfy healthcare meaningful use requirements and improve patient outcomes. John graduated from Vanderbilt University with a Master of Science in Nursing Informatics and is an active member of the Sigma Theta Tau nursing honor society. Contributing author to SQL Server MVP Deep Dives and SQL Server MVP Deep Dives Volume 2.

This Blog

Syndication

Powered by Community Server (Commercial Edition), by Telligent Systems
  Privacy Statement