Hi,
I need to get permissions associated with a file in VB.
I can use Cacls command in Command prompt and re-direct the output to a file.
For eg:
cacls c:\test.doc > c:\permissions.out
A file called permissions.out gets created and the permission information for test.doc gets written into this file.
But the same statement does not work when I use
Shell("cacls c:\test.doc > c:\permissions.out"
in my VB code. permissions.out file does not get created.
I tried the same in run command( start->run).Here also I gave
cacls c:\test.doc > c:\permissions.out
but it did not work.
Any idea how to pass parameters and to re-direct the output using such commands using Shell function in VB?
Or is there any other function(VB or Windows API) which will return the Access Control List(ACL) associated with a file or folder?
Thanks for reading this.
I need to get permissions associated with a file in VB.
I can use Cacls command in Command prompt and re-direct the output to a file.
For eg:
cacls c:\test.doc > c:\permissions.out
A file called permissions.out gets created and the permission information for test.doc gets written into this file.
But the same statement does not work when I use
Shell("cacls c:\test.doc > c:\permissions.out"
I tried the same in run command( start->run).Here also I gave
cacls c:\test.doc > c:\permissions.out
but it did not work.
Any idea how to pass parameters and to re-direct the output using such commands using Shell function in VB?
Or is there any other function(VB or Windows API) which will return the Access Control List(ACL) associated with a file or folder?
Thanks for reading this.