Hello,

Here are some examples of using DCOMPERM.EXE to grant dcom permissions to a 
domain user.

You'll need to find a copy of DCOMPERM.exe from somewhere.  I believe it is 
included as source code in Windows SDKs but I think I just found a compiled 
version somewhere and downloaded it.  In the examples {{ deploy_dir }} is a 
folder on the windows machine where I put software components to be 
installed.  Its pretty small so can probably be installed via win_copy 
module.  Once you have DCOMPERM.exe on your windows targets here are the 
examples.

- name: run Dcomperm to allow domain user launch
  raw: "{{ deploy_dir }}DComPerm.exe -dl set {{ win_domain }}\\{{ win_user 
}} permit level:l,r"

- name: run Dcomperm to allow domain user activation
  raw: "{{ deploy_dir }}DComPerm.exe -da set {{ win_domain }}\\{{ win_user 
}} permit level:l,r"

- name: run Dcomperm to allow dcom component to specified by CLSID to 
launch as domain user
  raw: "{{ deploy_dir }}DComPerm.exe -al 
0AF3D1B3-2476-4635-6B27-13599AE7F248 set {{ win_domain }}\\{{ win_user }} 
permit level:r"

If you can find a system where your exe is installed successfully you might 
be able to find the dcom permissions you need by using the DCOMCNFG.EXE 
program.  Browse to Component services -> My Computer, right click and 
choose Properties, and switch to COM Security tab, then check all the 
Defaults and Limits.  Then browse to to Component services -> DCOM Config 
and find the dcom component you are interested in (if you don't know the 
name of it you can try searching through the registry for the CLSID - the 
component name will likely be in the parent key or nearby).  Once you have 
found the dcom component, right click and choose properties and click on 
the Security tab, and check all of the permissions are correct.

DCOM stuff is rather old now and I found it hard to get information on it 
that wasn't intended for programmers.

Hope this helps,

Jon

On Thursday, January 5, 2017 at 9:39:47 AM UTC, Ansible_Red wrote:
>
> Hi Hawkesworth,
>
> It would be great if you could show me something related to this with the 
> RAW module.
>
> Kr,
>
> Op woensdag 4 januari 2017 20:50:28 UTC+1 schreef J Hawkesworth:
>>
>> Sounds like the application you are trying to install contains a dcom 
>> component. You might need to find a copy of dcomperm.exe and use it to 
>> grant launch and activation to the user you are running as, or possibly to 
>> the user that the dcom component is configured to run as.
>>
>> I can dig out some examples of using dcomperm.exe to do something similar 
>> if you need.  Check the documentation for the exe to find out what dcom 
>> permissions it needs.
>>
>> My guess would be that the app is expecting to run as an interactive 
>> user, which you wont be running as under winrm, so you'll probably need to 
>> grant explicit dcom permissions before attempting to install.
>>
>> I can dig out some examples of using dcomperm.exe via raw module if you 
>> need.
>>
>> Hope this helps,
>>
>> Jon
>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/2d478357-8a54-45f2-8bcb-7d05965ef335%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to