.comment-link {margin-left:.6em;}


Thursday, August 05, 2004

Sharepoint Exclude.vbs

If you have to develop websites on a machine running Microsoft Sharepoint on the same port, you always have to go to the Sharepoint Central Administration, browse your way to Define Managed Paths and exclude the path of the Visual Studio .NET project you are going to create.

I've created a little vbs-file, just open it and type the name of the path you want to exclude.
Here's the source (just copy it and paste it in a file called Exclude.vbs):

Dim strProjectName
strProjectName = Inputbox("Project Name?","")

If strProjectName <> "" Then
Set WShell = CreateObject("WScript.Shell")
WShell.Run """C:\Program Files\Common Files\Microsoft Shared\web server extensions\60\BIN\stsadm.exe""" & " -o addpath -url http://localhost/" & strProjectName & " -type exclusion"
Msgbox("No Project Name" &amp; vbcrlf & "Quitting")
End If

I know, it's very easy, but it's a little time-saver for me...


Post a Comment

Links to this post:

Create a Link

<< Home

Stefanie Worm is het liefste vrouwtje van de wereld.
Melina is de liefste schatsie van de wereld (Erik De Maeyer).