服务(本地)-安装、卸载
安装:
D:
cd D:\Project\tfs\bin\Release (exe存放路径)
echo off
if exist “%SystemRoot%/Microsoft.NET/Framework/v4.0.30319” goto netOld
:DispError
echo 您的机器上没有安装 .net FrameWork 4.0
pause
goto LastEnd
:netOld
cd %SystemRoot%/Microsoft.NET/Framework64/v4.0.30319
echo 您的机器上安装了相应的.net FrameWork,可以安装本服务,按任意键继续…
echo off
pause
%SystemRoot%/Microsoft.NET/Framework/v4.0.30319/installutil “TimeService.exe”(exe名称)
pause
:LastEnd
rem exit
卸载:
D:
cd D:\Project\tfs\Release(exe存放路径)
echo off
if exist “%SystemRoot%/Microsoft.NET/Framework/v4.0.30319” goto netOld
:DispError
echo 您的机器上没有安装 .net FrameWork 4.0
pause
goto LastEnd
:netOld
cd %SystemRoot%/Microsoft.NET/Framework64/v4.0.30319
echo 您的机器上安装了相应的.net FrameWork,可以安装本服务,按任意键继续…
echo off
pause
%SystemRoot%/Microsoft.NET/Framework/v4.0.30319/installutil /u “TimeService.exe”(exe名称)
pause
:LastEnd
rem exit