How to change the system locale on Windows 7 - windows-7

On windows 7, I would like to change the system locale from the command line without restarting. Is there any windows command line utility or the one in cygwin that I can use?
Thanks

The following link has information of how to change system locale kind of information from the command-line using the intlcfg.exe command.
An example command for you could be as follows, which would change syslocale to US-english en-US.
intlcfg.exe –syslocale:en-US
NOTE: You may still need to reboot for the settings to take effect, have not tried this so unsure about this part.

Doing a quick Google search turned up a lot of results with different ways to do it.
This TechNet article details how to use the Intlcfg command to change settings such as the Locale
Update language and locale settings
intlcfg.exe [-all:language_name] [-uilang:language_name] [uilangfallback:language_name] [-syslocale:language_name][-userlocale:language_name] [-inputlocale:default_keyboard_description; keyboard_description or locale_name] [-userhive:registry_path] [-syshive:registry_path] [-swhive:registry_path] [-image:path] [-dist:path] [-silent] [-skudefaults:language]
This article on AutoIt.com talks about setting up XML files and creating a script to switch between them.
It's hard to quote, but the gist is:
Create a text file with the settings
Use rundll32 to apply the changes to the registry

Related

Editing Default Commands on Windows Command Prompt

I am creating a Windows virtual machine and would like to edit the default commands for the command prompt like tree so that when that command is typed it will do what I want it to do. I found 'tree.com' in System32, but when I open it, it is gibberish. How might I be able to read and edit it?
Modifying basic Windows programs is not a good idea (in case you need them there not there anymore), but there's another approaches: doskey, based on UNIX aliases: this allows you to, when you enter tree, to start up another program instead. Help can be found under doskey /? and there are plenty of examples online.
Files with extension .com are compiled executables. There is nothing to edit in there.

Powershell use a custom profile file

I know when I start powershell, I can edit the file pointed to by $profile and can put commands in there such as setting aliases on startup.
I am wondering if there is a standard way to start a shell and supply a option to load a different profile file. I tried doing powershell /? but only saw a way to turn off the profile entirely.
I am basically looking for something like powershell -profile-file myprofile.ps1 or a way to get a similar behavior.
Thanks.
Check out ConEmu , it emulates CMD, Bash, and Powershell and you can customize what it does when you start up a new console dialog. Might be one of my favorite dev tools ever.

Keep printer settings when printing from command line

I am trying to print graphics from the command line. I am using the command rundll32 C:\Windows\System32\shimgvw.dll,ImageView_PrintTo , which works fine - BUT:
I have special settings for the desired printer. Those settings are set in the current settings and are used by default from all other programs. Only the above mentioned dll ignores my settings and kind of resets the printer (uses the factory settings).
Is there any way to prevent this?
Of course I could use another programm to print - but my solution has to run on as much (windows) pc's as possible, therefore I have to rely on build-in functions of windows.
Thanks for advice!

Make system calls (Windows Command Prompt) answer in english

I'm working on a Perl script that needs to do a few system calls to obtain some system data. In order to parse the output of those calls reliably on any computer, I need to be sure the output of the call is set to English.
The problem I'm facing is that, for example in my PC, I get localized output from those commands. My Windows is setup in Spanish so, calls like systeminfo return data in Spanish.
Is there a command (or something else) I can run in a command call to make all system calls act like if the system was in English always, without having to modify anything in the system configuration?
Thanks in advance for your comments.
NOTES for bounty: The answer to this problem must not interfere with the system in any way. It should be a way to obtain english answers from system calls/commands that works in any machine without modifying its configuration, registry or else.
This solution allows you to make Command Prompt act in english. It does alter some registry keys but it also changes them back if you want. You can run the same commands that they put in the .bats to make the system go to english and them go back to localized.
If you're trying to run commands that require adminsitrator privileges, then you can include these calls in your program without problems.
HTH
I think the WMIC command is your best best. It has been a standard feature of Windows since Windows XP.
WMIC has full access to the Windows system (subject to user permissions, etc.), and has a locale option that selects the locale in effect (for the command) from the installed language packs.
The locale is selected from the list here.
To get the current username using US English (if it's available) you'd use wmic /locale:ms_409 netlogin get name
Through the WMI interface, you may not even need to localise the results (i.e.: with sufficient care, you may just get the raw data).

.bat Set FontSize - Windows Command Line

Intro:
I swear have searched around for sometime before posting, but have been unable to find an answer for this..
Question:
Regarding Windows Command Line:
is there some way to set the font/text-size via an actual windows command line in a .bat file?
-Not through going to Properties -> etc. (I understand that quite sufficiently :P)
--Plz no PowerShell.
Additional Notes:
Reason: Thinking of business system based Command Line front-end, PHP back-end.
Thanks in advance.
Without using PowerShell, the only way I can think of would be to modify the registry values under HKCU\Console. See the relevant Technet documentation. However, changes made to the registry values will not update already running console windows. You won't see your changes until you spawn a new console.
As far as how to make changes to the registry, reg /help for more info.

Resources