Deploying self-registering Windows COM DLLs

Hi, I’m a developer new to Ansible. My operations team is asking that I look into Ansible as a replacement for our use of Windows Installer technologies (MSI) to deploy our internal applications. They like that after installation, the playbooks can be used to ensure the installation integrity. We are deploying into Windows machines.

One of the things I’m trying to figure out is the best (proper?) way to deploy and subsequently update a DLL that contains self-registering logic for COM objects, which means the DLL has methods for registering (adding registry entries) and un-registering (removing those entries).

In particular, I’m curious about the following concerns:

  • How to get Ansible to have the DLL execute its self-registration logic on initial deployment
  • When updating, how to have the old DLL un-register itself before a copy, and the new one to register itself after a copy
  • How to ensure integrity of registry entries on an on-going basis when the file itself hasn’t changed
  • Is it better to try to extract all the self-registration logic out of the DLL and instead have manual registry entries (this can be challenging to do since much of self-registration is baked into the Windows development frameworks like ATL, .NET Com interop, etc.)

Thanks for any suggestions! We are excited about Ansible but this is a potential barrier to adoption for us.

-John