Using psexec to remotely register a DLL

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.

Advertisements
  1. Leave a comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: