Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function getDM() {
try {
return new winax.Object('dm.dmsoft');
}
catch (e) {
child_process_1.execSync(`regsvr32 ${path.resolve(__dirname, 'dm.dll')} /s`);
return new winax.Object('dm.dmsoft');
}
}
const dm = getDM();