Thursday, June 5, 2014

Computer on/off event viewer filter

Sometimes I want to track when I turned my computer on or off, including when it went to sleep or woke back up again.  To do that, I have created a custom view in Event Viewer on my Windows 8 system (should be the same for all systems from Vista and beyond, I assume). Go to Custom Views and click on "Filter current custom...". Switch to the XML tab and check the "Edit query manually" in the lower part. Now, paste the following in there:

<QueryList>
  <Query Id="0" Path="System">
    <Select Path="System">
    *[System
        [Provider
            [@Name='Microsoft-Windows-Kernel-Power'
            or @Name='Microsoft-Windows-Power-Troubleshooter'
            ]
            and TimeCreated    [timediff(@SystemTime) &lt;= 2592000000]
        ]
    ]
        or
    *[System
        [Provider
            [@Name='Microsoft-Windows-Kernel-General']
            and ( (EventID &gt;= 12 and EventID &lt;= 13) )
            and TimeCreated    [timediff(@SystemTime) &lt;= 2592000000]
        ]
    ]
   </Select>
  </Query>
</QueryList>

Basically, it is the equivalent of this, but only showing event 12 (switch off) and 13 (switch on) for the Kernel General source:




Please remember to "Save filter to custom view" if you want quick access to it later.

Wednesday, May 21, 2014

Buggy Windows 8 network charms - works from command-line!

I have struggled with two network related problems on my older laptop for some time after upgrading it to Windows 8 and later 8.1. Both problems occur when I try to go to the Settings charm (Winkey+I), in the submenu under the networking icon (upper left of the icons). Both however seem to have one very simple workaround: Using the command-line equivalents.

Problem 1 - Connect to WLAN: Sometimes, registering to a known WLAN does not work, or the connection is randomly or immediately lost after being registered. Sometimes, the desired WLAN network is not even visible in the networks list, although any other WLAN capable device (e.g. a phone etc.) can find the WLAN in question.

Solution 1 - Connect to WLAN from the command line: For some reason, connection works great when doing it from the command line. To see all avaiable WLANS:

netsh wlan show networks

Issue the following command to connect to one of them:

netsh wlan connect name=WlanName

-where WlanName is the name of the WLAN. Observe that this name is case sensitive!

Those are the basics - explore other possibilities by using the help system (a ? sign  will give you available commands).

Possible mitigating factor to this problem: I am using an Intel 4965AGN network card, which some suggest is not supported under Windows 8. However, the Windows Compatibility Center suggests otherwise - at least for Windows 8 (while 8.1 is marked with "no info"). I have had bluescreen problems with both the Windows 8 native driver and the latest Intel driver, but the latest Dell driver works for me (version 12.4.3.9 dated May 28, 2009) on my Latitude D830 without bluescreen problems.

Problem 2 - Connect to RAS (PPTP) connection: When trying to connect to one of my RAS connections (VPN to another location), sometimes I loose the WLAN connectivity even by clicking the desired RAS connection on the Settings-networking charm, without even clicking its Connect button that will now be displayed. Needless to say, when my WLAN is gone, so are my chances to connect to the RAS connection. I am stuck.

Solution 2 - Connect to RAS from the command line: Again, performing the same task from the command line succeeds without any hassle. Here's the command:

rasdial "RAS connection name" username password

More information about problem 2: What happens when clicking the RAS link, seems to be that the WLAN Extensibility Module crashes and logs an event 10003 and an event 10000, "WLAN Extensibility Module has failed to start" with a reference to the file IWMSSvc.dll and an error code 1726

Friday, May 16, 2014

Wrong search order in Windows 8.1 Start menu

I have been using Windows 8.1 now for a little more than half a year, and I can safely say that compared to Windows 7, I still can not come up with one single thing I like better. Take search from within the (horrible) start menu. In Win7, bring up the start menu and type some text related to the document you want to open - voilla, chances are that the document you wanted is among the top 5 hits displayed.

Problem: In Win8 (updated to version 8.1 by now), you can also search from the start menu - by default searching "Everywhere". You only get the upper two documents it finds, which are mostly files you have not touched for years. Press the Win-F key instead to search through your files, and you end up with a screenful of ancient files you haven't used since Jesus walked the streets of Jerusalem.

Workaround: My best workaround is to use following key combo instead: Win-E, then Ctrl-E (I only use the mouse when I am forced to, luckily at least keyboard control works pretty well in Win8) Now you can type your search term and instantly get proper search results from inside good old Windows Explorer. The Win-E key combo brings up Explorer in My Computer (if you haven't changed the default), then Ctrl-E places you in the search field in the upper right corner. It is uglier than the Win-F charm, but much more charming.

So why, Microsoft, can't you let Explorer serve these results even to the Win-F file search mechanism? Man do I miss Win7.