tracking exe file in vb6

Posted on 2012-08-30
Medium Priority
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...
Question by:anbuvec
  • 2
  • 2
  • 2
  • +1
LVL 83

Expert Comment

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


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

Author Comment

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
LVL 83

Expert Comment

ID: 38349459
Can you show the code you use to launch and close exe?
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.


Expert Comment

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.

LVL 86

Accepted Solution

Mike Tomlinson earned 800 total points
ID: 38350677

Author Closing Comment

ID: 38350774
Thank you Idle_Mind....... that worked....
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:
Very different than VB6!

The VB6 area is over here:

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