up vote 3 down vote favorite
1
share [g+] share [fb]

I'd like to change the encoding of the command prompt when being opened rather than typing the command at the start of my session each time.

Below is the command I enter each time the command prompt starts now:

chcp 1252

How can I have this command run automatically when opening with the shortcut?

link|improve this question

55% accept rate
feedback

2 Answers

up vote 10 down vote accepted

In the target box of your shortcut, use

cmd /K "chcp 1252"

This should run your program and leave the cmd window up when complete

link|improve this answer
feedback

Per the docs on cmd.exe,

The registry keys:

HKEY_LOCAL_MACHINE\Software\Microsoft\Command Processor\AutoRun\REG_SZ 
HKEY_CURRENT_USER\Software\Microsoft\Command Processor\AutoRun REG_EXPAND_SZ

should do what you want.

link|improve this answer
Nice, this works for every cmd.exe, not just a particular shortcut. – Blorgbeard Jul 4 '10 at 15:19
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.