5

Is there a way to trigger a custom script (or open a windows app) after a user imports the deployment package using IIS and completes the installation?

Any help?

1
  • Built package using TeamBuild. Deploying using IIS 7.0 Commented Oct 25, 2010 at 14:49

1 Answer 1

13

Try help for msdeploy.exe.

msdeploy.exe -help -postSync

or http://technet.microsoft.com/en-us/library/ee619740(WS.10).aspx

msdeploy -verb:sync -source:contentPath="C:\Test1"
    -dest:contentPath="C:\Test2" -preSync:runcommand="Appcmd stop sites
    MyWebSite" -postSync:runcommand="Appcmd start sites MyWebSite"

msdeploy -verb:sync -source:contentPath="C:\Test1"
    -dest:contentPath="C:\Test2" -preSync:runcommand="c:\MyBatchFile.bat"

msdeploy -verb:sync -source:contentPath="C:\Test1"
    -dest:contentPath="C:\Test2" -postSync:runcommand="c:\MyBatchFile.bat"
Sign up to request clarification or add additional context in comments.

1 Comment

Got into a little bit of trouble with preSync and postSync commands. In short postSync did not worked if the order was like: -presync... -source...-dest... -postSync... They should be: preSync, postSync, source, dest !

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.