Home > Computers and Internet > How to deploy Sharepoint Workflow with batch file

How to deploy Sharepoint Workflow with batch file

Step1.

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

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

mkdir "%CommonProgramFiles%\Microsoft Shared\web server
extensions\12\TEMPLATE\FEATURES\TestWorkFlow"

@copy /Y feature.xml  "%CommonProgramFiles%\Microsoft Shared\web
server extensions\12\TEMPLATE\FEATURES\TestWorkFlow\"
@copy /Y workflow.xml "%CommonProgramFiles%\Microsoft Shared\web server
extensions\12\TEMPLATE\FEATURES\TestWorkFlow\"
@xcopy /s /Y *.xsn "%programfiles%\Common Files\Microsoft Shared\web server
extensions\12\TEMPLATE\FEATURES\TestWorkFlow\"
@echo
————————————————————————–
@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"
@iisreset
@echo Workflow Installation completed.

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

Step3.

Associate the workflow with List/Library, and start working

Advertisements
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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

%d bloggers like this: