|
| |||||||||
| Tags: change permission, no access, read only, vbscript |
![]() |
| | Thread Tools | Search this Thread |
|
#1
| ||||
| ||||
| How to Change Permission in VBScript
I have some files of which security permissions have set for "no access" to everyone and i wanted to remove those permission and to allow "read only" permission on each temp folder, and could we apply this to the number of computer, such as I have 20 to 25 computer in each workgroup, and am trying to give this permission with the help of VBscript.... please suggest your opinion. |
|
#2
| ||||
| ||||
| Re: How to Change Permission in VBScript
The following Xcacls.vbs are the VBScript commands that provide some examples of Xcacls.vbs usage. Quote:
Quote:
xcacls.vbs c:\test\readme.txt /o "machinea\group1". This command changes the owner of Readme.txt to be the group MachineA\Group1. |
|
#3
| |||
| |||
| Re: How to Change Permission in VBScript
It is not that hard for VBScript which grant permissions on folder/file NTFS formatted drive. You Just need to modify/tweak the script as per the requirements and follow various options available with CACLS. Code: This script will assign Modify/C-Change (write) Permission To Power User on "C:\MyFolder" using cacls on NTFS formatted drive
Dim oShell, FoldPerm, Calcds, oFSO
Set oFSO = CreateObject("Scripting.FileSystemObject")
Set oShell = CreateObject("WScript.Shell")
sSysDir = oFSO.GetSpecialFolder(1).Path
If Right(sSysDir,1) <> "\" Then sSysDir = sSysDir & "\"
Calcds = sSysDir & "cacls.exe"
'Chang The folder Name, User and Access rights in the following line of code
FoldPerm = """" & Calcds &"""" & """C:\MyFolder""" & " /E /T /C /G " & """Power Users""" & ":C"
oShell.Run FoldPerm, 1 ,True |
|
#4
| |||
| |||
| Re: How to Change Permission in VBScript Quote:
Quote:
|
![]() |
|
| Thread Tools | Search this Thread |
| |
Similar Threads for: "How to Change Permission in VBScript" | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| ADMT 3.1 vbscript : ADMT.Migration object creation permission deni | Scan le Gentil | Active Directory | 1 | 02-12-2009 09:55 PM |
| need vbscript to pull explicit assigned permission on folder which are not inherited | vivekmohan | Software Development | 2 | 30-07-2009 06:14 PM |
| how to pull NTFS security permission in vbscript | vivekmohan | Software Development | 3 | 25-07-2009 02:28 PM |
| Microsoft VBScript runtime error: Permission denied: 'GetObject' | Swati_here_2008 | Software Development | 3 | 05-05-2008 02:57 PM |
| VBScript runtime error: 800A0046 Permission denied: 'GetObject'" | Jerrald Noland | Active Directory | 6 | 08-03-2006 02:41 AM |