I had the same question today: "how do you change the path to an IIS6 vdir using the command line?"
My solution was to make my own vbs. To use it just pass the vdir name and path. So if I had a vdir called "Web" and wanted to change the path to "d:\theNewPath\to\Website", then I would run the following command in the command prompt:
updateVDirPath web d:\theNewPath\to\Website
Also, to check the path of the Vdir, just pass the vdir name:
updateVDirPath web
So here are the contents to updateVDirPath.vbs
If WScript.Arguments.Count = 0 or WScript.Arguments.Count > 2 Then
WScript.Echo "To check the vDirs path, call updateVDirPath <vDir>" & vbCrLf & "To update the vDir's path, call updateVDirPath <vDir> <newPath>"
Else
set providerObj = GetObject("winmgmts://localhost/root/MicrosoftIISv2")
set IIsWebVirtualDirSettingObj = providerObj.get("IIsWebVirtualDirSetting='W3SVC/1/ROOT/" & WScript.Arguments(0) & "'")
If WScript.Arguments.Count = 1 Then
WScript.Echo "Current path is: " & IIsWebVirtualDirSettingObj.Path
Else
IIsWebVirtualDirSettingObj.Path = WScript.Arguments(1)
IIsWebVirtualDirSettingObj.Put_ ()
End If
End If