autochange proxy settings
Today I describe my way of daily using Miranda IM:
First of all – I start MirandaIM from USB Stick – it gives me freedom to use it on every PC with Windows, without any need to synchronize my chat history. I use several languages when chatting, so I have to use Unicode MirandaIM. Moreover, I haven’t seen any PC with Windows 9x last four years, so I don’t have any reason to use ANSI version.
Starting Miranda from USB has one (at least) disadvantage – start time drastically increases. I have profile about 50 Mbytes, and it takes about 15 seconds for Miranda to start (though simple copying of profile file in Explorer takes about 4 seconds); and, though I use dbx_mmap driver, it doesn’t really help to decrease start time.
One of things that disturbing me every time when starting Miranda – need to think about internet connection. So at home I have direct connection (via DSL router, with uPnP), and at work – via corporate proxy. Unfortunately, Miranda cannot read proxy settings from IE in Windows, so I need to go to options – network, and disable/enable proxy settings for all protos. Then I decided to automate it somehow. After some experiments I got what I need: just start Miranda without need to think if it is PC at work or at home. So here is the way I achieved it:
-
we have to start Miranda from batch file, because proxy settings are read only at Miranda start, and if we change proxy settings after all protos are started, then we have to restart Miranda anyway. In this batch file we check where we are – at work or at home. I did it checking hostname of computer. And depending on my defined location I copied appropriate *.ini file to Autoexec*.ini in Miranda folder. (more…)