How to deploy Sharepoint Workflow with batch file


Create an directory with any name,

Include these file in the directory
  – Project dll
  – gacutil.exe(copy from C:\Program Files\Microsoft SDKs\…)
  – workflow.xml
  – feature.xml
  – all infopath form

Step 2.

Create batch file with any name in the same directory, and paste below code,
with some change

1. Change server name and port number where you need to deploy
2. Change Directory Name  which you want to create in Feature directory,
currently its TestWorkFlow
3. Change project dll name, currently its TestWorkFlow.dll

@PATH = %PATH%;%programfiles%\common files\microsoft shared\web server
@echo Copying the feature…

mkdir "%CommonProgramFiles%\Microsoft Shared\web server

@copy /Y feature.xml  "%CommonProgramFiles%\Microsoft Shared\web
server extensions\12\TEMPLATE\FEATURES\TestWorkFlow\"
@copy /Y workflow.xml "%CommonProgramFiles%\Microsoft Shared\web server
@xcopy /s /Y *.xsn "%programfiles%\Common Files\Microsoft Shared\web server
@echo Adding assemblies to the GAC…
@gacutil.exe -if TestWorkFlow.dll

@echo ————————————————————————–
@echo Activating the feature…
@stsadm -o installfeature -name TestWorkFlow
@stsadm -o activatefeature -name TestWorkFlow -url http://ServerName:8000
@echo ————————————————————————–
@echo "Resetting IIS"
@echo Workflow Installation completed.

once all change done, just double click and see everything is deployed


Associate the workflow with List/Library, and start working


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s