Discussion in 'Web Design, HTML And CSS' started by sweetyarun, Mar 19, 2008.

  1. sweetyarun

    sweetyarun New Member

    Mar 14, 2008
    Likes Received:
    Trophy Points:
    Hi all
    i have to give folder permission through vbscript.
    I have a share folder name "test".I have to remove "everyone" group from this folder and add "authenticated users" full control.
    i have to run this script on remote computer.( thru terminal services and then run)
    strComputer = "."
    Dim strHomeFolder, strHome, strUser
    Dim intRunError, objShell, objFSO
    strHomeFolder = "c:\apps\test"
    Set objShell = CreateObject("Wscript.Shell")
    Set objFSO = CreateObject("Scripting.FileSystemObject")
    If objFSO.FolderExists(strHomeFolder) Then
    intRunError = objShell.Run("%COMSPEC% /k Echo Y| cacls "& strHomeFolder &" /T /C /G "Authenticated users":F ", 2, True)
       If intRunError <> 0 Then
       Wscript.Echo "Error assigning permissions for user " _
       & strUser & " to home folder " & strHomeFolder
       End If
    End If
    Please help me i need it very urgently.
    Many thanks in advance
    Last edited by a moderator: Mar 20, 2008

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice