?
Solved

tracking exe file in vb6

Posted on 2012-08-30
7
Medium Priority
?
489 Views
Last Modified: 2012-08-30
i am trying to track if the exe file which is opened using shell command has been closed or not

for example... i am opening a notepad using shell command in vb6 after closing the notepad how will i track if the opened notepad has been closed in vb6...
0
Comment
Question by:anbuvec
  • 2
  • 2
  • 2
  • +1
7 Comments
 
LVL 83

Expert Comment

by:CodeCruiser
ID: 38349245
One way is to get a list of processes and see if its in the list

http://support.microsoft.com/kb/187913

But this wont work if the user also has other instances of the same exe open.
0
 

Author Comment

by:anbuvec
ID: 38349326
actually the question is not to see in task manager... just to make a boolean value and then set the boolean to be true when the exe is opened using shell command and then to set the boolean value false when it is closed through vb6 itself
0
 
LVL 83

Expert Comment

by:CodeCruiser
ID: 38349459
Can you show the code you use to launch and close exe?
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 8

Expert Comment

by:PagodNaUtak
ID: 38350110
Actually, Shell command does not have that capability.
Instead, you may want to explore shell execute instead. It has more functionality compared to shell command.

http://support.microsoft.com/kb/170918
0
 
LVL 86

Accepted Solution

by:
Mike Tomlinson earned 800 total points
ID: 38350677
0
 

Author Closing Comment

by:anbuvec
ID: 38350774
Thank you Idle_Mind....... that worked....
0
 
LVL 86

Expert Comment

by:Mike Tomlinson
ID: 38350841
Glad that was useful.  If you're specifically looking for VB6 solutions, though, then you probably shouldn't post the question in the VB.Net area.  =)

In .Net, the solution is quite simple and completely managed (no APIs required).  It also doesn't require a polling loop...you just wire up the Process.Exited() event:
http://msdn.microsoft.com/en-us/library/system.diagnostics.process.exited.aspx
Very different than VB6!

The VB6 area is over here:
http://www.experts-exchange.com/Programming/Languages/Visual_Basic/
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I think the Typed DataTable and Typed DataSet are very good options when working with data, but I don't like auto-generated code. First, I create an Abstract Class for my DataTables Common Code.  This class Inherits from DataTable. Also, it can …
1.0 - Introduction Converting Visual Basic 6.0 (VB6) to Visual Basic 2008+ (VB.NET). If ever there was a subject full of murkiness and bad decisions, it is this one!   The first problem seems to be that people considering this task of converting…
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
Suggested Courses
Course of the Month17 days, 8 hours left to enroll

831 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question