Clever1mba Posted May 18, 2005 Share Posted May 18, 2005 Hello $fHandle = FileOpen(@SystemDir & "\myfile.txt", 0)$char = FileRead($fHandle, 99999999)FileClose($fHandle)$stopservice = StringSplit($char, ",")For $i = 1 To $stopservice[0]RunWait("net.exe stop " & $stopservice[$i],"",@SW_HIDE)Nextmyfile.txt contains services but when i add services like thisits not workingservice1,service2,etc its working service1,service2, etc........----------------- Link to comment Share on other sites More sharing options...
ChiDragon Posted May 18, 2005 Share Posted May 18, 2005 I don't even see a question here, but if you want to add the services to your text file line by line just do it like: service1 service2 etc. and change $stopservice = StringSplit($char, ",") to $stopservice = StringSplit($char, @CRLF) Link to comment Share on other sites More sharing options...
Clever1mba Posted May 18, 2005 Author Share Posted May 18, 2005 Hello $stopservice = StringSplit($char, @CRLF) it works fine thanks buddy Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now