Hi Everyone,
I'm creating a batch file for SharePoint deployment. The batch will do solutions installation and configuration, create a web application and restore the .dat
file on the created web application.
Instead of hard code the solutions path and .dat
I want batch to know it is on the root
. So, if I move this folder somewhere else I won't need to update the paths.
Is there any keyword of batch command which can tell where I stand (batch file directory)?
The batch script sample:
@SET STSADM="c:\program files\common files\microsoft shared\web server extensions\12\bin\stsadm"
Echo copy solution files ...
%STSADM% -o addsolution -filename SmilingGoat.SharePoint.WebParts.Rss.wsp
%STSADM% -o deploysolution -name SmilingGoat.SharePoint.WebParts.Rss.wsp -immediate -allowgacdeployment -allcontenturls
%STSADM% -o addsolution -filename ReturnOfSmartPartv1_3.wsp
%STSADM% -o deploysolution -name ReturnOfSmartPartv1_3.wsp -immediate -allowgacdeployment -allcontenturls
Echo creating Learning Pitch application ...
%STSADM% -o unextendvs -url http://server:70
%STSADM% -o restore -url http://server:70 -filename 2010.02.03.dat -overwrite
IISRESET
PAUSE
Thanks.