Francesco Posted July 14, 2013 Share 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 Link to comment Share on other sites More sharing options...
Kelsenellenelvian Posted July 20, 2013 Share Posted July 20, 2013 Got it. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now