[NOTED][PROTIP] Start & Stop Windows 7 Services As Administrator via Batch File
Enable Disable Built In Administrator Acount
https://technet.microsoft.com/en-us/library/dd744293(v=ws.10).aspx
net user administrator /active:yesControl Panel -> UsersCreate password for Administrator.EverythingServiceStart.batrunas /user:administrator /savecred "cmd /c net start Everything & timeout 3"start /b %cd%\everything\everything.exeEverythingServiceStop.bat::runas.exe /user:administrator /savecred "cmd /c net stop Everything & timeout 3"::runas.exe /user:administrator /savecred "cmd /c taskkill /f /im everything.exe & timeout 3"runas.exe /user:administrator /savecred "cmd /c net stop Everything & timeout 3 & taskkill /f /im everything.exe & timeout 3"
RTFM:
net
start
timeout
taskkill
Source:
When using cmd.exe, you can put multiple commands on the same line by using ‘&’ or ‘&&’ between commands. Using a single ampersand (&) will cause the first command and then the second command to be run in sequence. Using double ampersands (&&) introduces error checking. The second command will run only if the first command is successful.
IMSIDDAD50B5B44B3B82B09AE3541C14DF035E08E4598