Google

2009-09-30

Google Chrome Offline (Standalone) Installer

I had a post on how to download full Google Chrome earlier this year. Ghacks has a recent post on how to download the offline version:

All that these users need to do is to append the parameter standalone=1 to the website where Google Chrome can be downloaded. Here are the two download links for the latest official and latest beta version of the Google browser:

Latest official: http://www.google.com/chrome/eula.html?standalone=1
Latest beta: http://www.google.com/chrome/eula.html?extra=betachannel&standalone=1
Latest Test: http://www.google.com/chrome/eula.html?extra=devchannel&standalone=1

They warn that this version may not auto-update, but that may be exactly what you want in your environment if you would like to deliver versions in a controlled manner.

Unfortunately, when I tried this I kept on downloading the same version (172.28) as Prod only. According to Google Chrome Release Blog, QA is in v3 and Dev channel is in v4 right now.

I searched thru Google Chrome Forums and found a link to download full executable for every single release: http://www.filehippo.com/download_google_chrome/
and yet another one here:
http://www.softpedia.com/progDownload/Google-Chrome-Download-108166.html

2009-09-28

Double-clicking Logitech

As if I do not have enough issues with my computers these days, apparently my Logitech G7 mouse died. Yes, I said "apparently" because it works just fine except a little annoyance: 7 out of 10 times when I simply left click, it treats it as a double click.

I noticed this a couple of days ago and it got worse. I played with every mouse setting to no avail. Then, googled it to see if this was a reported Windows 7 issue and it turned out that this is a "common" case with mouse brands today that "microdrive" fails. From what I read, some people claim that Logitech mouses are especially notorious & exhibit this problem after a year or so. Although my case would certainly fall into that category, I doubt that there is a systematic problem with Logitech mouses.

A couple of months ago, this would be a perfect excuse to buy a Razer, who by the way created a new mouse - called "Naga" - that seems to be specifically targeting World of Warcraft players [17 buttons & custom interface for WoW = drool]. I still can't get myself pay $130 for a mouse though. So no "mamba" for me.

2009-09-26

CPU Fan Error Thriller - The Saga Continues

After my post about the error "CPU Fan Error!", I had two days without any issues but today error is back. I had left my computer on for a couple of hours and apparently it went into deep sleep mode (S3). I came back and moved the mouse - nothing happened! O_o
Then, I hit the keyboard, knowing it would not help... I had one option left, Power button to wake up the PC.

It did wake up but really like an annoyed person coming back from deep sleep. Fans roared full speed for 15 secs; then a brief silence as if power went off... Finally a blinking cursor on the screen and BIOS messages showing up. Unfortunately, BIOS messages stopped at some point as before and after 20 secs of silence I saw the familiar message printed on the screen:
"CPU Fan Error!
Press F1 to continue.

I hit F1 and loaded Win7 but I knew what was coming: 'computer freeze every other second'...

So, I rebooted and decided to disable Q-Fan again but I failed to hit "del" key to go into BIOS on time and noticed a new message:
Overclocking Failed! Please enter Setup to re-configure your system

In fact, these two messages seems to be related. My system has arrived overclocked from Falcon Northwest; I know that because they mentioned every single BIOS change they made in their documentation (kudos). When a system is overclocked, it may generate more heat; again referring to incapacity of the fan to do its job...

The reason I had bought the system was WoW but I quit WoW a couple of months ago. So I turned overclocking off as I do not need the every piece of cpu cycle these days.

Of course, it is still bothering me that this is happening; and I am not totally convinced that this is a hardware story. It could very well be that Win7 has something to do with this. I am, for example, noticing some other "System" errors in Event Log like
"The NVIDIA Display Driver Service service has reported an invalid current state 32"
There was a report in nVidia forum today that problem was resolved after installing latest Win7 beta drivers. I have not however seen the same issues reported there.

At this point, I thought I should switch to something more productive and do some investigation with PowerShell, like when did these messages appear and how many of them were in system log:

