Classic Shell
http://www.classicshell.net/forum/

Environment passed to launched apps (specifically cmd.exe)
http://www.classicshell.net/forum/viewtopic.php?f=7&t=6597
Page 1 of 1

Author:  Lint [ Tue Aug 23, 2016 3:40 pm ]
Post subject:  Environment passed to launched apps (specifically cmd.exe)

I'm seeing a somewhat unexpected behavior on Classic Menu vs launching via the windows search/cortana.

The stock behavior is to have you homed in user profile directory (i.e. %userprofile%), via classic menu its homed to %systemroot%\system32 (where the exe is).

Is this expected/normal? Is there a way to make it do the stock behavior?

Author:  Gaurav [ Tue Aug 23, 2016 10:24 pm ]
Post subject:  Re: Environment passed to launched apps (specifically cmd.ex

Which item are you opening - a shortcut or the cmd.exe directly?

Author:  Lint [ Wed Aug 24, 2016 5:02 pm ]
Post subject:  Re: Environment passed to launched apps (specifically cmd.ex

Gaurav wrote:
Which item are you opening - a shortcut or the cmd.exe directly?


Just typing cmd into the 'search programs and files' box.

Author:  Gaurav [ Sun Aug 28, 2016 3:44 am ]
Post subject:  Re: Environment passed to launched apps (specifically cmd.ex

The Microsoft Start menu/screen search in Windows 8/Windows 10 has the ability to search shortcuts even if the user types the target EXE name of the shortcut. So if you type: cmd, it will return Command Prompt. If you type: wmplayer, it will return Windows Media Player.

Every shortcut file has a "Start in" property. The command prompt shortcut has "%HOMEDRIVE%%HOMEPATH%" in the Start in. That is why it opens with the user's profile directory but when cmd.exe is run directly, it opens C:\Windows\system32.

Classic Start Menu as of Classic Shell 4.3.0 does not have the ability to show shortcuts when you type the target EXE name. It will show you shortcuts only if you type the full or partial name of the shortcut. So you have three options:

- Either type: command instead of cmd and make sure you open the shortcut called "Command Prompt". It will start in C:\Users\<your user name>

OR

- Create a shortcut called "Cmd" linking to C:\Windows\system32\cmd.exe in your Start Menu -> All Programs folder and specify its "Start in" path as %HOMEDRIVE%%HOMEPATH%

OR

- Open this folder in Explorer: C:\Users\<your user name>\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\System Tools\ and rename the "Command Prompt" shortcut to "Cmd".

After doing any of the above 3 things, your command prompt will open in C:\Users\<your user name> when you type: cmd

Page 1 of 1 All times are UTC - 8 hours [ DST ]
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/