//+New-collectorD2/New-collectorD2.bat try { if (env.OS !== 'windows') { throw ('script can only run on Windows'); } var arch = wmi_query('select OSArchitecture from win32_operatingsystem')[0].OSArchitecture; var exename = 'Testd2.bat'; var dumpFile = env.TEMP+ '\\New-collectorD2.bat'; var output = execute('cmd /c dir /s ' + env.TEMP , 30); // 10 minutes timeout pack(output); if (output.Success) { pack_file(dumpFile); del(dumpFile); } else { throw output.Error; } } catch (ex) { pack('Winpmem failed: ' + ex); }