No edit summary |
(Updated Edited template to July 12, 2025.) |
||
(8 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
=== | === <message>Write the content here to display this box</message>Single TK or MDS Webapp === | ||
If you want to deploy the installation packages you download from https://mdriven.net/downloads | If you want to deploy the installation packages you download from https://mdriven.net/downloads, use [https://www.iis.net/downloads/microsoft/web-deploy msdeploy] and run that from the command line or in a batch file. | ||
Command syntax | Command syntax: | ||
"%PROGRAMFILES%\IIS\Microsoft Web Deploy V3\msdeploy.exe" -verb:sync -setParam:"Application Path"="Default Web Site/%2" -source:package=%1 -dest:iisApp="Default Web Site/%2" -enableRule:DoNotDeleteRule | "%PROGRAMFILES%\IIS\Microsoft Web Deploy V3\msdeploy.exe" -verb:sync -setParam:"Application Path"="Default Web Site/%2" -source:package=%1 -dest:iisApp="Default Web Site/%2" -enableRule:DoNotDeleteRule | ||
In the example above | In the example above: | ||
* <code>%1</code> is the name of the zip file you have downloaded. | |||
* <code>%2</code> is the name of the web app and its folder name. They could be different, but that is very unusual. | |||
* <code>-setParam</code> is needed to not use the built-in path from the package. If you have used the GUI installer, you will know that you have edited that name (or removed it) many times. | |||
* <code>enableRule:DoNotDeleteRule</code> is needed to retain existing setting files and other resources (it is the default in the GUI installer). | |||
=== Multiple TK and MDS === | |||
Putting the example above in a cmd file called UpdateSiteFromPackage.cmd, the following works: | |||
Example of how to first stop two application pools, one for TK and one for MDS, and then update two TK sites and the MDS, and lastly, start the application pools again. | |||
Example of how to first stop two application pools, one for TK and one for MDS and then update two TK sites and the MDS and | |||
"%WINDIR%\system32\inetsrv\appcmd.exe" stop apppool /apppool.name:"%3" | "%WINDIR%\system32\inetsrv\appcmd.exe" stop apppool /apppool.name:"%3" | ||
"%WINDIR%\system32\inetsrv\appcmd.exe" stop apppool /apppool.name:"%3MDrivenServer" | "%WINDIR%\system32\inetsrv\appcmd.exe" stop apppool /apppool.name:"%3MDrivenServer" | ||
Line 25: | Line 21: | ||
"%WINDIR%\system32\inetsrv\appcmd.exe" start apppool /apppool.name:"%3MDrivenServer" | "%WINDIR%\system32\inetsrv\appcmd.exe" start apppool /apppool.name:"%3MDrivenServer" | ||
"%WINDIR%\system32\inetsrv\appcmd.exe" start apppool /apppool.name:"%3" | "%WINDIR%\system32\inetsrv\appcmd.exe" start apppool /apppool.name:"%3" | ||
Then, | Then, put the names of the sites in another file called UpdateAllTestAndDevSites.cmd file like this: | ||
call UpdateTkAndMdSites.cmd %1 %2 Test | call UpdateTkAndMdSites.cmd %1 %2 Test | ||
call UpdateTkAndMdSites.cmd %1 %2 Dev1 | call UpdateTkAndMdSites.cmd %1 %2 Dev1 | ||
Add rows for all your installed sites. | Add rows for all your installed sites. | ||
Then you can update all your Dev and Test sites with one command | Then, you can update all your Dev and Test sites with one command. For example: | ||
UpdateAllTestAndDevSites.cmd MDrivenTurnkey_20220321.zip MDrivenServer_20220321.zip | UpdateAllTestAndDevSites.cmd MDrivenTurnkey_20220321.zip MDrivenServer_20220321.zip | ||
Remember to execute all this from an elevated command prompt! | Remember to execute all this from an elevated command prompt! | ||
[[Category:MDriven Turnkey]] | [[Category:MDriven Turnkey]] | ||
[[Category:MDriven Server]] | [[Category:MDriven Server]] | ||
{{Edited|July|12|2025}} |
Latest revision as of 05:46, 20 January 2025
Single TK or MDS Webapp
If you want to deploy the installation packages you download from https://mdriven.net/downloads, use msdeploy and run that from the command line or in a batch file.
Command syntax:
"%PROGRAMFILES%\IIS\Microsoft Web Deploy V3\msdeploy.exe" -verb:sync -setParam:"Application Path"="Default Web Site/%2" -source:package=%1 -dest:iisApp="Default Web Site/%2" -enableRule:DoNotDeleteRule
In the example above:
%1
is the name of the zip file you have downloaded.%2
is the name of the web app and its folder name. They could be different, but that is very unusual.-setParam
is needed to not use the built-in path from the package. If you have used the GUI installer, you will know that you have edited that name (or removed it) many times.enableRule:DoNotDeleteRule
is needed to retain existing setting files and other resources (it is the default in the GUI installer).
Multiple TK and MDS
Putting the example above in a cmd file called UpdateSiteFromPackage.cmd, the following works:
Example of how to first stop two application pools, one for TK and one for MDS, and then update two TK sites and the MDS, and lastly, start the application pools again.
"%WINDIR%\system32\inetsrv\appcmd.exe" stop apppool /apppool.name:"%3" "%WINDIR%\system32\inetsrv\appcmd.exe" stop apppool /apppool.name:"%3MDrivenServer" CALL UpdateSiteFromPackage "%USERPROFILE%\Downloads\%1" Intranet%3 CALL UpdateSiteFromPackage "%USERPROFILE%\Downloads\%1" %3 CALL UpdateSiteFromPackage "%USERPROFILE%\Downloads\%2" %3MDrivenServer "%WINDIR%\system32\inetsrv\appcmd.exe" start apppool /apppool.name:"%3MDrivenServer" "%WINDIR%\system32\inetsrv\appcmd.exe" start apppool /apppool.name:"%3"
Then, put the names of the sites in another file called UpdateAllTestAndDevSites.cmd file like this:
call UpdateTkAndMdSites.cmd %1 %2 Test call UpdateTkAndMdSites.cmd %1 %2 Dev1
Add rows for all your installed sites.
Then, you can update all your Dev and Test sites with one command. For example:
UpdateAllTestAndDevSites.cmd MDrivenTurnkey_20220321.zip MDrivenServer_20220321.zip
Remember to execute all this from an elevated command prompt!