cmder icon indicating copy to clipboard operation
cmder copied to clipboard

Is that any way I can run some commands when I launch Cmder?

Open thehackercat opened this issue 9 years ago • 6 comments

I need to run some commands as administator(root) to set up network config.

Like

set http_proxy=http://10.196.0.84:3128
set https_proxy=http://10.196.0.84:3128  

But I can't find any place that I can add those commands in Cmder setting.

Is that any way I can run some commands when I launch Cmder?

thehackercat avatar Jul 06 '17 08:07 thehackercat

You can do that in Settings --> Environment menu. image

goutkannan avatar Jul 10 '17 15:07 goutkannan

@goutkannan thanks, it works!

thehackercat avatar Jul 11 '17 05:07 thehackercat

@Stanzilla Add to the docs and close?

DRSDavidSoft avatar Mar 03 '18 02:03 DRSDavidSoft

Put scripts in %cmder_root%\config\profile.d is the preferred multi shell compatible way.

Or in %cmder_root%\config\user-profile.cmd, %cmder_root%\config\user-profile.sh, or %cmder_root%\config\user-profile.ps1,

daxgames avatar Mar 03 '18 02:03 daxgames

@daxgames Actually, I put these scripts in %cmder_root%\config\profile.d, but somehow it didn't work.

thehackercat avatar Mar 06 '18 07:03 thehackercat

@thehackercat what scripts, filenames? If you are referring to %cmder_root%\config\user-profile.cmd, %cmder_root%\config\user-profile.sh, or %cmder_root%\config\user-profile.ps1. They should be in the exact paths shown.

It depends entirely on the version of cmder you are running as to whether it has profile.d support.

daxgames avatar Mar 07 '18 02:03 daxgames