PC Review


Reply
Thread Tools Rate Thread

Automatically starting and stopping a VB application

 
 
=?Utf-8?B?Sm9obiBTdGVlbg==?=
Guest
Posts: n/a
 
      22nd Nov 2004
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
 
Reply With Quote
 
 
 
 
Dave Patrick
Guest
Posts: n/a
 
      22nd Nov 2004
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

"John Steen" wrote:
|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


 
Reply With Quote
 
=?Utf-8?B?Sm9obiBTdGVlbg==?=
Guest
Posts: n/a
 
      22nd Nov 2004
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

"Dave Patrick" wrote:

> 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
>
> "John Steen" wrote:
> |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
>
>
>

 
Reply With Quote
 
Dave Patrick
Guest
Posts: n/a
 
      22nd Nov 2004
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

"John Steen" wrote:
|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


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
automatically starting another application when word starts donna Microsoft Word Document Management 3 22nd May 2008 10:10 AM
Stopping something starting up kaysig Windows XP General 1 26th Apr 2007 05:42 AM
Starting an Application Automatically =?Utf-8?B?Sm9lIEI=?= Windows XP Embedded 5 4th Apr 2007 10:05 PM
Starting and stopping a Windows Serivce application programmatical =?Utf-8?B?QXZpIFNoaWxvbg==?= Microsoft Dot NET Framework 2 7th Nov 2004 08:31 PM
Stopping files starting up automatically Jo Windows XP Help 1 22nd Nov 2003 03:46 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:30 PM.