var shl = new ActiveXObject("WScript.Shell"); var root = shl.expandEnvironmentStrings("%SystemRoot%"); try { var util = new ActiveXObject("DHL.EtlUtil.Utilities"); shl.popup("Libraries have already been registered.", 64, "ZBConnect"); } catch (ex) { try { shl.run("\""+root+"\\Microsoft.NET\\Framework\\v1.1.4322\\RegAsm.exe\" /codebase ETLUtil.dll", 0, true); } catch(ex) {} try { shl.run("\""+root+"\\Microsoft.NET\\Framework\\v2.0.50727\\RegAsm.exe\" /codebase ETLUtil.dll", 0, true); } catch(ex) { } try { shl.run("\""+root+"\\Microsoft.NET\\Framework64\\v1.1.4322\\RegAsm.exe\" /codebase ETLUtil.dll", 0, true); } catch(ex) {} try { shl.run("\""+root+"\\Microsoft.NET\\Framework64\\v2.0.50727\\RegAsm.exe\" /codebase ETLUtil.dll", 0, true); } catch(ex) { } try { var util = new ActiveXObject("DHL.EtlUtil.Utilities"); shl.popup("Libraries are now registered.", 64, "ZBConnect"); } catch(ex) { shl.popup("Could not register the library. Are you logged on as admin?", 64, "ZBConnect"); } }