Francesco Posted July 14, 2013 Posted July 14, 2013 (edited) DescriptionAn alternative to abruptly terminating processes with TASKKILL.ChangesIn jscript.js beforefunction TimedWaitForProgram(ImageName,HowLong)addfunction TimedWaitForWindow(WindowName,HowLong){ position="jscript.js"; whatfunc="TimedWaitForWindow()"; RunCmd('"' + wpipath + '\\Tools\\WPI Tool.exe" /Action=WaitForWindow /WindowName="' + WindowName + '" /Timeout=' + HowLong, false, true);}In configwizard.js replaceCommandsMenuBar.addNewChild("jscript_dos", 3, "jscript_setEnvVar", "setEnvVar()", false, "", ""); CommandsMenuBar.addNewChild("jscript_dos", 4, "jscript_removeEnvVar", "removeEnvVar()", false, "", ""); CommandsMenuBar.addNewChild("jscript_dos", 5, "jscript_FormatDrive", "FormatDrive()", false, "", "");withCommandsMenuBar.addNewChild("jscript_dos", 3, "jscript_TimedWaitForWindow", "TimedWaitForWindow()", false, "", ""); CommandsMenuBar.addNewChild("jscript_dos", 4, "jscript_setEnvVar", "setEnvVar()", false, "", ""); CommandsMenuBar.addNewChild("jscript_dos", 5, "jscript_removeEnvVar", "removeEnvVar()", false, "", ""); CommandsMenuBar.addNewChild("jscript_dos", 6, "jscript_FormatDrive", "FormatDrive()", false, "", "");andCommandsMenuBar.addNewChild("cmd_other", 3, "other_sleep", "Sleep", false, "", ""); CommandsMenuBar.addNewChild("cmd_other", 4, "other_reboot", "Reboot", false, "", "");withCommandsMenuBar.addNewChild("cmd_other", 3, "other_closewindow", "CloseWindow", false, "", ""); CommandsMenuBar.addNewChild("cmd_other", 4, "other_sleep", "Sleep", false, "", ""); CommandsMenuBar.addNewChild("cmd_other", 5, "other_reboot", "Reboot", false, "", "");and beforecase 'jscript_CreateRegKey':addcase 'jscript_TimedWaitForWindow': HandleCommandsSelectionMenu('{JSCRIPT}=TimedWaitForProgram("Setup",10)'); break;and beforecase 'other_sleep':addcase 'other_closewindow': HandleCommandsSelectionMenu("{CLOSEWINDOW} WindowName"); break;In installer.js beforecase 'SLEEP':addcase 'CLOSEWINDOW': cmd="\"" + wpipath + "\\Tools\\WPI Tool.exe\" /Action=CloseWindow /WindowName=\"" + cmd + "\""; fsoCmd=true; break;In the Tools folder add the WPI Tool.exe attached to this postWPI Tool.exe Edited July 14, 2013 by Francesco
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now