Windows XP Windows 7 Windows 2003 Windows Vista Windows教程綜合 Linux 系統教程
Windows 10 Windows 8 Windows 2008 Windows NT Windows Server 電腦軟件教程
 Windows教程網 >> Windows教程綜合 >> 系統常見問題解答 >> .net服務安裝卸載命令行batcmd

.net服務安裝卸載命令行batcmd

日期:2017/1/20 17:46:55      編輯:系統常見問題解答

基於.net 4.0

安裝

@ECHO OFF
echo 准備安裝服務
pause
REM The following directory is for .NET 4.0
set DOTNETFX2=%SystemRoot%\Microsoft.NET\Framework\v4.0.30319
set PATH=%PATH%;%DOTNETFX2%
echo 安裝服務...
echo ---------------------------------------------------
InstallUtil /i service.exe
echo ---------------------------------------------------
echo 安裝服務成功!
pause
==========================================
卸載
@ECHO OFF
echo 准備卸載服務
pause
REM The following directory is for .NET 4.0
set DOTNETFX2=%SystemRoot%\Microsoft.NET\Framework\v4.0.30319
set PATH=%PATH%;%DOTNETFX2%
echo 卸載服務...
echo ---------------------------------------------------
InstallUtil /u <span style="font-family: Arial, Helvetica, sans-serif;">service</span><span style="font-family: Arial, Helvetica, sans-serif;">.exe</span>
echo ---------------------------------------------------
echo 安裝卸載成功!
pause
==========================================
Copyright © Windows教程網 All Rights Reserved