How to change owner of an object ? 
Author Message
 How to change owner of an object ?

Can someone tell me a way to change owner of ,for example, a folder or file
using WSH and VBScript ?

I know there is a utility XCACLS.EXE in Windows NT Resource Kit, which can
do it easily (O access right), but resource kit is not always available.



Sun, 25 Feb 2001 03:00:00 GMT  
 How to change owner of an object ?
You can create your own AX control that will access the WIN32API to modify
and read ACLs
But this means some work if you're a newbie with C/C++

Xcacls is well suited for use in a scripting file, but as you say it's not
always available...

Quote:

>Can someone tell me a way to change owner of ,for example, a folder or file
>using WSH and VBScript ?

>I know there is a utility XCACLS.EXE in Windows NT Resource Kit, which can
>do it easily (O access right), but resource kit is not always available.



Mon, 26 Feb 2001 03:00:00 GMT  
 How to change owner of an object ?
I have a question about that if you don't mind.   I'm using VB to create an
ActiveX dll so I can get to the WIN32API.  I have a class module with my
functions and they call the Win32 functions which are defined in a standard
module.  I may could have just put the Win32 calls in the class module but
for what ever reason I didn't.(I had all my Win32 calls in a .bas file so it
made it easier)  Is this the right way to make Win32 calls available to
VBScript?  The big one I'm trying to get working is LogonUser which just
won't return the TokenHandle I need for the ImpersonateUser function.  I can
get my homemade functions (not using Win32 calls) in the Class Module to
work fine from VBScript and the Win32 calls work fine when I access them
from a test VB project, but it just dies on the VBScript page.  I've added
code to test the data types but that doesn't seem to be the problem.  The
problem seems to be the critical phToken is ByRef in Win32 and that's giving
me trouble getting that back to VBScript.  Any basics on how to get Win32
calls into VBScript would be most appreciated.

Thanks,

John Granade


Quote:
>You can create your own AX control that will access the WIN32API to modify
>and read ACLs
>But this means some work if you're a newbie with C/C++

>Xcacls is well suited for use in a scripting file, but as you say it's not
>always available...


>>Can someone tell me a way to change owner of ,for example, a folder or
file
>>using WSH and VBScript ?

>>I know there is a utility XCACLS.EXE in Windows NT Resource Kit, which can
>>do it easily (O access right), but resource kit is not always available.



Tue, 27 Feb 2001 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Change owner of a message item?

2. Where can I find a good Owner Drawn Combo and Owner Drawn TextBox

3. Changing the file/folder owner in NTSF?

4. Change Folder Owner w/ VB.Net

5. Change Folder Owner w/ VB.NET

6. Changing the Owner of an Access Database

7. Changing Window Owner

8. Change Folder Owner Using VB

9. Set Owner of Files and Directorys

10. Looking for help from a HP 8100/8100 printer owner

11. Securing ASP page from server owner

12. obtaining the owner of a file

 

 
Powered by phpBB® Forum Software