/build/static/layout/Breadcrumb_cap_w.png

Subinacl.vbs - different permissions if different domain

Hi,

I've got an action in the "Execute Deferred" section in "MSI Script" in Wise Packager.
It goes like this:
"cscript.exe "[%ProgramFiles]\APPNAME\Shared\xcacls.vbs" "[%ProgramFiles]\APPNAME\Shared" /E /G DOMAIN2\"DOMAIN2-SECURITYGROUP":XW"
This works fine, but my problem is that I have two domains, and I've had to make one package for each domain.
The only difference in the packages is the scripcommand above, which is going to be the same, except the domainname and securitygroup will be different.
I'd prefer to have only one package. Somehow I can't get this to work.
1. Is there a way to make a "if domain is domain1 - do add these permissions - if domain is domain2- do add these permissions" ?
2. I tried to add both permissiongroups (since I couldnt find a way to check which domain the server was in), but somehow I couldn't get it work.
Got errormessages that said that it couldn't find the security group. Could this be because the machines are in seperate domains? (to-way trust) or could it be the user I'm using to run the installation with? (a domain user from one Domain1)

Anybody got some input for me?

Thanks

0 Comments   [ + ] Show comments

Answers (6)

Posted by: anonymous_9363 15 years ago
Red Belt
0
You need to bone up on using the special CustomActionData property, in particular on passing multiple "elements" for use in the target Custom Action. You can then parse the property's content for the domain name and group in the script. It's far too lengthy to go into here again so have a search on AppDeploy for 'CustomActionData'.
Posted by: aogilmor 15 years ago
9th Degree Black Belt
0
I was able to populate the domain into a property and do this with the lockpermissions table for a package that had similar requirements - no need for 2 packages.
Just be aware of the lockpermissions table limitations. If you don't know what those are, Ian will gladly point them out to you! [:D]
Posted by: jgb 15 years ago
Orange Belt
0
Thanx, I will dig into custom actions and see what I can find out. aogilmor, how where you able to check which domain the machine belonged to?
Is there a command which can fetch this from the machines registry or similar?
Posted by: anonymous_9363 15 years ago
Red Belt
0
I haven't looked but I'd imagine that WMI will come to your aid here.
Posted by: aogilmor 15 years ago
9th Degree Black Belt
0
set a system search for hklm\System\CurrentControlSet\Services\TCPIP\Parameters\Domain. This is pretty easy with Wise, use the system search to add this value to a property. Use the property to set domain in Lockpermissions table.
Posted by: jgb 15 years ago
Orange Belt
0
Thanx guys! Works like a charm... [:D]
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