// DIE's signature file
// Author: Jason Hood <jadoxa@yahoo.com.au>

init("installer","Windows Installer");

function detect(bShowType,bShowVersion,bShowOptions)
{
    for(var i=0;i<PE.resource.length;i++)
    {
        if(PE.compare("D0CF11E0A1B11AE1",PE.resource[i].Offset))
        {
            var nOffset=PE.findString(PE.resource[i].Offset,PE.resource[i].Size,"Windows Installer");
            if(nOffset!=-1)
            {
                var aVersion=PE.getString(nOffset).match(/ XML \((.*?)\)/);
                if(aVersion)
                {
                    sOptions="XML";
                    sVersion=aVersion[1];
                }
                bDetected=1;
            }
        }
    }

    return result(bShowType,bShowVersion,bShowOptions);
}
