Enhance cmder start directory.

The start directory of cmder is defined in that order:
1. The directory passed as parameter to the cmder executable
2. The `CMDER_START` environment variable
3. The `HOME` environment variable
4. The current user directory (`USERPROFILE` environment variable)

This commit also fix two issues:
* stating cmder with a path in parameter would set CMDER_START (whereas it may just be temporary)
* fix new line in cmd when starting cmder (this one was buggin me)
This commit is contained in:
Nicolas Arnaud-Cormos
2015-01-10 07:50:44 +01:00
parent 17b4525e60
commit e9300ca43f
6 changed files with 41 additions and 28 deletions

View File

@ -487,28 +487,20 @@
<value name="Count" type="dword" data="00000002"/>
<key name="Task1" modified="2014-01-21 18:36:36" build="131215">
<value name="Name" type="string" data="{cmd}"/>
<value name="GuiArgs" type="string" data="/icon &quot;%CMDER_ROOT%\cmder.exe&quot;"/>
<value name="Cmd1" type="string" data="cmd /k &quot;%ConEmuDir%\..\init.bat&quot; -new_console:d:%USERPROFILE%"/>
<value name="GuiArgs" type="string" data="/dir %CMDER_SESSION_START% /icon &quot;%CMDER_ROOT%\cmder.exe&quot;"/>
<value name="Cmd1" type="string" data="cmd /k &quot;%ConEmuDir%\..\init.bat&quot;"/>
<value name="Active" type="dword" data="00000000"/>
<value name="Count" type="dword" data="00000001"/>
<value name="Hotkey" type="dword" data="00000000"/>
</key>
<key name="Task2" modified="2014-01-21 18:36:36" build="131215">
<value name="Name" type="string" data="{PowerShell}"/>
<value name="GuiArgs" type="string" data="/icon &quot;%CMDER_ROOT%\cmder.exe&quot;"/>
<value name="Cmd1" type="string" data="PowerShell -NoLogo -NoProfile -NoExit -Command &quot;Invoke-Expression '. ''%ConEmuDir%\..\profile.ps1'''&quot; -new_console:d:&quot;%USERPROFILE%&quot;"/>
<value name="GuiArgs" type="string" data="/dir %CMDER_SESSION_START% /icon &quot;%CMDER_ROOT%\cmder.exe&quot;"/>
<value name="Cmd1" type="string" data="PowerShell -NoLogo -NoProfile -NoExit -Command &quot;Invoke-Expression '. ''%ConEmuDir%\..\profile.ps1'''&quot;"/>
<value name="Active" type="dword" data="00000000"/>
<value name="Count" type="dword" data="00000001"/>
<value name="Hotkey" type="dword" data="00000000"/>
</key>
<key name="Task3" modified="2014-09-17 09:17:41" build="140903">
<value name="Name" type="string" data="{PowerShell as Admin}"/>
<value name="Hotkey" type="dword" data="00000000"/>
<value name="GuiArgs" type="string" data="/icon &quot;%CMDER_ROOT%\cmder.exe&quot;"/>
<value name="Cmd1" type="string" data="* PowerShell -NoLogo -NoProfile -NoExit -Command &quot;Invoke-Expression '. ''%ConEmuDir%\..\custom.ps1''' &quot; -new_console:d:&quot;%USERPROFILE%&quot;"/>
<value name="Active" type="dword" data="00000000"/>
<value name="Count" type="dword" data="00000001"/>
</key>
</key>
<key name="Apps" modified="2014-01-21 18:36:36" build="131215">
<value name="Count" type="dword" data="00000000"/>