This project has moved and is read-only. For the latest updates, please go here.

Script Execution During Install/Uninstall

Topics: General Questions
Nov 9, 2010 at 7:45 PM
Edited Nov 9, 2010 at 8:27 PM

I would like to know if there's a way to define/execute a .vbs script during installation within the current framework.  We are using a Commerce Server BizTalk Adapter that creates registry entries when the portbindings are imported during installation.  When the application is undeployed/uninstalled, the registry key remains so subsequent installations fail unless the registry entry is removed.  I have a vbscript that will remove the offending entries but how can I execute this during install as a first step or uninstall. 


Upon further review, I found a solution to my question here:


Nov 9, 2010 at 11:25 PM

The Deployment Framework defines an MSBuild property named Cscript that holds the path to CScript.exe, so you can use that in an Exec task if you'd like.  You can create two new targets in your .btdfproj file named CustomDeployTarget and CustomUndeployTarget and add an Exec task there to run your script at deploy and undeploy time.