Bat automatically decompress and release the asp.net program. bat decompress asp.net.
1. decompress the package
2. Replace the file
3. Stop the service
4. Recreate the virtual directory
5. Restart the service.
@ Echo 1. Zipexe compression assembly path @ echo 2. zipFileName compression file path @ echo 3. ylxt decompression file path @ echo 3. Files not modified in the webconstant release directory. and the folder, must be consistent with the directory structure of the virtual directory @ echo 4, PubparentFolder virtual directory parent 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 \ copy Folder \ webconstant "set PubparentFolder =" C: \ iisweb \ "set PubFolder = % PubparentFolder % PubFolderName % echo Delete the previously decompressed file ,...... rem rd/s/q % ylxt % echo decompress the file through the 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 application pool rem % windir % \ system32 \ inetsrv \ appcmd stop APPPOOL wxzs % windir % \ system32 \ inetsrv \ appcmd stop APPPOOL ylxt ech O 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 new extracted directory with the original virtual directory move % ylxt % PubparentFolder % echo start application pool rem % windir % \ system32 \ inetsrv \ appcmd start APPPOOL wxzs % windir % \ system32 \ inetsrv \ appcmd start APPPOOL ylxt pause
The above section describes the Bat automatic decompression and release of the asp.net program. I hope it will be helpful to you!