View Full Version : howto lett SF7 wait till an executed program finished with running
brianlesker
09-29-2004, 05:54 AM
howto lett SF7 wait till an executed program finished with running?
JXBURNS
09-29-2004, 06:52 AM
May I suggest you use the ADD ACTION Wizard which will explain all the parameters for you.
File.Run("\\MyProg.exe", "", "", SW_SHOWNORMAL, true);
true at the end tells the system to wait.
John
brianlesker
09-29-2004, 07:06 AM
i have the following code:
On Post Install:
File.Run("imp", "impulse/"..strImpPassNew.."@"..strDatabaseNaam.." file="..strInstallatieDir.."\handleiding.dmp FULL=Y IGNORE=Y LOG="..strInstallatieDir.."\HelpUpdate.log", strInstallatieDir, SW_SHOWNORMAL);
But while this one is running, it shows after installing screens?!?
Whoops i c the fault already!! SORRY! :(
JXBURNS
09-29-2004, 07:14 AM
It will do as you have the window state set to SW_NORMAL. If you do not want it being seen in a normal window set to SW_MINIMIZE.
If you want it to run after completion of the setup completely then you need to insert the code into the ONSHUTDOWN method.
John
On Post Install:
File.Run("imp", "impulse/"..strImpPassNew.."@"..strDatabaseNaam.." file="..strInstallatieDir.."\handleiding.dmp FULL=Y IGNORE=Y LOG="..strInstallatieDir.."\HelpUpdate.log", strInstallatieDir, SW_SHOWNORMAL);
Just to make sure, the reason that this isn't working is because you are missing the final parameter boolean WaitForReturn (which defaults to false). If you add a ,
, true); to the end of the action Setup Factory will wait.
Also remember that the backslash "\" needs to be escaped when used in strings. So if I wanted to specify the following file path: C:\Program Files\Setup Factory 7.0\SUF70Design.exe in a string it would have to look like this:
"C:\\Program Files\\Setup Factory 7.0\\SUF70Design.exe"
JXBURNS
09-29-2004, 11:17 AM
Mark,
You expressed it better than I could re setting the last parameter to True.
HOWEVER re-reading the docs, and specifically the parameter defaults, (in theory) it is set to true by default. I think this may be an error as appears it is false by default which is same as when the Wizard is used. :huh
John
Hi JXBURNS,
Nice catch! You are right it appears as though the help file is incorrectly lists the default as true, when it should be false.
I have already made a note of it!
Powered by vBulletin™ Version 4.0.6 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.