Automatically starting and stopping a VB application

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a VB6 application running 24/7 on a Win2K server. In order to back up
the SQL database it accesses, I need to automatically shut down the
application then start it up again after the back up is complete.

I want to create a couple of batch files to do this -- one to stop the
application and one to start it -- and schedule them to run at given times.
Are there commands I can use to accomplish this?

Thanks,
John Steen
remove (nospam) from e-mail address to send me a message
 
Unless your VB app can accept a shutdown argument you'll probably just need
to force kill it with something like pskill
http://www.sysinternals.com/ntw2k/freeware/pskill.shtml
then use a start command to start it back up.

start "" "pathtoexe"

BTW why not just create a maintenance plan through Enterprise Manager? Then
you shouldn't need to kill your app.

--
Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect

:
|I have a VB6 application running 24/7 on a Win2K server. In order to back
up
| the SQL database it accesses, I need to automatically shut down the
| application then start it up again after the back up is complete.
|
| I want to create a couple of batch files to do this -- one to stop the
| application and one to start it -- and schedule them to run at given
times.
| Are there commands I can use to accomplish this?
|
| Thanks,
| John Steen
| remove (nospam) from e-mail address to send me a message
 
I have an SQL maintenance plan running, Dave, but I keep getting failures
(errror 22029) which indicates that a DB can't be set to single-user mode.
Yet the DB backs up anyway. I wanted to shut down the VB application as part
of troubleshooting the problem.

Thanks, I'll give pskill a try.

John
 
Seems your VB app may not be properly closing objects when not actively
reading/ writing to the database.

--
Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect

:
|I have an SQL maintenance plan running, Dave, but I keep getting failures
| (errror 22029) which indicates that a DB can't be set to single-user mode.
| Yet the DB backs up anyway. I wanted to shut down the VB application as
part
| of troubleshooting the problem.
|
| Thanks, I'll give pskill a try.
|
| John
 
Back
Top