get-eventlog system -entry error  |where {$_.message -match "nvidia"} |ft -auto
Index Time         EntryType Source                  InstanceID Message
----- ----         --------- ------                  ---------- -------
74903 Sep 26 19:04 Error     Service Control Manager 3221232488 The NVIDIA Display Driver Service service has report...
74614 Sep 25 00:03 Error     Service Control Manager 3221232488 The NVIDIA Display Driver Service service has report...
74456 Sep 24 23:07 Error     Service Control Manager 3221232488 The NVIDIA Display Driver Service service has report...
74343 Sep 24 23:04 Error     Service Control Manager 3221232488 The NVIDIA Display Driver Service service has report...
74198 Sep 24 22:57 Error     Service Control Manager 3221232488 The NVIDIA Display Driver Service service has report...
74037 Sep 24 22:31 Error     Service Control Manager 3221232488 The NVIDIA Display Driver Service service has report...
73887 Sep 24 22:02 Error     Service Control Manager 3221232488 The NVIDIA Display Driver Service service has report...
73758 Sep 24 21:58 Error     Service Control Manager 3221232488 The NVIDIA Display Driver Service service has report...
73399 Sep 22 00:06 Error     Service Control Manager 3221232488 The NVIDIA Display Driver Service service has report...
73164 Sep 21 00:02 Error     Service Control Manager 3221232488 The NVIDIA Display Driver Service service has report...

So, apparently this nVidia problem is also a recent phenomenon. I checked Microsoft's documentation on event id and did not see anything to worry me. So, I went back to PowerShell and started playing with it a bit more...

How many errors did my system have in System Log?

(get-eventlog system -entry error).count
39

Some people actually doing that in a different way. First get the events from log & then count them:

$events=get-eventlog -logname system -entryType error # I used the long notation here
$events.count
39

I actually like that "(something).property" way of getting properties but assigning it to a variable first is much more useful if you will re-use the object. For example, if I wanted to find out what sources generated these errors (i.e. group them):

$events |group source |FT count,name -auto #It centered the output without -auto

Count Name
----- ----
   20 DCOM
   11 Service Control Manager
    3 HECI
    3 EventLog
    2 Serial

Or if I wanted to see only certain fields:

$events |ft TimeGenerated, Source, Message -Auto

TimeGenerated         Source                  Message
-------------         ------                  -------
9/26/2009 7:10:33 PM  DCOM                    The description for Event ID '-1073731808' in Source 'DCOM' cannot be ...
9/26/2009 7:04:13 PM  Service Control Manager The NVIDIA Display Driver Service service has reported an invalid curr...
9/26/2009 7:03:31 PM  HECI                    HECI driver has failed to perform handshake with the Firmware.
9/26/2009 7:03:40 PM  EventLog                The previous system shutdown at 5:09:01 PM on ?9/?26/?2009 was unexpec...
9/26/2009 2:39:20 PM  DCOM                    The description for Event ID '-1073731808' in Source 'DCOM' cannot be ...
9/25/2009 12:03:26 AM Service Control Manager The NVIDIA Display Driver Service service has reported an invalid curr...
...

Btw, did you also notice that in the first example I only typed "entry" instead of "entryType", that's because you can type the minimum number of chars sufficient enough for PowerShell to identify which parameter you meant.

I also tend to skip default parameter names. For example, default parameter for "get-eventlog" is of course EventLog name which is represented by "-logname string" parameter. You can skip -logname if nobody else will read your code:

get-eventlog system

As usual to get list of event logs simply type:

get-eventlog -list

  Max(K) Retain OverflowAction        Entries Log
  ------ ------ --------------        ------- ---
  20,480      0 OverwriteAsNeeded       1,142 Application
  15,168      0 OverwriteAsNeeded           0 DFS Replication
  20,480      0 OverwriteAsNeeded           0 HardwareEvents
     512      7 OverwriteOlder              0 Internet Explorer
  20,480      0 OverwriteAsNeeded           0 Key Management Service
   8,192      0 OverwriteAsNeeded         127 Media Center
  16,384      0 OverwriteAsNeeded           0 ODiag
  16,384      0 OverwriteAsNeeded         263 OSession
                                              Security
  20,480      0 OverwriteAsNeeded       4,321 System
     512      7 OverwriteOlder            415 Windows PowerShell

