agt6381 October 27, 2009 at 09:09:32 Specs: Windows XP, intelDuo 2g
In advance excuss me if I dont make sense. I'm new to creating DOS bat files. I'm current trying to stop a service based on its state. Then writting a text file to be used for restart in the end of my bat file. set service=cmsservice for /f "tokens=3" %%a in ('sc query "%service%"^|find "STATE"') do ( if %cmsserviced%a==4 goto stop) :stop net stop cmsservice >> c:"\program files\motoplyr"\restart.txt
if /I %EQU==1kb% c:\startup.txt goto startcms if /I %EQU==0kb% c:\startup.txt EQU==0kb goto eof
The information on Computing.Net is the opinions of its users. Such
opinions may not be accurate and they are to be used at your own risk.
Computing.Net cannot verify the validity of the statements made on this
site. Computing.Net and Purch hereby disclaim all responsibility
and liability for the content of Computing.Net and its accuracy.