var wsh;
var oExec;
var strProductDirectory;

// Get WSH Object
//wsh = WScript.CreateObject("WScript.Shell");
wsh = new ActiveXObject("WScript.Shell");

strProductDirectory = Session.Property("CustomActionData")
oExec = wsh.Run ("\"" + strProductDirectory + "\\instsrv.exe\" QumranetCDAutoUpgrader \"" + strProductDirectory + "\\srvany.exe\"", 0, true);

wsh.RegWrite ("HKLM\\System\\CurrentControlSet\\Services\\QumranetCDAutoUpgrader\\Parameters\\Application","cscript \"" + strProductDirectory + "\\CDAutoUpgraderCheck.wsf\"");
wsh.RegWrite ("HKLM\\System\\CurrentControlSet\\Services\\QumranetCDAutoUpgrader\\Parameters\\AppDirectory",strProductDirectory);
wsh.RegWrite ("HKLM\\System\\CurrentControlSet\\Services\\QumranetCDAutoUpgrader\\Type",272,"REG_DWORD");

oExec = wsh.Run ("regsvr32 /s \"" + strProductDirectory + "\\capicom.dll\"");