help get-eventlog -examples
has several examples for common scenarios.
Fin!

2009-09-24

CPU Fan error thriller

If you read my "RIP: My Falcon Fragbox2" story, you know that I own one of these beasts.. Since I got it back from Falcon, it was working fine all these months and I love it.

Recently though, I upgraded my Vista to Windows 7 Home Premium Edition from MSDN. I know, I know it is early and many vendors do not have drivers etc etc but I love Windows 7 and could not wait!

All went well and I have been running it fine for the last month or so. Recently though, I started to see some weird behaviour from “sleep mode” again. I dont remember what setting it had originally but at some point it would not go to sleep. I mentioned that story below and I thought it was a software issue. Unfortunately it came back and the final solution I found was to change BIOS setting for sleep from S1 to S3. That had put and end to it. So, I went back and checked the setting to see if it somehow got reset. It was still in S3.

It would go to “sleep” fine; then sometime later it, fan wakes up with full ferocity and does not stop running. This kept on happening so I started to shutdown the machine instead of putting it into Sleep. I started to notice another weird behaviour though. Windows would come up fine but after I logged in, it would suddenly start to act up. Basically it was running for 2secs and freezing for 2secs. I could see this behaviour clearly by simply moving the mouse around. It was quite weird and I had no idea what was causing it as I had not installed any software (I did inplace upgrade) recently. I was annoyed but figured out that rebooting system would clear this issue.

The worst happened today though. I cold booted the system and noticed an error:
CPU fan error!
Press F1 to continue.

I was freaking out at this point and immediately opened the case only to find out that all fans were plugged properly and firmly, and they were all running just fine. So, I started to research this and found out that other people with Asus Motherboard had seen this issue. They suggested to “disable” Q-fan, which was set to “silence” mode. I tested this and it did clear the error. However, I thought this would be a risky thing to do; so kept on checking Asus site. Apparently they have a BIOS update 0902 (mine was 0802) but instructions were not too clear to me. I downloaded a utility from their site, which is supposed to allow saving bios and updating it from Windows.

When I ran it; it displayed a message which told me to remove Memory from A* banks. I checked the motherboard documentation and found out which one was A1 (I have 2 Gig at A1 and 2 gig at B1). I powered down the pc, removed all the cables and removed A1 memory. After reboot, I saw a message which said something like “Because of AMT requirement A1 bank should be filled or you may experience system malfunction”. I went ahead anyway and launched Asus update utility after logging in. This time, it did not complain and gave me the option to save and update bios. I did that and chose to reset CMOS.

All went fine. I rebooted and of course got CMOS checksum errors. I hit F1 and continued to logon to Windows. All seemed fine. Then, I rebooted and went into BIOS. Took out the awesome  documentation from Falcon and reset all the setting one by one to what was documented. Saved and rebooted again. I do not see the fan error and all seems to be OK right now.

2009-09-23

Imported old blog here

When I started blogging in 2004, I had a different address. When blogger was moving to a new format, I started this one. It was not possible to merge the two for quite sometime. Today, while looking around, I found out from Blogger Buzz that this feature has been implemented already and it's very simple to import/export blogger blogs.

So, I went to my old blog and from Settings > Basic page, chose "Export Blog". Then simply logged on to this one and clicked "Import Blog" from the same location. I have it all here now, yay!

If only now, I could find a nice template to make the posting space larger...

Code Syntax Highlighting for Blogger

I was envious how nice my friend, Arnoud's PowerShell blog was showing up the code and decided to look for something similar in Blogger. After a bit of searching, I found a very nice open-source tool Called SyntaxHighlighter. There is a great instruction page here.

2009-09-20

PowerTab for PowerShell


A friend of mine had mentioned to me this cool free PowerShell addon, which takes tabbing into a whole new level. You can download "PowerTab" from ThePowerShellGuy.com

A bit of registry with PowerShell

I was trying some PowerShell commands to see how it works with Registry. I liked of course how I can browse registry by simply typing:


Registry:

And the way I prefer it with Get-ChildItem (gci)

