I am currently still fiddling with our msbuild & deployment script and one of the steps is to register a (legacy) com component on the machine the code is deployed to. Is there any 'elegant' way to accomplish this or would I have to call the regsvr32.exe via wmi on the remote machine?
A:
You could use PowerShell v2 remoting via an MSBuild PowerShell task
Ruben Bartelink
2009-12-18 10:35:24
A:
You can use PsExec (from formerly SysInternals - but now part of Microsoft) to execute shell commands on remote machines.
Just use a standard MSBuild Exec task that wraps PsExec.
Wim Hollebrandse
2009-12-18 10:40:40
A:
As part of your build you could create an MSI that installs your COM component (e.g. using WiX -- Votive has msbuild support).
Then you'd run the installation on the remote machine by invoking the Win32_Product.Install method.
Daryn
2010-02-03 22:42:59
A:
You could manually perform the COM component registration by using the StdRegProv WMI class to write to the registry on the remote machine (i.e. create the HKLM\CLSID{guid} entries, etc)
Daryn
2010-02-03 22:46:58