Never been to DZone Snippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Sharepoint "Fab 40" Templates - batch file deployment helper

/*

File below should live here:
\\server\c$\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN

Unpack the templates to the same directory and then run the install.bat file

-------------------------------------------------------------

Copy/paste below to make the install.bat file

-------------------------------------------------------------

*/

   1  
   2  
   3   
   4  ::install.bat for WSP Template files
   5  ::Created by Will Pritchard
   6  :START
   7  @ECHO OFF
   8  SET /P INPUT="Please enter the name of the .wsp file you want to deploy: "
   9  ECHO.
  10  ECHO Starting deployment of %INPUT%
  11  :CHOICE
  12  SET /P CHOICE="Are you sure you want to continue? (Y or N): "
  13  if %CHOICE%==Y goto YES
  14  if %CHOICE%==y goto YES
  15  if %CHOICE%==N goto NO
  16  if %CHOICE%==n goto NO
  17  ECHO %CHOICE% is not recognized.  Please re-enter your answer.
  18  goto CHOICE
  19  :YES
  20  ECHO Adding the Solution.
  21  stsadm -o addsolution -filename %INPUT%
  22  ECHO Executing service jobs.
  23  stsadm -o execadmsvcjobs
  24  ECHO Deploying the Solution.
  25  stsadm -o deploysolution -name %INPUT% -immediate -allowGacDeployment -allowCasPolicies
  26  ECHO Final Execution processing.
  27  stsadm -o execadmsvcjobs
  28  GOTO END
  29  :NO
  30  EXIT
  31  :END
  32  ECHO All Done!
  33  :MORE
  34  SET /P MORE="Want to install another solution? (Y or N): "
  35  if %MORE%==Y goto START
  36  if %MORE%==y goto START
  37  if %MORE%==N goto NO
  38  if %MORE%==n goto NO
  39  ECHO %CHOICE% is not recognized.  Please re-enter your answer.
  40  goto MORE
  41  

You need to create an account or log in to post comments to this site.


Click here to browse all 5545 code snippets