|
|||
|
me again
;D Having dramas trying to get an app to restart the computer at the end of another (external) apps installation process. Currently I have an application that will install drivers etc on the users PC, but (for various reasons) will not restart the computer. What I want is another app that will poll and check to see if the external app has closed, and thus initiate a reboot. The thing is, the external app uses InstallShield Wizard, which fires off an ungodly amount of windows.... so I can't just poll one specific window. Currently I am doing: // look for all active InstallShield Wizard windows ws = Window.getWindowsByName("InstallShield Wizard"); for (i = 0; i < ws.length; i++) { // check to see if the window is being closed // if so pop up a dialog box informing the user that their PC will restart ws[i].onClose = function () { // for testing I want to use a Yes / No dialog box // so that I don't restart my computer accidently.... // the actual code will only use an OK dialog box var r = Dialogs.msgBox("Your PC will now restart", null, 36); trace("YOUR PC SHOULD NOW RESTART"); if (r == 6) { SysInfo.reboot(); } return false; } } But the dialog box doesn't fire off.... Any ideas? Cheers, G. |
|
|||
|
lol, I think I've figured it out....
I've found the handle of the LAST box, and am using that as a check. If that handle is found fire off a dialog box, otherwise wait.... Sorry for wasting your time again, G. |
![]() |
Was this information helpful? Yes No
| Thread Tools | |
| Display Modes | |
|
|