Bat automatically decompresses and publishes asp. net programs
- 2021-08-31 07:39:32
- OfStack
1 decompress the compressed package
2 Replace files
3 Stop service
4 Rebuilding Virtual Directory
5 Restart the service
@echo 1 , Zipexe Compress the assembly path well
@echo 2 , zipFileName Path to the compressed file
@echo 3 , ylxt The path to the unzipped file
@echo 3 , webconstant Publish files that will not be modified in the directory . And folders, and the directory structure of the virtual directory is maintained 1 To
@echo 4 , PubparentFolder Parent directory of virtual directory
@echo 5 , PubFolderName Virtual directory name
set Zipexe="C:\Program Files\2345Soft\HaoZip\HaoZipC.exe"
set zipFileName="C:\iisweb\copyFolder\ylxt.zip"
set PubFolderName="ylxt"
set ylxt="C:\iisweb\copyFolder\"%PubFolderName%
set webconstant="C:\iisweb\copyFolder\webconstant"
set PubparentFolder="C:\iisweb\"
set PubFolder=%PubparentFolder%%PubFolderName%
echo Delete previously unzipped files, ......
rem rd /s /q %ylxt%
echo Extract files through good compression software, ......
pause
%Zipexe% x %zipFileName% -o%ylxt% -y
echo Copy files that will not be modified ......
pause
xcopy %webconstant% %ylxt% /s /e /y
pause
echo Stop applying pools
rem %windir%\system32\inetsrv\appcmd stop APPPOOL wxzs
%windir%\system32\inetsrv\appcmd stop APPPOOL ylxt
echo Back up the original virtual directory
set YYYYmmdd=%date:~0,4%%date:~5,2%%date:~8,2%
set "YYYYmmdd=%YYYYmmdd: =0%"
set hhmiss=%time:~0,2%%time:~3,2%%time:~6,2%
set "hhmiss=%hhmiss: =0%"
ren %PubFolder% %PubFolderName%%YYYYmmdd%_%hhmiss%
echo Replace the original virtual directory with the new extracted directory
move %ylxt% %PubparentFolder%
echo Start the application pool
rem %windir%\system32\inetsrv\appcmd start APPPOOL wxzs
%windir%\system32\inetsrv\appcmd start APPPOOL ylxt
pause
Above is this site to introduce Bat automatic decompression release asp. net program, I hope to help you!