Tuesday, April 21, 2009

MS-DOS script to remove a SharePoint solution

If you have a SharePoint solution (i.e. .WSP) that you'd like to remove then you could build a 4-step script to run in a MS-DOS script as follows. Just substitute the name of your .wsp file in both places here where it says MySolution.wsp.


"C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o retractsolution -name MySolution.wsp -immediate -allcontenturls

"C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o execadmsvcjobs

"C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o deletesolution -name MySolution.wsp -override

"C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o execadmsvcjobs

No comments:

Post a Comment