Friday, October 8, 2010

Install.bat Part 2

Install.bat for VS 2008

A ready to use install.bat. The Xcopy part has been fully defined since it was not working properly in VS2008.

@SET TEMPLATEDIR="c:\program files\common files\microsoft shared\web server extensions\12\Template"
@SET STSADM="c:\program files\common files\microsoft shared\web server extensions\12\bin\stsadm"
@SET GACUTIL="C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin\GacUtil.exe"

Echo Copying files to TEMPLATE directory
xcopy "C:\Partha\Devarea\MyFeatureReceiver\MyFeatureReceiver1\MyFeatureReceiver1\TEMPLATE\*" "c:\program files\common files\microsoft shared\web server extensions\12\Template" /e /y

REM Echo Installing feature
REM %STSADM% -o InstallFeature -filename MyFeatureReceivers\feature.xml -force

REM Echo Uninstalling the DLL from GAC
REM %GACUTIL% /u MyFeatureReceiver1

Echo Installing the DLL in GAC
Echo %GACUTIL%
%GACUTIL% /i "C:\Partha\Devarea\MyFeatureReceiver\MyFeatureReceiver1\MyFeatureReceiver1\bin\Debug\MyFeatureReceivers.dll"

REM Echo Restart IIS Worker Process IISRESET
REM IISRESET


http://blah.winsmarts.com/2008-7-Authoring_SharePoint_2007_Workflows_using_VS2008.aspx
http://msdn.microsoft.com/en-us/library/bb466224(office.12).aspx

Install.bat - With Application pool Recycle in Visual Studio 2008

ECHO Installation in progress.........

@SET TEMPLATEDIR="C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE"
@SET STSADM="C:\program files\common files\microsoft shared\web server extensions\12\bin\stsadm"
@SET GACUTIL="C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin\gacutil.exe"
@SET APPPOL="C:\WINDOWS\system32\cscript.exe"
@SET IISVBS="C:\WINDOWS\system32\iisapp.vbs"

ECHO Copying files..........
rem xcopy /e /y TEMPLATE\* "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE"
xcopy /e /y TEMPLATE\* %TEMPLATEDIR%
ECHO Uninstalling the DLL from GAC
%GACUTIL% /u SimpleCustomApplicationPage1

ECHO Installing the DLL in GAC
%GACUTIL% /i "E:\Partha Projects\SP2007\Custome Application Pages\SimpleCustomApplicationPage1\SimpleCustomApplicationPage1\bin\Debug\SimpleCustomApplicationPage1.dll"

REM If we need to restart only the AppPool then
REM SET /P AppPoolName=[Please Enter the application pool name]
REM %APPPOL% %IISVBS% /a %AppPoolName% /r

ECHO Restart IIS Application Pool - Worker Process IISRESET
%APPPOL% %IISVBS% /a "SharePoint - 7070" /r

Another one
@echo off
ECHO Installation in progress.........

@SET TEMPLATEDIR="C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE"
@SET STSADM="C:\program files\common files\microsoft shared\web server extensions\12\bin\stsadm"
@SET GACUTIL="C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin\gacutil.exe"
@SET APPPOL="C:\WINDOWS\system32\cscript.exe"
@SET IISVBS="C:\WINDOWS\system32\iisapp.vbs"

ECHO Copying files..........
xcopy /e /y TEMPLATE\* %TEMPLATEDIR%
ECHO Uninstalling the DLL from GAC
%GACUTIL% /u MultiLingualListDefinition

ECHO Installing the DLL in GAC
%GACUTIL% /i "E:\Partha Projects\SP2007\CustomListDefinition\MultiLingualListDefinition\bin\Debug\MultiLingualListDefinition.dll"

Echo Installing Feature.......
%STSADM% -o installfeature -filename MLContentType\feature.xml -force
%STSADM% -o installfeature -filename MLStringListDefinition\feature.xml -force

REM Echo Activating Features...........
REM %STSADM% -o activatefeature -filename MLContentType\feature.xml
REM %STSADM% -o activatefeature -filename MLStringListDefinition\feature.xml


REM If we need to restart only the AppPool then
REM SET /P AppPoolName=[Please Enter the application pool name]
REM %APPPOL% %IISVBS% /a %AppPoolName% /r

ECHO Restart IIS Application Pool - Worker Process IISRESET
%APPPOL% %IISVBS% /a "SharePoint - 7070" /r

No comments:

Post a Comment