Closing an exe file and Services

Energy
09-08-2003, 09:15 AM
Hey all!

Soz if these questions are stupid, I'm not useless at VB but I by no way call myself an expert. I'm working on a system to start up a server at my work place. :)

So far it can change the reg info that it needs to and it can excute the programms that need to open up. But I need it to do two more things.

First off I need it to close aplications that have been turned on just by using a shell command. So is there a simple method of being able to open & close a exe file.
Currently I'm just using 'shell("path")'

Also is there a method of starting and stopping Windows 2000 services in VB?

Just to make this even more difficult our company only has the liscence for VB5.0... any help? Or should I give up?

Gizm
09-08-2003, 09:43 AM
Using the Shell command is fine... and for example for the SQL Server Agent:

To start the service:Shell "net start sqlserveragent"To stop the service:Shell "net stop sqlserveragent"G I Z M

Energy
09-08-2003, 09:48 AM
Using the Shell command is fine... and for example for the SQL Server Agent:

To start the service:Shell "net start sqlserveragent"To stop the service:Shell "net stop sqlserveragent"G I Z M

Big thanks, so that's the big question anwsered...

So my code is going to use one or two shell commands :) Just the last question, is there a way of closing an exe file using a shell command after opening one using...
Shell(path)

Energy
09-09-2003, 01:44 AM
bump???

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum