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!
0 Comments   [ + ] Show Comments

Comments

Please log in to comment

Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.

Answers

0
I'm pretty sure there are vbscripts already that do this, use the search.
Answered 02/09/2009 by: aogilmor
Ninth Degree Black Belt

Please log in to comment
0
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.
Answered 02/10/2009 by: VBScab
Red Belt

Please log in to comment
0
Hi,

You can set permission using Setacl through Vb script.
http://setacl.sourceforge.net/html/examples.html.
Answered 02/10/2009 by: shweta_kar
Blue Belt

Please log in to comment
Answer this question or Comment on this question for clarity