One of the benefit to use bashrc-like for the Windows Command Processor or
cmd.exe is to set an environment easily. The common way to set a new or editing environment variable and it require administrator rights which would be not very convenient if you are turning on the admin priviledges prompt.
Setting environment variable
regedit.exe(Search it or run it through Windows Command Processor)
- Navigate to
- Right click on the Command Processor folder and press New -> String Value
- Set the key as
- Make a file in
C:\bashrc.cmdor wherever you want your "rc" file to reside
Resulting registry folder. It now have
- Now you can add the Windows Command Processor command processor in the autorun file you have setup
Note that the Windows Command Processor will run and show every command in the "rc" file everytime you open Windows Command Processor.
Hide the Command When Starting Windows Command Processor
Well, you can turn off the echo before running any command and turn it on afterwards, so no command or result will be shown in the Windows Command Processor.
@echo off # Your command @echo on
There are actually a lot of alternative to make this bashrc—like in Windows Command Processor, but I think this method is the one that are close to bashrc.
And maybe you want to try PowerShell which have "Profile" feature.