In the Windows Run dialog, I can use the command shell:startup to open the user's startup folder.
In hope to be able to use the command in the Windows command line, I tried typing shell in the command prompt, but returned with the error message
'shell' is not recognized as an internal or external command,
operable program or batch file.
How can I execute such run line commands in the command prompt?
The run dialog accepts not only a command but also a URL/URI or any real paths, as you can see from its description:
That's why when you open
shell:startupwhich is a special path (specified inHKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\explorer\FolderDescriptions) it works normallyHowever in Windows cmd or PowerShell the command must be an executable file, a script file or any other files with a registered type. It won't accept a folder. To work around that use either of the following
If the path contains spaces then in cmd you must add another empty parameter due to the legacy issues in cmd.exe
If you use PowerShell then
start "shell:common startup"will work normally becausestartis an alias toStart-Processin PowerShell. If you runexplorerthen you don't need that empty string either