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?
Asked
Active
Viewed 820 times
4 Answers
0
You could use PowerShell v2 remoting via an MSBuild PowerShell task
Community
- 1
- 1
Ruben Bartelink
- 59,778
- 26
- 187
- 249
0
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
- 11,998
- 1
- 34
- 57
0
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
- 4,791
- 4
- 39
- 52
0
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
- 4,791
- 4
- 39
- 52