Andre's Blog
Perfection is when there is nothing left to take away
Microsoft - assume success

I was wading through the code of one of the administrative scripts (adsutil.vbs) that comes with Microsoft's Internet Information Service (IIS) and came across the code shown below. The utility can be found in the c:\Inetpub\AdminScripts\ directory.

Function DeleteCommand()

    On Error Resume Next

    Dim IIsObject
    Dim IIsObjectPath

    Dim ObjectPath
    Dim ObjectParam
    Dim MachineName

    Dim DummyVariant
    Dim DeletePathOnly
    ReDim DummyVariant(0)
    DummyVariant(0) = "Crap"

    ' Set the return code - assume success
    DeleteCommand = 0

Two highlighted lines caught my attention and I thought that it was very typical of Microsoft - even though their code has some Crap, they assume success!