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?

0 Comments   [ - ] Hide 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.
Answer this question or Comment on this question for clarity


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
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

You can set permission using Setacl through Vb script.
Answered 02/10/2009 by: shweta_kar
Blue Belt

Please log in to comment