H
Harry Jega Nathan
I want to create a VBScript (vbs) to create a share
folder and then set permission on for user access.
My code goes like this.
Set FS = CreateObject("Scripting.FileSystemObject")
If Not FS.FolderExists("E:\Users\harryj") Then
FS.CreateFolder("E:\Users\harryj")
End If
Set ShareSrvObj = GetObject
("WinNT://myserver1/LANMANSERVER")
Set NewShareObj = ShareSrvObj.Create("fileshare", "harryj")
NewShareObj.Path = "D:\Users\harryj"
NewShareObj.MaxUserCount = 1
NewShareObj.SetInfo
Now I don't know how to set the permission on this folder.
I want to remove 'everyone' group from this share and give
permission to user 'harryj' fullaccess
Please help me
Thanks
Harry
folder and then set permission on for user access.
My code goes like this.
Set FS = CreateObject("Scripting.FileSystemObject")
If Not FS.FolderExists("E:\Users\harryj") Then
FS.CreateFolder("E:\Users\harryj")
End If
Set ShareSrvObj = GetObject
("WinNT://myserver1/LANMANSERVER")
Set NewShareObj = ShareSrvObj.Create("fileshare", "harryj")
NewShareObj.Path = "D:\Users\harryj"
NewShareObj.MaxUserCount = 1
NewShareObj.SetInfo
Now I don't know how to set the permission on this folder.
I want to remove 'everyone' group from this share and give
permission to user 'harryj' fullaccess
Please help me
Thanks
Harry