I used to call SetACL from my deployment tool, but now I'm at a place that wants to call it from the MSI.
I've streamed in the binary and set my command line (using -silent) and it works great, but it pops a blank CMD window for one second. It does this even if I drop SetACL.exe to the machine first as part of my package.
How are people calling it so it's silent? VBS? CMD /c?
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
Not an ideal way but, you can make a wse script and make it hidden, then call this script in the MSI with a /s
Answered 06/21/2006 by: bheers
Second Degree Blue Belt

Please log in to comment
0
Thanks for the suggestion. I'm actually not using Wise so I'm looking for a vendor neutral solution (ex. vbs) or one geared for Installshield.
Answered 06/21/2006 by: turbokitty
Sixth Degree Black Belt

Please log in to comment
-1
/silent option can be used.
it just pops up a command prompt and then the command window vanishes once it has set the permissions (hardly takes 5 secs).
Answered 06/21/2006 by: Lillude
Senior Purple Belt

Please log in to comment
0
Hi,

You could use Embeded JScript as a CustomAction.
Make sure the custom action runs as "Deferred Execution - System Context".

use the following JScript Code. Insert the fullpath to the executeable and parameters.
////////////////////

wshShell = new ActiveXObject("WScript.Shell");
wshShell.Run("full-path-to-executable and parameters",0,true);

///////////////////


peska
Answered 06/22/2006 by: peska
Senior Yellow Belt

Please log in to comment
0
Hi turbokitty,
have a look at: http://www.appdeploy.com/scripts/view.asp?id=523
There, i have posted the usage of 'setacl.ocx from within a MSI-Package.
Hope this helps.
Regards, Nick
Answered 06/22/2006 by: nheim
Tenth Degree Black Belt

Please log in to comment
0
Peska, your script won't work because my command line has quotes in it.. see below:

setacl.exe -on "c:\program files\my folder" -ot file -actn ace -ace "n:S-1-5-32-545;p:full;s:y" -actn clear -clr "dacl,sacl" -actn rstchldrn -rst "dacl,sacl" -silent

I'm not familiar with Jscript. Is there a way around that?


nheim,
Thanks for the link, I'll give yours a try next.

Thanks for the replies.
Answered 06/22/2006 by: turbokitty
Sixth Degree Black Belt

Please log in to comment
2
I wrote a little VBS.. getting the nested quotes right was interesting.

Calls SetACL from the local drive (SetACL delivered with MSI)
It assigns full control to the local user group to a folder called "targetfolder".
It logs the results.
All silent.

------------------------------------start vbs---------------------------
dim oWsh
Set oWsh = CreateObject("WScript.Shell")
oWsh.Run """C:\program files\setacl\setacl.exe"" -on ""c:\program files\targetfolder"" -ot file -actn ace -ace ""n:S-1-5-32-545;p:full;s:y"" -actn clear -clr ""dacl,sacl"" -actn rstchldrn -rst ""dacl,sacl"" -log ""c:\program files\setacl\setacl.log"" -silent", 0, True
------------------------------------end script-----------------------------------------------------------

Custom Action:
Streamed VBS into MSI
Asynchronous (no exit code)
Deferred Execution in System Context
Sequence: After Register Product
Answered 06/22/2006 by: turbokitty
Sixth Degree Black Belt

Please log in to comment
0
Nice one Kitty....I'll rate that a 2 for doing it yourself :)


ORIGINAL: turbokitty

I wrote a little VBS.. getting the nested quotes right was interesting.

Calls SetACL from the local drive (SetACL delivered with MSI)
It assigns full control to the local user group to a folder called "targetfolder".
It logs the results.
All silent.

------------------------------------start vbs---------------------------
dim oWsh
Set oWsh = CreateObject("WScript.Shell")
oWsh.Run """C:\program files\setacl\setacl.exe"" -on ""c:\program files\targetfolder"" -ot file -actn ace -ace ""n:S-1-5-32-545;p:full;s:y"" -actn clear -clr ""dacl,sacl"" -actn rstchldrn -rst ""dacl,sacl"" -log ""c:\program files\setacl\setacl.log"" -silent", 0, True
------------------------------------end script-----------------------------------------------------------

Custom Action:
Streamed VBS into MSI
Asynchronous (no exit code)
Deferred Execution in System Context
Sequence: After Register Product
Answered 06/23/2006 by: MSIMaker
Second Degree Black Belt

Please log in to comment
0
ORIGINAL: turbokitty

>> Peska, your script won't work because my command line has quotes in it.. see below:

To use quotes inside a string in JScript just precede the quote with a backslash.
(Also i Jscript remember to use double backslashes)

Example:
wshShell.Run("\"C:\\Program Files\\Internet Explorer\\Iexplore.exe\" \"C:\\Program Files\\Common Files\"",0,true);
Answered 06/26/2006 by: peska
Senior Yellow Belt

Please log in to comment
0
ORIGINAL: nheim

Hi turbokitty,
have a look at: http://www.appdeploy.com/scripts/view.asp?id=523
There, i have posted the usage of 'setacl.ocx from within a MSI-Package.
Hope this helps.
Regards, Nick



This URL redirects now. Do you happen to have this around on the site somewhere still? Thanks.
Answered 11/03/2008 by: schieb
Purple Belt

Please log in to comment
0
Sorry, the script library that was here was actually a mirror of one hosted at AdminScriptEditor.com. I know that that site's script database was lost a year or so ago. It has since been rebuilt and enhanced. It is very nice, but if you are looking for an old script it is probably no longer available. [:(]

http://www.adminscripteditor.com/SLP/
Answered 11/03/2008 by: bkelly
Red Belt

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