Saturday, 23 November 2019

windows - How do I run a command when opening cmd.exe with shortcut?


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?



Answer



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


No comments:

Post a Comment

How can I VLOOKUP in multiple Excel documents?

I am trying to VLOOKUP reference data with around 400 seperate Excel files. Is it possible to do this in a quick way rather than doing it m...