If you haven’t heard of psexec, it’s an easy to use remote control solution, and it’s free on Microsoft’s site.
I needed to remotely register DLLs during a TFS build process. I’d been banging my head for a while, trying to figure it out through various solutions, including creating custom objects derived from the Activity class.
In the end, I used psexec, and this is the syntax I used:
psexec \\SweetSystem.mycompany -u SweetSystem\Scott-p myPassword regsvr32.exe /s C:\RptLabel.dll
I created a user account with Administrator privileges on the machine on which the DLLs would be registered. I designated that account using the “/u” switch. I added the account’s password using the “/p” switch, then added the command. In this case, I added the “/s” switch to suppress the confirmation box that appears after regsvr32 is used.
So I’ve got a new weapon in my technology holster. Hopefully, that will save someone else some time.