Solved

Detect Steps of a Application

Posted on 2008-06-21
5
241 Views
Last Modified: 2010-04-23
I am developing a VB.net application, which will do the following.

1 - By using wget, download certain Files from internet.
2 - After downloading is finished, I need to Move to next step and Create Tables in SQL Server.
3 - After tables are created i need to start dumping downloaded data into created Tables.

As you can see each step depends on previous step. In VB.net GUI i would like to show end user at which step application is right now(what step application is perfoeming currently).

Step1 will open a Batch file, I dont know how to detect termination of batch file and move to next Step.

Please Advise.

Thanks
0
Comment
Question by:Saqib Khan
  • 3
  • 2
5 Comments
 
LVL 19

Expert Comment

by:elimesika
ID: 21838770
HI

you should use :

object.Run(strCommand, [intWindowStyle], [bWaitOnReturn])
 
The bWaitOnReturn cause the application to wait to strCommand (your batch) to finish


See examples at
http://msdn.microsoft.com/en-us/library/d5fk67ky(VS.85).aspx
0
 
LVL 23

Author Comment

by:Saqib Khan
ID: 21841042
how to do this is vb.net?
any suggestions regarding Steps explaination?

Thanks
0
 
LVL 19

Expert Comment

by:elimesika
ID: 21841232
Have you followed the link ? , there are VB examples there as well.
Please elaborate ...

thanks
0
 
LVL 23

Author Comment

by:Saqib Khan
ID: 21841799
That Link is for "Windows Script Host", But I did found an alternate on Google and it works fine.

I am using Threading.Sleep Function to delay between Steps, is this Function optimized or am i hammering Server with Sleep Function?

Thanks
0
 
LVL 19

Accepted Solution

by:
elimesika earned 500 total points
ID: 21841867
Threading.Sleep is OK if you are using pooling, that means that your process awakes  each X seconds and checks if the batch process is complete, is that the alternative you have found?
0

Featured Post

How our DevOps Teams Maximize Uptime

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us. Read the use case whitepaper.

Question has a verified solution.

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

Suggested Solutions

This article describes relatively difficult and non-obvious issues that are likely to arise when creating COM class in Visual Studio and deploying it by professional MSI-authoring tools. It is assumed that the reader is already familiar with the cla…
Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

791 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