gci HKLM:\Software\microsoft\Windows\CurrentVersion\Run

But of course when I type that it shows me the registry keys under that path


SKC VC Name ;
--- -- ---- -------- 
3 1 OptionalComponents {(default)} 

If I actually wanted to see the content, the command to use is Get-ItemProperty (gp)

gp hklm:\software\microsoft\windows\currentversion\run\

Kernel and Hardware Abstraction Layer : KHALMNPR.EXE
Adobe Reader Speed Launcher : "C:\Program Files\Adobe\Reader 9.0\Reader\Reader_sl.exe"
atchk : "C:\Program Files\Intel\AMT\atchk.exe"

I removed the PSxxx properties from the results above.


So, what if I wanted remove the registry entry for Adobe Reader Speed Launcher?
Remove-ItemProperty does that:
remove-itemproperty hklm:\software\microsoft\windows\currentversion\run -name "Adobe Reader Speed Launcher"


Is there an alias for that? We can use Get-Alias (gal) to find out


gal | where {$_.Definition -eq "Remove-ItemProperty"} |select name 


Name
------
rp

Note that, we removed something directly under Run key. If we wanted to create a key or delete it, we would not use "*-ItemProperty" but "new-item (ni)" and "remove-item (ri)" respectively:
ni hklm:\software\blahblah
ri hklm:\software\blahblah

Interestingly, if you wanted to search for "blahblah" with gci using a filter like this:
gci hklm:\Software -include "blah*"

it would not work as registry key is a 'path'. So you would use something like
gci hklm:\software | where {$_.name -match "blah"}
or

gci hklm:\software | where {$_.PsPath -match "blah"}
Notice that -match (regexp search) works but -like (pattern search... more like -eq) does not:

gci hklm:\software | where {$_.name -like "blah*"}
returns nothing.

I was curious to find out why; so I typed

gci hklm:\software\ |where {$_.name -match "blah*"} |fl *
and reason is clear:
Name: HKEY_LOCAL_MACHINE\software\blahblah

So, changing above search pattern to "*blah*" works:

gci hklm:\software | where {$_.name -like "*blah*"}

2009-09-12

PowerShell bits and pieces - Search for a file

I am taking some notes while discovering how to do simple things in PowerShell. What better place to store these than this blog?

Searching for a file:

Assume, We are searching for Remote Desktop Client File. I know that it's called mstsc.exe (and in fact I have a pretty good idea where it is) but assuming we don't have a clue about it's location. We would want to go to root of the drive and start searching from there. In DOS, I would run the following from the root of the drive

dir /s mstsc.exe

In PowerShell:

gci -recurse -filter mstsc.exe -EA SilentlyContinue|ft directory,name -auto

If you are not at root, add c:\

gci c:\ -recurse -filter mstsc.exe -EA SilentlyContinue|ft directory,name -auto

gci is short for Get-ChildItem (or ls or dir)

-recurse is like /s in DOS; goes recursively into subdirectories

-filter is very efficient because provider filters the results before they are passed to powershell

-EA is short for ErrorAction, which tells PowerShell what to do when there is an error. You are likely to hit access denied errors when searching. Options include


  • SilentlyContinue. Suppresses the error message and continues executing the command.
  • Continue. Displays the error message and continues executing the command. "Continue" is the default value.
  • Inquire. Displays the error message and prompts you for confirmation before continuing execution. This value is rarely used.
  • Stop. Displays the error message and stops executing the command.


Then we are piping results to FormatTable using column names and telling it to Auto Size

A couple of notes on this...

1) If the file we are searching for may be hidden, then we would want to add -force parameter when searching.

2) ErrorAction is a common parameter to PowerShell commands; not specific to Get-ChildItem. If you would like to get the explanation for a parameter of Get-ChildItem; you could type

get-help gci -parameter force

If you wanted to find out which other commands have "force" parameter; you would omit the command name like this:

get-help * -parameter force

None of these would work for ErrorAction as it's a common parameter. So, you would simply type

get-help ErrorAction

and you will notice that one of the help files is about_CommonParameters

get-help about_CommonParameters -detailed

That prints the information about ErrorAction I copied above.