I want to write small code that run one exe using shell and exit immediately but my app wait for that exe to load before exiting I want that my app immediately exit on running that exe.
Something like in VB.NET there is option in shell for waiting.
Printable View
I want to write small code that run one exe using shell and exit immediately but my app wait for that exe to load before exiting I want that my app immediately exit on running that exe.
Something like in VB.NET there is option in shell for waiting.
What is the code that you are using? This should be more than enough.Code:Shell "notepad.exe"
yes i am using shell
Search the forums for "ShellAndWait" or "ShellWait".
i don't want my app to wait for that exe to load my app shoul exit as soon as shell command executed but it wait for that exe to load which takes about 6-7 secounds.
i want somethig
ShellAndNoWait :)
Not sure about this problem. may be you can try creating a batch file to execute the application which takes more time to load. I know this is an indirect way. I mean
Here "YourBatchFile.bat" will load the application which takes more time to load.VB Code:
shell "YourBatchFile.bat" shell "Other applciation.exe"
Not sure whether this will work for you. I don't have any application to test here. So, please test yourself
If you are waiting for it to completely load then you should use the FindWindow API to look for the window handle of your shelled apps main window.
Rob, He says his application takes more time to load. and wants to load next statement. He don't want to wait that much time.
No, I think he just wants to wait for it to load before exiting.
Quote:
my app shoul exit as soon as shell command executed but it wait for that exe to load
no Rob i don't want to wait. i want my other statement should load without waiting but it stuck in shell command for 6-7 secs
what he was saying isVB Code:
shell "App1.exe" 'Which takes 6 to 7 seconds to load shell "Other applciation.exe"
xor83, Have you tried the way I suggested in #6
I can't use batch files because that exe use some command line arguments which is like security for my app I can't expose that in batch file
BTW batch files also doing the same thing
hmmmm. Can't you split this process into two different exe's. This is just try to fix your problem. I can't test it here.
Please let us know the outcome.