Thursday, June 07, 2012

Google Search bug (location preference)

There is a minor issue with Google location preference in search results. It auto-detects the location from the IP address of my browser. When I am logged into a VPN (or a proxy) with VPN server routing internet traffic from US location, it detects and sets my Location to be USA. The displayed results from USA are given priority. When I try to set my location to India, it would not accept. See below:


Anyone else facing this issue? I think Google should accept user input too for the location field.

Monday, March 12, 2012

Control auto-screen rotation in Windows 7

If you have Intel Graphics (can happen on other graphics too) installed then magically after few key strokes sometimes screen (monitor) rotates upside down or sideways. Like me, if you are used to Eclipse Java IDE and often use "ctrl+alt+down arrow" to duplicate the line(s) above, then, this is a real pain as screen would turn upside down instead of expected Eclipse IDE action.

To turn this behavior off, follow these steps:

1. Locate right side bottom corner of windows task bar

2. Right click on Intel Graphics (Monitor) icon and select to change "Graphics Properties..."



3. On the next window un-check the "Hot Key Functionality" option.



4. You may disable individual options or change key combinations- square box below.

5. Click OK.

That is it.

Wednesday, February 01, 2012

How to run a script on logout/shutdown in windows 7

I have several mounted (windows share) network drives on my Dell laptop. I need them for my daily work. However, at the end of the day I want to close them and clear up some other stuffs. I can use Group Policy(GP) editor snap-in to assign logoff scripts as described here and a screenshot shown below:



But, GP editor may not be availble on all versions of Windows 7. The alternative, I figured out, is to use Task scheduler that comes (probably?) with all flavors of Windows 7. Task scheduler in Windows 7 is really nice, but, I did not find a way to invoke a script when I logout from my computer or shut it down at the end of day's work. The workaround is to create a task that triggers "when some event is logged". To use this alternative, follow these steps:

1. Start task scheduler
2. Enter General properties:

3.  Go to Trigger tab and event details as follows:
4. Enter action details:


5. Rest of the settings can be left default or changed as per needs
6. Save the task and test the script is invoked by manually restarting the computer.


That is all that needed to run a script on logout (shutdown actually) from task scheduler. 

Note: this way script is fired only at shutdown actually. I did not find a easy way to trigger logout security events. I tried with event IDs 4634 and 4647, both did not work as expected.