Saturday, January 23, 2010

Remove DLL Register/Unregister Using PsExec

Problem:

You want to register or unregister a .DLL file on a remote computer, but
you do not want to (or cannot) remote in with Carbon Copy, Remote
Desktop, etc.

Solution:

Use Microsoft Sysinternals "PSEXEC" to invoke the process remotely.
How:

  1. Download psexec.exe from http://live.sysinternals.com/tools and save
    it to a folder on your C: drive
  2. Open a CMD console using RunAs and your Admin-level account
  3. Collect information to get started:
            - Computer Name (remote computer)
            - Path and Name of the .DLL file
  4. Run the psexec.exe utility with the appropriate syntax...

To Register a "DllName.dll" file residing in the C:\Windows\System32
folder on "Computer1"...

Psexec \\Computer1 regsvr32 /s c:\windows\system32\dllname.dll

To Unregister the same .DLL file...

Psexec \\Computer1 regsvr32 /u /s c:\windows\system32\dllname.dll

Post a Comment