Wednesday, April 30, 2008

Automating the install of the SharePoint Application Templates

One of the things we do for our site administrators is load all the Microsoft SharePoint and WSS application templates. This gives them a broad range of templates to suite their needs. Installing these templates is time consuming so I created a batch file that automates this process and I just wanted to share it with my readers.

Copy the following code into a text file and rename the file extension to .bat.

REM **********************BEGIN BAT FILE**********************
ECHO ON
REM AllTemplates.exe has to be on the logged-in users desktop

%USERPROFILE%\Desktop\AllTemplates.exe /T:%TEMP% /C /Q

set SPAdminTool=%CommonProgramFiles%\Microsoft Shared\web server extensions\12\BIN\stsadm.exe

"%SPAdminTool%" -o addsolution -filename "%TEMP%\ApplicationTemplateCore.wsp"
"%SPAdminTool%" -o addsolution -filename "%TEMP%\AbsenceVacationSchedule.wsp"
"%SPAdminTool%" -o addsolution -filename "%TEMP%\BudgetingTrackingMultipleProjects.wsp"
"%SPAdminTool%" -o addsolution -filename "%TEMP%\BugDatabase.wsp"
"%SPAdminTool%" -o addsolution -filename "%TEMP%\CallCenter.wsp"
"%SPAdminTool%" -o addsolution -filename "%TEMP%\ChangeRequest.wsp"
"%SPAdminTool%" -o addsolution -filename "%TEMP%\ComplianceProcessSupport.wsp"
"%SPAdminTool%" -o addsolution -filename "%TEMP%\ContactsManagement.wsp"
"%SPAdminTool%" -o addsolution -filename "%TEMP%\DocumentLibraryReview.wsp"
"%SPAdminTool%" -o addsolution -filename "%TEMP%\EventPlanning.wsp"
"%SPAdminTool%" -o addsolution -filename "%TEMP%\ExpenseReimbursementApproval.wsp"
"%SPAdminTool%" -o addsolution -filename "%TEMP%\HelpDesk.wsp"
"%SPAdminTool%" -o addsolution -filename "%TEMP%\InventoryTracking.wsp"
"%SPAdminTool%" -o addsolution -filename "%TEMP%\ITTeamWorkspace.wsp"
"%SPAdminTool%" -o addsolution -filename "%TEMP%\JobRequisition.wsp"
"%SPAdminTool%" -o addsolution -filename "%TEMP%\KnowledgeBase.wsp"
"%SPAdminTool%" -o addsolution -filename "%TEMP%\LendingLibrary.wsp"
"%SPAdminTool%" -o addsolution -filename "%TEMP%\PhysicalAssetTracking.wsp"
"%SPAdminTool%" -o addsolution -filename "%TEMP%\ProjectTrackingWorkspace.wsp"
"%SPAdminTool%" -o addsolution -filename "%TEMP%\RoomEquipmentReservations.wsp"
"%SPAdminTool%" -o addsolution -filename "%TEMP%\SalesLeadPipeline.wsp"

"%SPAdminTool%" -o deploysolution -name "ApplicationTemplateCore.wsp" -allowgacdeployment -immediate
"%SPAdminTool%" -o deploysolution -name "AbsenceVacationSchedule.wsp" -allowgacdeployment -immediate
"%SPAdminTool%" -o deploysolution -name "BudgetingTrackingMultipleProjects.wsp" -allowgacdeployment -immediate
"%SPAdminTool%" -o deploysolution -name "BugDatabase.wsp" -allowgacdeployment -immediate
"%SPAdminTool%" -o deploysolution -name "CallCenter.wsp" -allowgacdeployment -immediate
"%SPAdminTool%" -o deploysolution -name "ChangeRequest.wsp" -allowgacdeployment -immediate
"%SPAdminTool%" -o deploysolution -name "ComplianceProcessSupport.wsp" -allowgacdeployment -immediate
"%SPAdminTool%" -o deploysolution -name "ContactsManagement.wsp" -allowgacdeployment -immediate
"%SPAdminTool%" -o deploysolution -name "DocumentLibraryReview.wsp" -allowgacdeployment -immediate
"%SPAdminTool%" -o deploysolution -name "EventPlanning.wsp" -allowgacdeployment -immediate
"%SPAdminTool%" -o deploysolution -name "ExpenseReimbursementApproval.wsp" -allowgacdeployment -immediate
"%SPAdminTool%" -o deploysolution -name "HelpDesk.wsp" -allowgacdeployment -immediate
"%SPAdminTool%" -o deploysolution -name "InventoryTracking.wsp" -allowgacdeployment -immediate
"%SPAdminTool%" -o deploysolution -name "ITTeamWorkspace.wsp" -allowgacdeployment -immediate
"%SPAdminTool%" -o deploysolution -name "JobRequisition.wsp" -allowgacdeployment -immediate
"%SPAdminTool%" -o deploysolution -name "KnowledgeBase.wsp" -allowgacdeployment -immediate
"%SPAdminTool%" -o deploysolution -name "LendingLibrary.wsp" -allowgacdeployment -immediate
"%SPAdminTool%" -o deploysolution -name "PhysicalAssetTracking.wsp" -allowgacdeployment -immediate
"%SPAdminTool%" -o deploysolution -name "ProjectTrackingWorkspace.wsp" -allowgacdeployment -immediate
"%SPAdminTool%" -o deploysolution -name "RoomEquipmentReservations.wsp" -allowgacdeployment -immediate
"%SPAdminTool%" -o deploysolution -name "SalesLeadPipeline.wsp" -allowgacdeployment -immediate

