Thursday, October 30, 2008

%~dp0 SharePoint 2007 Visual Studio Extensions setup.bat

Have you seen "set PackageFile=%~dp0" preceeding the sharepoint solution name in setup.bat?
%~dp0" macro resolves to the fully expanded path to the directory containing the batch file.
This allows batch files to run regardless of the current working directory.

Thursday, October 23, 2008

How to replace files in Sharepoint Solution wsp file

  1. Change the .wsp extension to .cab ( eg. mySol.wsp to mySol.cab )
  2. Open with winzip and Extract to a directory eg. c:\kopperla\Ext
  3. Repace the files that you want to change.
  4. Download Microsoft Cabinet Software Development Kit (cabdsk.exe) from http://www.pixelsplasher.com/_downloads/software/Microsoft-Cabinet-SDK/
  5. Run cabdsk.exe and extract the files to a folder eg. c:\koppela\cabdsk
  6. From the command prompt cd c:\kopperla\cabdsk\bin
  7. Run the following command
  8. cabarc -r -p -P "kopperla\Ext\\" n mySol.wsp c:\kopperla\Ext\*.*
  9. The new solution mySol.wsp is created in c:\kopperla\cabsk\bin directory.