function Component() { }

Component.prototype.createOperations = function() {
    component.createOperations();
    if (systemInfo.productType === "windows") {
        var msi = installer.value("TargetDir") + "/Microsoft Visual C++ 2015 Redistributable (x64)/vc_redist.x64.exe";
        msi = msi.replace(/\//g, '\\');
        // MSI installer return codes
        // Return Codes:
        //     0    - The action completed successfully.
        //     1602 - The user canceled installation.
        //     1638 - Another version of this product is already installed.
        //     3010 - A restart is required to complete the install.
        //     5100 - Does not meet .NET Framework system requirements.
        component.addElevatedOperation("Execute",
                                       "{0,1602,1638,3010,5100}",
                                       "@TargetDir@/Microsoft Visual C++ 2015 Redistributable (x64)/install.bat",
                                       msi);
    }
}
