mirror of
https://github.com/cmderdev/cmder.git
synced 2024-11-10 09:49:12 +08:00
Find cmder files when running as Administrator.
When starting a shell as Administrator, the CMDER_ROOT variable is not propagated from the parent (non-Admin) environment. Fix this by using paths relative to %ConEmuDir%. Fixes issue #94.
This commit is contained in:
parent
7688823886
commit
c76950293e
@ -488,7 +488,7 @@
|
||||
<key name="Task1" modified="2013-11-29 16:19:41" build="131107">
|
||||
<value name="Name" type="string" data="{cmd}"/>
|
||||
<value name="GuiArgs" type="string" data=" /icon "%CMDER_ROOT%\cmder.exe""/>
|
||||
<value name="Cmd1" type="string" data="cmd /k "%CMDER_ROOT%\vendor\init.bat" -new_console:d:%USERPROFILE%"/>
|
||||
<value name="Cmd1" type="string" data="cmd /k "%ConEmuDir%\..\init.bat" -new_console:d:%USERPROFILE%"/>
|
||||
<value name="Active" type="dword" data="00000000"/>
|
||||
<value name="Count" type="dword" data="00000001"/>
|
||||
<value name="Hotkey" type="dword" data="00000000"/>
|
||||
|
5
vendor/init.bat
vendored
5
vendor/init.bat
vendored
@ -2,6 +2,11 @@
|
||||
:: Sets some nice defaults
|
||||
:: Created as part of cmder project
|
||||
|
||||
:: Find root dir
|
||||
@if not defined CMDER_ROOT (
|
||||
for /f %%i in ("%ConEmuDir%\..\..") do @set CMDER_ROOT="%%~fi"
|
||||
)
|
||||
|
||||
:: Change the prompt style
|
||||
:: Mmm tasty lamb
|
||||
@prompt $E[1;32;40m$P$S{git}$S$_$E[1;30;40m{lamb}$S$E[0m
|
||||
|
Loading…
Reference in New Issue
Block a user