Set Owner of Files and Directorys 
Author Message
 Set Owner of Files and Directorys

Hi,

i'm search way to set a new owner for a file or an Directory under
Windows2000 or Windows/XP. i know that i'm must owner of the self group who
the user that i take the ownership of a file or Directory.

Has everydoy a tip for me.

Thanks Torsten



Sat, 04 Sep 2004 03:38:01 GMT  
 Set Owner of Files and Directorys
You will probably have to look into ADSI...Sorry haven't got any examples...must be plenty around though!
Quote:

> Hi,

> i'm search way to set a new owner for a file or an Directory under
> Windows2000 or Windows/XP. i know that i'm must owner of the self group who
> the user that i take the ownership of a file or Directory.

> Has everydoy a tip for me.

> Thanks Torsten




Sat, 04 Sep 2004 07:35:16 GMT  
 Set Owner of Files and Directorys

Quote:

> Hi,

> i'm search way to set a new owner for a file or an Directory under
> Windows2000 or Windows/XP. i know that i'm must owner of the self group who
> the user that i take the ownership of a file or Directory.

Hi

SUBINACL from the resource kit should do the job (can be run from a VBScript if
necessary):

subinacl /noverbose /file \\server\share\dir /setowner=whoever
subinacl /noverbose /subdirectories \\server\share\dir\* /setowner=whoever

You can use ADSI as well, using the ADsSecurity.dll from the ADSI SDK if you are
running Windows2000 or if you are running on XP, use the
CreateObject("ADsSecurityUtility") interface.

Here is a thread that shows how to do it with ADSI:


Subject: Changing File Ownership
Newsgroups: microsoft.public.scripting.vbscript
Date: 2001-06-13 08:02:46 PST

You can use http://groups.google.com/advanced_group_search to fetch it :-)

Tip: You can use Google to search in a news database having articles dated back
to all the way to 1981. Fill in *scripting in the Newsgroup field to narrow down
the search to the scripting groups only.

--
torgeir



Sat, 04 Sep 2004 08:40:05 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Freelance s/w developer avail. - MIT ’87 - C++/Unix/NT/Internet/SQL/Sybase DBA/Telephony

2. Help with directorys and making directorys

3. Help With Directorys and Making Directorys

4. Setting File-Owner via WSH ?

5. help; copying files and directorys

6. files and directorys coping in VB5

7. searching easy directorys, subdirectorys and files demo!...

8. How can you populate a tree view control with the files and directorys of a disk

9. Set owner permissions in exchange 5.5 with Vbscripting

10. JUSTIN KRAMER!

11. VBA setting of custom folder item owner field

12. Setting Application's Owner and Parent

 

 
Powered by phpBB® Forum Software