Is there a way to download projects from TFS using VBScript?
Is there a way to download proje开发者_开发技巧cts from TFS using VBScript?
You can build a command line that runs tf.exe with the appropriate options & use the shell object to execute it. The sample below is an (untested) bastardised mash of a couple of things we have laying around. (the basic form is from a .vbs set up to do copying among network shares & the TFS command line is from a nightly build batch file)
Dim strCmd
Dim objShell
Set objShell = WScript.CreateObject("WScript.Shell")
strCmd = "C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE>tf get ""$/<Project Name>/Trunk/NET/<Application>"" /force /recursive"
objShell.Exec(strCmd & " > c:\temp\get.log ")
Why do you want to use VBScript and not powershell? That is the supported way: http://blogs.msdn.com/b/granth/archive/2010/01/12/tfs2010-invoking-tfs-web-services-using-powershell.aspx
精彩评论