Detect Steps of a Application

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
LVL 23
Saqib KhanSenior DeveloperAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
elimesikaConnect With a Mentor Commented:
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
 
elimesikaCommented:
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
 
Saqib KhanSenior DeveloperAuthor Commented:
how to do this is vb.net?
any suggestions regarding Steps explaination?

Thanks
0
 
elimesikaCommented:
Have you followed the link ? , there are VB examples there as well.
Please elaborate ...

thanks
0
 
Saqib KhanSenior DeveloperAuthor Commented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.