|
-
Nov 21st, 2006, 01:53 AM
#1
Thread Starter
Lively Member
Shell
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.
-
Nov 21st, 2006, 02:29 AM
#2
Re: Shell
What is the code that you are using? This should be more than enough.
Code:
Shell "notepad.exe"
Use [code] source code here[/code] tags when you post source code.
My Articles
-
Nov 21st, 2006, 03:26 AM
#3
Thread Starter
Lively Member
-
Nov 21st, 2006, 03:28 AM
#4
Re: Shell
Search the forums for "ShellAndWait" or "ShellWait".
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Nov 21st, 2006, 03:32 AM
#5
Thread Starter
Lively Member
Re: Shell
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
-
Nov 21st, 2006, 03:38 AM
#6
Re: Shell
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
VB Code:
shell "YourBatchFile.bat"
shell "Other applciation.exe"
Here "YourBatchFile.bat" will load the application which takes more time to load.
Not sure whether this will work for you. I don't have any application to test here. So, please test yourself
-
Nov 21st, 2006, 03:51 AM
#7
Re: Shell
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.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Nov 21st, 2006, 03:57 AM
#8
Re: Shell
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.
-
Nov 21st, 2006, 03:58 AM
#9
Re: Shell
No, I think he just wants to wait for it to load before exiting.
my app shoul exit as soon as shell command executed but it wait for that exe to load
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Nov 21st, 2006, 04:02 AM
#10
Thread Starter
Lively Member
Re: Shell
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
-
Nov 21st, 2006, 04:02 AM
#11
Re: Shell
what he was saying is
VB Code:
shell "App1.exe" 'Which takes 6 to 7 seconds to load
shell "Other applciation.exe"
-
Nov 21st, 2006, 04:06 AM
#12
Re: Shell
xor83, Have you tried the way I suggested in #6
-
Nov 21st, 2006, 04:09 AM
#13
Thread Starter
Lively Member
Re: Shell
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
-
Nov 21st, 2006, 06:03 AM
#14
Thread Starter
Lively Member
Re: Shell
BTW batch files also doing the same thing
-
Nov 21st, 2006, 08:24 AM
#15
Re: Shell
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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|