Log in

No account? Create an account

Previous Web | Next Web


So, I decided a couple of weeks ago to see what the Channel 4 "4oD" on-demand service is any good.

Having installed it, I got kinda peed off that it sticks itself in the Windows system tray... and modified the registry to make itself 'run on login'...

But more annoyingly, it also installs a service, KService... that turns out to be a peer-2-peer service. I'm sure there's probably something in the small print about this, but its not readily obvious that this is the case...

And it turns out that the same peer-2-peer technology (called Kontiki) is also "hidden" inside Sky's on-demand service too... and that there was rather a lot of moaning about that... (which also doesn't/didn't come out and say point-blank that its P2P)

So, I though I'd try and write something to act as a wrapper around the 4oD client, KHost.exe, that would 'harness' KHost and make sure that the Kontiki stuff is better behaved.

Originally I was just going to use VBScript, but it doesn't seem you can do everything I wanted to using pure VBScript.... and the VBScript registry reading functionality is a little, um, dumb... there doesn't appear to be an "Exists" method... and if you call "RegRead" specifying a non-existent key/value, the script dies....

So I've ended up using VBScript and WMI, which gives me access to the list of Services on the machine as well as a slightly better registry interface than pure-VBScript.

So now I have a neat little script that starts KHost.exe, waits for it to be Exitted, then deletes the registry values, sets stops the service and ensure it is set to Manual so as to avoid starting at boot.

Not bad really... since its 5 years since I last wrote in VBScript and I've never done anything with WMI before! :-)