2013-08-07 39 views

回答

0

this thread上svnforum.org這樣的事情應該工作:

Set svn = GetObject("winmgmts://./root/VisualSVN") 
Set wmi = GetObject("winmgmts://./root/cimv2") 

Set accessLevel = CreateObject("Scripting.Dictionary") 
accessLevel.Add 0, "No Access" 
accessLevel.Add 1, "Read Only" 
accessLevel.Add 2, "Read/Write" 

For Each sd In svn.ExecQuery("SELECT * FROM VisualSVN_SecurityDescriptor") 
    For Each perm in sd.Permissions 
    Set account = wmi.Get("Win32_SID.SID='" & perm.Account.SID & "'") 
    WScript.Echo sd.AssociatedObject & ": " _ 
     & account.AccountName & "\" & account.ReferencedDomainName & " " _ 
     & accessLevel(perm.AccessLevel) 
    Next 
Next