Cmder: Failed to backup ConEmu.xml file to ./config folder! Needs admin privileges?

Created on 24 Sep 2017  Â·  20Comments  Â·  Source: cmderdev/cmder

When running cmder from the cmd shell, I get the error Failed to backup ConEmu.xml file to ./config folder! However, cmder is able to run when running cmder from an admin cmd prompt. How can I fix this issue? thanks!

Microsoft Windows [Version 10.0.16288.1]

Most helpful comment

this happens when cmder is installed in C:\Program Files\Cmder to write to this path the system needs admin rights. i solved the problem by moving the config folder to a user writeable folder like C:\Users\username\cmder\config and symlinked it into the C:\Program Files\Cmder.

an alternative solution would be installing cmder in C:\Users\username\AppData\Local\cmder programs like slack or scoop are doing this.

All 20 comments

Chances are this is a big in cmder.exe relying on relative paths. I wrote the original code for this but currently have no way to fix it as I do not have a dev workstation setup with the right software. Can anyone else look at this?

I just did "_Shortcut to open Cmder in a chosen folder_" code
But when I tried it in my htdocs folder I got the same error in an dialog window (failed to backup conemu.xml file to ./config folder).

After that I could not run it from the file itself. But when I right clicked (cmder.exe) and opened the settings window, ticked run as administrator it works and it works in folders too.

This post was much to explain for people who don't know what to do.

I find it dangerous to have a cmder admin session all the time. Is there a way to get around this error and be able to have a user session instead?

this happens when cmder is installed in C:\Program Files\Cmder to write to this path the system needs admin rights. i solved the problem by moving the config folder to a user writeable folder like C:\Users\username\cmder\config and symlinked it into the C:\Program Files\Cmder.

an alternative solution would be installing cmder in C:\Users\username\AppData\Local\cmder programs like slack or scoop are doing this.

I am getting the same error whenever I run it as user. Everything is in C:\Users\username\AppData\Local\cmder . Running as admin works though.

Why not have some way to say save settings to AppData regardless of where the executable is?

@bajax because that defeats the point of cmder being portable where all settings are saved with the app.

Most apps I’ve seen that offer portability do it in some kind of a configurable manner— either via command line flags or a special launcher (either for the portable version or local). It’s shouldn’t be necessary to tie the app down to a single mode.

Not having an installer and not being able to install it easily for all the users of a system is kind of a hassle.

On 11 Dec, 2017, at 8:48 PM, Dax T Games notifications@github.com wrote:

@bajax https://github.com/bajax because that defeats the point of cmder being portable where all settings are saved with the app.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/cmderdev/cmder/issues/1498#issuecomment-350918422, or mute the thread https://github.com/notifications/unsubscribe-auth/AJ_zbPQYeU0ezHZNtzEAA-Dc0Ee6K_nXks5s_dtRgaJpZM4PiAdK.

@bajax Cmder is not one product. It is a collection of tools loosely glued together by some startup scripts. What you are asking for is not possible, at least at this time without some significant re-coding of everything.

An alternative approach, while not exactly what you are looking for is this:

  1. Install Git for Windows on the system for everyone to use. This is the largest component of Cmder 234MB of 254MB cmder full extracted package.
  2. Each user then download a personal copy of cmder_min.zip and put it in 'c:\users[username]\cmder', about 10MB per user.
  3. If users need Bash Cmder shells modify the Cmder tasks that launch Bash Cmder sessions to point at your globally installed 'Git for Windows'.

Hope this helps.

Since I just stumbled upon the same issue I am leaving a link here on how to make a symlink in Windows.

In my case all I did was:
mklink /J "C:\Users\<username>\Cmder\config" "C:\Program Files\Cmder\config"

Why not just extract files in C:// drive rather than in C://Program Files/ ??
It works with all users when done.

why issue closed?

the problem is still the same

@roschacker because it is a wont-fix see comment https://github.com/cmderdev/cmder/issues/1498#issuecomment-352117294

@daxgames why you wrote
'c:\users[username]\cmder'
here
https://github.com/cmderdev/cmder/issues/1498#issuecomment-352117294

Why not
'FOLDERID_UserProgramFiles | GUID {5CD7AEE2-2219-4A67-B85D-6C9CE15660CB}'
which redirects to
'%LOCALAPPDATA%\Programs'

?

A chocolatey install of commander did not give me any issue. I see that it annoys some people to install it somewhere other than Program Files folder of windows but I think with chocolatey things are tidy as it has its own folder structure to keep things in order.

@roschacker I am not sure I understand. Are you wanting to store cmder user config some place other than the %cmder_root%\config folder? Your why not question has been answered here

The recomendation would be to store the cmder folder in a location that is writeable by the user using it.

If that is not possible then cmder now has the ability to store user config anywhere based on a command line argument to cmder.exe, for example:

cmder /c "%LOCALAPPDATA%\Programs\cmder"

Will first load a shared Cmder config from %cmder_root%\config and it will also create and use the following for user config:

"%LOCALAPPDATA%\Programs\cmder\config\profile.d"
"%LOCALAPPDATA%\Programs\cmder\config"
"%LOCALAPPDATA%\Programs\cmder\config\user_aliases.cmd"
"%LOCALAPPDATA%\Programs\cmder\config\user_profile.cmd"
"%LOCALAPPDATA%\Programs\cmder\config\user_profile.sh"
"%LOCALAPPDATA%\Programs\cmder\config\user_profile.ps1"
"%LOCALAPPDATA%\Programs\cmder\bin"

"%LOCALAPPDATA%\Programs\cmder\bin" will also be added to the %path% variable

Hope this helps!

I got in a good old mess with this as I was trying to update 1.3.4 (which I had put in my C:\ProgramData folder) to 1.3.6. I attempted the procedure described in the above comment and in the README file to put the root Cmder folder in C:\Program Files and the config in C:\ProgramData, which seemed more logical to me. But that still throws the error message. I ended up putting the new version back in C:\ProgramData again, which is weird but works.

I simply gave write permissions to my user for folder _Program Files\Cmder\config_ and the problem was resolved for me without admin permissions.

Yup @atlib77 If you want to put it in c:\program files that's what you need to do.

@daxgames usgin /C switch to programdata worked like a charm, there should be an installer that creates the shortcuts with this, problem would be solved.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

danwellman picture danwellman  Â·  3Comments

justinmchase picture justinmchase  Â·  3Comments

giuliannosbrugnera picture giuliannosbrugnera  Â·  3Comments

GlassGruber picture GlassGruber  Â·  3Comments

vincentntang picture vincentntang  Â·  3Comments