M-A's

technology blog

Tuesday, 18 December 2007

Software Update Rant

Dear "software updater" software programmer,
  • Please don't "update" software that I haven't installed yet.
  • Please don't reinstall quicklaunch icons that I deliberately removed.
  • Please stop asking me to update, simply update. I don't care if I have the "Latest and greatest version", I just want to have my software work. Don't tell me to visit a web site to update it, I won't. (Actually I do but shhh!)
  • Please stop installing "[Insert name here] Speed Launcher", "[Insert name here] Task" or "[insert name here]UpdateSched" autoloading crap in my startup menu or even worst, in the registry; to be sure to increase the commit charge (total memory usage) of my system. A program can easily look at updating itself when it is actually started. If it is never started, I don't mind it to be never updated.
  • Please don't write updater that fails. (It happens on my system, no names here) I'm not even talking about bad software, simply bad updaters. If you're too dumb replace some files, get another job.
  • No, I won't reboot my system to install a media player. The next time I'll reboot will probably be because of a corporate enforced software BSOD'ing my system.
I know doing an installer is hard. I know the amount of work is high. Then, why don't you just do less during updates?


Here's a few examples:

#1 Apple Software "Update"

They should have called it "Apple installer". Yes I have Safari Beta and QuickTime installed. No I don't have iTunes nor I want that "update" installed on my computer.

Apple folks, please, look to see if the software is actually installed before "updating" it.

#2
Also, Apple folks, don't add back the quicklaunch icons on updates. If I removed them, I probably don't want them back. This also applies to Acrobat Reader updates and Office 2003 service packs.

#3
Auto start crap. Sun's Java and QuickTime are notorious to add their entries back in the registry on each update. Stop doing that!

Monday, 10 December 2007

Detect if building with Visual Studio 2005 RTM or SP1

#include "windows.h"
extern char VisualStudio2005ServicePack1Detection[10];
C_ASSERT(sizeof(&VisualStudio2005ServicePack1Detection) == 4);

On VS2005 RTM, sizeof(&VisualStudio2005ServicePack1Detection) == 10.

Wednesday, 5 September 2007

DTE.Debugger is not reentrant

Disclaimer: blogspot is really bad at including code.
I tried to make an auto-debug-child processes in VB.NET in VS2005.

First define the breakpoint,
Function SetBreakPoint(ByVal Symbol As String, ByVal Offset As Integer) As EnvDTE.Breakpoints
Dim x As String = DTE.Debugger.GetExpression(Symbol).Value
' Poor's man calculation in VB...
Dim y As String = "0x" + Hex(CULng("&H" + x.Substring(2)) + Offset)
SetBreakPoint = DTE.Debugger.Breakpoints.Add(y)
End Function

Sub SetAutoDebugChildren()
' Set a breakpoint on function return.
Const offset As Integer = 44
SetBreakPoint("{,,kernel32.dll}_CreateProcessA@40", offset)
SetBreakPoint("{,,kernel32.dll}_CreateProcessW@40", offset)
End Sub

Ok, but I haven't found any programmatic way to set the "When Hit..." flag. So I added them manually after. So right click on the breakpoint, "When Hit..." run a macro and continue execution.

I set the macro to something like this:
Sub AttachToProcesses(ByVal process_name As String)
For Each process As EnvDTE.Process In DTE.Debugger.LocalProcesses
If (process.Name.IndexOf(process_name) <> -1) Then
process.Attach()
End If
Next
End Sub

Sub AttachMyExe()
AttachToProcesses("my.exe")
End Sub

So everything seems nice. The problem is that at the process.Attach() line, I was granted with a nice message box:
---------------------------
Error
---------------------------
A macro called a debugger action which is not allowed while responding to an event or while being run because a breakpoint was hit.
---------------------------
OK
---------------------------

Humm OK. If anyone has a solution beside using WinDbg, please comment.

Tuesday, 4 September 2007

How to wipe free space (note to myself)

cipher /w:c

That works on XP and Vista.

Tuesday, 7 August 2007

Save the earth, kill your AV

Can you imagine how much power would be saved if everyone would uninstall their AV? My personal computers have been running AV-virgin for more than a decade now without an itch. What a relief!

Friday, 20 July 2007

Logitech dinovo edge pairing?

I tried to pair a Logitech dinovo edge with a Dell axim x51v with no luck. In fact, they paired correctly but nothing that I type in gets to the x51. That's pretty sad since the x51v is discontinued, it will never work. If anyone got both to work together, please contact me.

I got it to work with my lenovo T60, I had a hard time though. It seems like you have to type the numbers and press enter FAST, otherwise you won't hear the congratulation beep.
The included dongle works well too. It's just not as useful for portable devices. :)

The upper right Windows key starts Winamp, that's nice. :) The missing "application" (or if you prefer "context menu") key is really bothersome.

[Update 2007-07-26] To pair with the WIDCOMM Bluetooth stack, I had to update to version 5.1.0.3600 (For my W2K3 x64). Before the upgrade, I entered the keypass and nothing happened. On Vista, I installed the 6.0.1.5100 driver and I had no problem. To update the stack, you have to have a device that the manufacturer paid for support. That's pretty sad, given the poor support you have with Windows.

Hint: To backup your driver, look in your %TEMP% directory for a directory created at the moment your started the updater, during installation. Copy it in a safe place just in case and/or for analysis.

Tuesday, 3 July 2007

Free build

For people that wants to build VS2005 projects, Microsoft gave an alternative. It's the Microsoft Windows SDK for Vista. It installs on Windows XP too. You simply start the CMD Shell and type vcbuild to build the solution. It almost works all the time!

Update (2007-07-19): I didn't realize that Microsoft released the Windows SDK Update for Windows Vista which now includes the VS2005 SP1 compiler!

That's great (old) news.