System.Diagnostics.Process.Start(sRootPath & "bat\" & sBatFile)
 
http://blogs.msdn.com/vbfaq/archive/2004/05/30/144573.aspx
 
 
 


>>> [EMAIL PROTECTED] 08/08/2005 1:59:01
PM >>>

To give you a backround on what I am doing. I setup a counter strike
source
server as a server. This is a game server that people connect to and
play
etc. Sometimes you will want to stop the server to update files. Then
of
course start it. Other times if there is a crash or you just want to
clear
it up you can restart it. I created a new service and it is listed in
the
services mmc. I also tested it out by running half life 2 CSS and
joined the
server and ran around works great. There is no console showing though
and im
not sure how to get that to work but that's another issue. I understand
that
there is a way to access these services and control them via asp.net.
I
amnot sure how and would like to see a VB.net example if there is one
out
there. The batch file thing I thought about also and would need that
for
running a server update. As a second question david on your code below
how
would I execute the batch file from a aspx page? If a page has a 

AUTO PATCH SERVER button then what would you put in the code behind to
runt
hat script? Thanks for the help............



-----Original Message-----
From: [email protected]
[mailto:[EMAIL PROTECTED] On Behalf Of David Renz
Sent: Monday, August 08, 2005 4:51 PM
To: [email protected]
Subject: Re: [AspNetAnyQuestionIsOk] Windows Service
Administrationwith
ASP.NET ...

Couldn't you write a batch file using Net commands (IE: NET STOP or
NET
START, etc).
then execute the batch file from the code ... provided you had the
proper permissions?

batch file like so:

net stop "Simple Mail Transport Protocol (SMTP)"
net stop "World Wide Web Publishing service"
net stop "FTP Publishing Service"
net stop "IIS Admin Service"

net start "IIS Admin Service"
net start "FTP Publishing Service"
net start "World Wide Web Publishing service"
net start "Simple Mail Transport Protocol (SMTP)"

echo "WEB is up and running"



>>> [EMAIL PROTECTED] 08/08/2005 1:46:54
PM >>>

I have looked on google for information and found a couple but they
are
all
in C#. What I want to do is to be able to STOP / START / RESTART a
windows
server on a server from and asp.net page.     I am using VB.net.


STOP BUTTON
Stops service


START BUTTON
Starts Service

RESTART BUTTON
Restarts Service



That's what is on my webform.............. Just need to create the
code
to
do it........................







Yahoo! Groups Links










[Non-text portions of this message have been removed]





Yahoo! Groups Links













Yahoo! Groups Links









[Non-text portions of this message have been removed]



------------------------ Yahoo! Groups Sponsor --------------------~--> 
<font face=arial size=-1><a 
href="http://us.ard.yahoo.com/SIG=12hvdrgoc/M=362131.6882499.7825260.1510227/D=groups/S=1705006764:TM/Y=YAHOO/EXP=1123542188/A=2889191/R=0/SIG=10r90krvo/*http://www.thebeehive.org
">Get Bzzzy! (real tools to help you find a job) Welcome to the Sweet Life 
- brought to you by One Economy</a>.</font>
--------------------------------------------------------------------~-> 

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/AspNetAnyQuestionIsOk/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to