"%SPAdminTool%" -o addtemplate -filename "%TEMP%\BoardDirectors.stp" -title "BoardDirectors.stp"
"%SPAdminTool%" -o addtemplate -filename "%TEMP%\BusinessPerformance.stp" -title "BusinessPerformance.stp"
"%SPAdminTool%" -o addtemplate -filename "%TEMP%\CaseManagement.stp" -title "CaseManagement.stp"
"%SPAdminTool%" -o addtemplate -filename "%TEMP%\ClassroomManagement.stp" -title "ClassroomManagement.stp"
"%SPAdminTool%" -o addtemplate -filename "%TEMP%\ClinicalTrial.stp" -title "ClinicalTrial.stp"
"%SPAdminTool%" -o addtemplate -filename "%TEMP%\CompetitiveAnalysis.stp" -title "CompetitiveAnalysis.stp"
"%SPAdminTool%" -o addtemplate -filename "%TEMP%\DiscussionDatabase.stp" -title "DiscussionDatabase.stp"
"%SPAdminTool%" -o addtemplate -filename "%TEMP%\DisputedInvoice.stp" -title "DisputedInvoice.stp"
"%SPAdminTool%" -o addtemplate -filename "%TEMP%\EmployeeActivities.stp" -title "EmployeeActivities.stp"
"%SPAdminTool%" -o addtemplate -filename "%TEMP%\EmployeeBenefits.stp" -title "EmployeeBenefits.stp"
"%SPAdminTool%" -o addtemplate -filename "%TEMP%\EmployeeTraining.stp" -title "EmployeeTraining.stp"
"%SPAdminTool%" -o addtemplate -filename "%TEMP%\EquityResearch.stp" -title "EquityResearch.stp"
"%SPAdminTool%" -o addtemplate -filename "%TEMP%\ManufacturingProcess.stp" -title "ManufacturingProcess.stp"
"%SPAdminTool%" -o addtemplate -filename "%TEMP%\MarketingCampaign.stp" -title "MarketingCampaign.stp"
"%SPAdminTool%" -o addtemplate -filename "%TEMP%\NewStoreOpening.stp" -title "NewStoreOpening.stp"
"%SPAdminTool%" -o addtemplate -filename "%TEMP%\ProductPlanning.stp" -title "ProductPlanning.stp"
"%SPAdminTool%" -o addtemplate -filename "%TEMP%\RequestForProposal.stp" -title "RequestForProposal.stp"
"%SPAdminTool%" -o addtemplate -filename "%TEMP%\SportsLeague.stp" -title "SportsLeague.stp"
"%SPAdminTool%" -o addtemplate -filename "%TEMP%\TeamWorkSite.stp" -title "TeamWorkSite.stp"
"%SPAdminTool%" -o addtemplate -filename "%TEMP%\TimecardManagement.stp" -title "TimecardManagement.stp"

"%SPAdminTool%" -o execadmsvcjobs

PAUSE
REM **********************END BAT FILE**********************

1 comment:

  1. Awesome!!! Worked like a charm!!!

    ReplyDelete