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

Already on GitHub? Sign in to your account

Customize the Windows Command Prompt (cmd.exe) #1

Closed
AnthonyMastrean opened this Issue Feb 28, 2014 · 2 comments

Comments

Projects
None yet
1 participant
Owner

AnthonyMastrean commented Feb 28, 2014

It doesn't run from a dotfile or profile script, but you can setup an AutoRun registry key. Probably want to test if the key/value exists first and create/append, if necessary.

Set-ItemProperty "HKCU:\Software\Microsoft\Command Processor" -name "AutoRun" -value "SET profile=$(Join-Path $ENV:USERPROFILE "profile.bat") & IF EXIST `"%profile%`" `"%profile%`""

And the prompt is controlled from a USER environment variable.

SET PROMPT=$_$E[0;32m%USERNAME%@%COMPUTERNAME%$E[m$S$E[0;33m$P$E[m$_cmd$G$S
Owner

AnthonyMastrean commented Feb 28, 2014

I had an ansicon pre-processor in both my HKCU and HKLU autorun key (I installed it manually and from Chocolatey.org).

Owner

AnthonyMastrean commented Jun 20, 2014

Too complicated, just run the given bat file once

> .cmdshell.bat
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment