set nameService=%1 set path=%2 %windir%\system32\net.exe start "%nameService%" echo %errorlevel% > %path%