set folder security with vbs
hi all,
i would like to add a custom action into my msi to run an embedded vbs script to change the security of a local folder.
i don't wish to use cacls.exe, only vbs.
could it be done?
thanks!
i would like to add a custom action into my msi to run an embedded vbs script to change the security of a local folder.
i don't wish to use cacls.exe, only vbs.
could it be done?
thanks!
0 Comments
[ + ] Show comments
Answers (3)
Please log in to answer
Posted by:
aogilmor
15 years ago
Posted by:
anonymous_9363
15 years ago
i don't wish to use cacls.exe, only vbs.Well, that would be a neat trick, since VBScript has zero support for setting permissions.
At some point, you will need to call either a command line tool (like CACLS [XCACLS is light years easier to use, BTW, and it does registry permissions which CACLS doesn't], SetACL, etc) or you'll need to to use the ADsSecurity objects. This http://cwashington.netreach.net/depo/view.asp?Index=360&ScriptType=vb is a nice VBS file which uses those. If you wanted to go that route, your package will need to install and register ADsSecurity.DLL (and probably its companions ADsError.DLL and...I've forgotten, but they're in the ADSI SDK, too).
I converted the script to a class file ages ago so that I could re-use it for other projects. And no, I won't post copies to anyone.
Posted by:
shweta_kar
15 years ago
Hi,
You can set permission using Setacl through Vb script.
http://setacl.sourceforge.net/html/examples.html.
You can set permission using Setacl through Vb script.
http://setacl.sourceforge.net/html/examples.html.
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
so that the conversation will remain readable.