Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Find cmder files when running as Administrator. #166

Merged
merged 2 commits into from
Aug 27, 2014

Conversation

glucas
Copy link
Contributor

@glucas glucas commented Mar 13, 2014

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.

glucas added 2 commits March 13, 2014 11:48
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 cmderdev#94.
Extra quotes in previous commit caused PATH to be set incorrectly in admin
shell.
@@ -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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changing this line to:

for /f "delims=?" %%i in ("%ConEmuDir%\..\..") do @set CMDER_ROOT=%%~fi

makes this work when cmder is installed to a path with spaces.

@Stanzilla
Copy link
Member

+1

MartiUK added a commit that referenced this pull request Aug 27, 2014
Find cmder files when running as Administrator.
@MartiUK MartiUK merged commit a39c632 into cmderdev:master Aug 27, 2014
@glucas glucas deleted the run_as_admin branch August 29, 2014 15:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants