Solved

Detect Steps of a Application

Posted on 2008-06-21
5
214 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:adilkhan
  • 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:adilkhan
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:adilkhan
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 your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

759 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now