P
pantagruel
Hi,
I have the following:
try{
wmiobj = locmachine.ExecQuery("Select * from Win32_NTLogEvent Where
Logfile = 'Security' And TimeWritten >= '" + dtmStartDate + "' and
TimeWritten < '" + dtmEndDate + "'");
}catch(err){
wmiobj=null;
}
WScript.Echo(String(wmiobj));
running as a WSF JavaScript, unfortunately when I run it and the query
doesn't return anything it doesn't raise an error, so wmiobj does not
get set to null
How do I set it to null if the query does not provide a usable return?
I have the following:
try{
wmiobj = locmachine.ExecQuery("Select * from Win32_NTLogEvent Where
Logfile = 'Security' And TimeWritten >= '" + dtmStartDate + "' and
TimeWritten < '" + dtmEndDate + "'");
}catch(err){
wmiobj=null;
}
WScript.Echo(String(wmiobj));
running as a WSF JavaScript, unfortunately when I run it and the query
doesn't return anything it doesn't raise an error, so wmiobj does not
get set to null
How do I set it to null if the query does not provide a usable return?