|
|
#1 |
|
Member
Join Date: May 2005
Location: U.S.A.
Posts: 91
|
Wait for a process to end I didn't start?
Simple and short. How do I get the installer
to wait on a process to end I didn't start? I need something like "ExecWait" for a process, yet the process isn't executed by my installer. I need to pause the installer without a messagebox until the process I choose isn't running any longer. I keep coming across a dead link within a recurring solution in threads posted by Kichik. Here is a link to one of those threads below. Thread: http://forums.winamp.com/showthread....+installshield Dead link: http://unattended.sourceforge.net/installers.html -MichaelFlya- Last edited by MichaelFlya; 7th October 2005 at 09:01. |
|
|
|
|
|
#2 |
|
Major Dude
Join Date: Feb 2004
Location: Moscow, Russia
Posts: 1,220
|
For apps with window:
code: |
|
|
|
|
|
#3 |
|
Member
Join Date: May 2005
Location: U.S.A.
Posts: 91
|
Ok I start up the process "notepad.exe" after
which I start up my installer and hit install. Now if the code works correctly the installation should pause with the loading bar not moving till I close notepad. How do I insert this in the script correctly and properly? -MichaelFlya- |
|
|
|
|
|
#4 | |
|
Junior Member
Join Date: Jul 2004
Posts: 36
|
Re: Wait for a process to end I didn't start?
Quote:
for processes that don't include a window, you should use the FindProcDLL plug-ins - I never remember if all those plug-in I use are in the standard NSIS install, sorry - in a loop and exit the loop if the process is not found. I'd also advise you to use a sleep instruction in your loop, or else you might peg the processor if your loop is tight. ![]() KenA |
|
|
|
|
|
|
#5 |
|
Major Dude
Join Date: Feb 2004
Location: Moscow, Russia
Posts: 1,220
|
Notepad window class name is 'Notepad' (for FindWindow).
For this specific window class you can skip 4 lines of window caption check out (2 lines at the beginning and GetWindowText+StrCmp in the loop). And " - Notepad" text is lang dependant and appears at the end of caption (like IE does). Please note 2000 and 3000 msec timeouts in the code. Usage: !insertmacro TerminateApp |
|
|
|
|
|
#6 |
|
Member
Join Date: May 2005
Location: U.S.A.
Posts: 91
|
Well, KenA has a good solution it seems.
Using the plugin found at this link: http://nsis.sourceforge.net/wiki/Find_Process_By_Name Plus using the code below. Which did the trick. code: Thanks !! -MichaelFlya- |
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|