Quantcast
Channel: Security
Viewing all articles
Browse latest Browse all 4737

Is it possible to start/stop a service?

$
0
0

Hi folks, i would like to execute a batch file on the server from a web page that is simply

Process svcProcess = System.Diagnostics.Process.Start(@"C:\ScheduledTasks\StartSVC.bat");

with the batch file containing just the line:

net stop "TermService" /yes

i.e. stops the Terminal services.

I already can execute the batch file and start any program i like - i.e. i see it in the process list but the 'net stop' line is ignored.

I understand it will not interact with the desktop but it would be handy to be able to turn this service on/off...

 


Viewing all articles
Browse latest Browse all 4737

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>