windows - Setting DCom Security settings in WiX -


i have need set dcom security via installer , wondering if there native way within wix. i'm looking grant user i'm creating upon installation access , launch , activate permissions via following dialog:

enter image description here

i accessed going control panel->administrative tools->component services. right clicking on computer->properties , going com security tab.

will have create custom action this?

i ended using utility platform sdk called dcomperm , using custom action in wix don't think functionality exists in wix. involved several steps since seems difficult download compiled tool.

i had following:

  1. download , install platform sdk
  2. create new empty c++ project in visual studio (i used 2010)
  3. add files in program files\microsoft platform sdk\samples\com\fundamentals\dcom\dcomperm project.
  4. change runtime library mt (multi-threaded). important because include necessary files in exe compiled. otherwise have install vc++ redistributable package use tool. see below screenshot on how enter image description here
  5. create custom action within wix run following 2 commands (exactamobile username):
    dcomperm.exe -dl set exactamobile permit
    dcomperm.exe -da set exactamobile permit

the following custom actions added wix:

<customaction id='grantdcomaccesspermissions'                directory='toolsfolder'                execute='deferred'                execommand='[toolsfolder]dcomperm.exe -da set exactamobile permit'                return='ignore'/>  <customaction id='grantdcomlaunchandactivatepermissions'               directory='toolsfolder'               execute='deferred'               execommand='[toolsfolder]dcomperm.exe -dl set exactamobile permit'               return='ignore'/>  <installexecutesequence>         <custom action="grantdcomaccesspermissions" after="installfiles">not installed</custom>   <custom action="grantdcomlaunchandactivatepermissions" after="installfiles">not installed</custom> </installexecutesequence> 

the following more complete usage list dcomperm:

syntax: dcomperm <option> [...]   options:      -da <"set" or "remove"> <principal name> ["permit" or "deny"]      -da list          modify or list default access permission list       -dl <"set" or "remove"> <principal name> ["permit" or "deny"]      -dl list          modify or list default launch permission list       -aa <appid> <"set" or "remove"> <principal name> ["permit" or "deny"]      -aa <appid> default      -aa <appid> list          modify or list access permission list specific appid       -al <appid> <"set" or "remove"> <principal name> ["permit" or "deny"]      -al <appid> default      -al <appid> list          modify or list launch permission list specific appid       -runas <appid> <principal name> <password>      -runas <appid> "interactive user"          set runas information specific appid    examples:      dcomperm -da set redmond\t-miken permit      dcomperm -dl set redmond\jdoe deny      dcomperm -aa {12345678-1234-1234-1234-00aa00bbf7c7} list      dcomperm -al {12345678-1234-1234-1234-00aa00bbf7c7} remove redmond\t-miken      dcomperm -runas {12345678-1234-1234-1234-00aa00bbf7c7} redmond\jdoe password   

hope finds useful considering had difficult time tracking down how this.


Comments

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -