Code: Select all
var sessionObjectExists;
try
{
var s = Session.Property("CWD");
sessionObjectExists = true;
}
catch (e)
{
sessionObjectExists = false;
}
function log(msg)
{
if (sessionObjectExists)
{
var rec = Session.Installer.CreateRecord(1);
rec.StringData(0) = "[1]";
rec.StringData(1) = msg;
Session.Message(msiMessageTypeInfo, rec);
}
}
function myCustomAction()
{
try
{
test;
}
catch(exc)
{
log("Exception : " + exc);
log(" name : " + exc.name);
log(" number : " + exc.number);
log(" message : " + exc.message);
log(" description: " + exc.description);
}
}
FOLLOW US
Get the latest news in Application Packaging