Re: Looking for a VB Script to set share permissions
From: Torgeir Bakken (MVP) (Torgeir.Bakken-spam@hydro.com)
Date: 02/21/03
- Next message: Roger Abell [MVP]: "Re: hidden user id"
- Previous message: geot: "hidden user id"
- In reply to: kajaa: "Looking for a VB Script to set share permissions"
- Next in thread: kajaa: "Re: Looking for a VB Script to set share permissions"
- Reply: kajaa: "Re: Looking for a VB Script to set share permissions"
- Reply: kajaa: "Re: Looking for a VB Script to set share permissions"
- Reply: Brian W: "Re: Looking for a VB Script to set share permissions"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
From: "Torgeir Bakken (MVP)" <Torgeir.Bakken-spam@hydro.com> Date: Fri, 21 Feb 2003 04:05:09 +0100
kajaa wrote:
> please write (or find) a VB Script sample to share the folder C:\, and
> permit READONLY to Administrators,
Hi
See "Create a Network Share" in the section "Files and Folders" at TechNet
Script Center
http://www.microsoft.com/technet/scriptcenter
To set rights on shares/folders (I recommend using the command line utility
SetACL for this):
===========================================================
ADSI:
You can use IADsSecurityUtility's SetSecurityDescriptor method to set the
security descriptor on a specified file, file share, or registry key object.
http://msdn.microsoft.com/library/en-us/netdir/adsi/iadssecurityutility_setsecuritydescriptor.asp
===========================================================
WMI:
Platform SDK: Windows Management Instrumentation
SetSecurityDescriptor Method in Class Win32_LogicalShareSecuritySetting
http://msdn.microsoft.com/library/en-us/wmisdk/wmi/setsecuritydescriptor_method_in_class_win32_logicalsharesecuritysetting.asp
From: [MS] Tim Chen (timchen2000@hotmail.com)
Subject: Re: Folder Security
Newsgroups: microsoft.public.win32.programmer.wmi
Date: 2002-06-13 13:06:05 PST
http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&oe=UTF-8&selm=3d08f9d7%241%40news.microsoft.com
From: Max L. Vaughn (maxvonline@microsoft.com)
Subject: RE: Add User to sharefolder
Newsgroups: microsoft.public.platformsdk.adsi
Date: 2001-11-16 14:01:51 PST
http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&oe=UTF-8&selm=ejzoroubBHA.253%40cppssbbsa01.microsoft.com
===========================================================
Command line, you can shell out from a vbscript with e.g. the Run method
SETACL at http://www.helge.mynetcologne.de/setacl/ , a nice freeware
app that adds a lot to cacls and xcacls.
SetACL can set permissions on:
Local or remote directories
Local or remote files
Local or remote printers
Local or remote registry keys
Local or remote Win32 services
Local or remote network shares
Be sure to add permissions, and not replace them.
>From the "Windows NT/2000 FAQ" site at http://www.windows2000faq.com/
Q. How can I modify share permissions from the command line?
http://www.windows2000faq.com/Articles/Index.cfm?ArticleID=14459
Q. How do I create a network share?
http://www.windows2000faq.com/Articles/Index.cfm?ArticleID=14842
-- torgeir Microsoft MVP Scripting and WMI, Porsgrunn Norway Administration scripting examples and a ONLINE version of the 1328 page Scripting Guide: http://www.microsoft.com/technet/scriptcenter
- Next message: Roger Abell [MVP]: "Re: hidden user id"
- Previous message: geot: "hidden user id"
- In reply to: kajaa: "Looking for a VB Script to set share permissions"
- Next in thread: kajaa: "Re: Looking for a VB Script to set share permissions"
- Reply: kajaa: "Re: Looking for a VB Script to set share permissions"
- Reply: kajaa: "Re: Looking for a VB Script to set share permissions"
- Reply: Brian W: "Re: Looking for a VB Script to set share permissions"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|