Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Register DLL Remotely

Posted on 2009-06-29
6
3,943 Views
Last Modified: 2012-05-07
Ok, Trying to register some DLLs remotely.  I am using sysinternals psexec, and reserv32.  When I attempt to run my script I wrote for this, I get:

"resvr32 exited on [computer] with error code 3"

The original DLL's are on my machine (where the script is running) under c:\dll\
Here is the script

REM Make Local DLL Path
mkdir \\192.168.2.112\C$\dll
mkdir \\192.168.2.50\c$\dll
mkdir \\192.168.2.143\c$\dll
mkdir \\192.168.2.125\c$\dll
REM Copy DLL's
xcopy c:\dll\*.dll \\192.168.2.112\C$\dll
xcopy c:\dll\*.dll \\192.168.2.50\c$\dll
xcopy c:\dll\*.dll \\192.168.2.143\c$\dll
xcopy c:\dll\*.dll \\192.168.2.125\c$\dll
REM Register DLL
psexec \\192.168.2.112 -u domain\administrator -p (password) regsvr32 /s c:\dll\*.dll
psexec \\192.168.2.125 -u domain\administrator -p (password) regsvr32 /s c:\dll\*.dll
psexec \\192.168.2.143 -u domain\administrator -p (password) regsvr32 /s c:\dll\*.dll
psexec \\192.168.2.50 -u domain\administrator -p (password) regsvr32 /s c:\dll\*.dll

The directories create correctly, and files copy, but the do not register (get error 3 on each), which as far as I can tell is a path not found error.

Any suggestions would be greatly appreciated
Thanks,
JJ


Also notice that I made the path to the dll's the same as they are on the executing PC, as I cannot tell if the regsvr32 is choosing the path to my local PC or to the remote PC's c:\dll\*.dll.  Also can confirm that the dll's are on the units under the said dir.
0
Comment
Question by:JamesonJendreas
  • 2
  • 2
  • 2
6 Comments
 
LVL 1

Author Comment

by:JamesonJendreas
ID: 24740169
OK, so I tweaked the script to:

xcopy c:\dll\*.dll \\192.168.2.112\c$\windows\system32
xcopy c:\dll\*.dll \\192.168.2.50\c$\windows\system32
xcopy c:\dll\*.dll \\192.168.2.143\c$\windows\system32
xcopy c:\dll\*.dll \\192.168.2.125\c$\windows\system32
REM Register DLL
psexec \\192.168.2.112 -u domain\administrator -p (password) regsvr32 /s c:\windows\system32\U2ltdate.dll
psexec \\192.168.2.112 -u domain\administrator -p (password) regsvr32 /s c:\windows\system32\U2lcom.dll

psexec \\192.168.2.50 -u domain\administrator -p (password) regsvr32 /s c:\windows\system32\U2ltdate.dll
psexec \\192.168.2.50 -u domain\administrator -p (password) regsvr32 /s c:\windows\system32\U2lcom.dll

psexec \\192.168.2.143 -u domain\administrator -p (password) regsvr32 /s c:\windows\system32\U2ltdate.dll
psexec \\192.168.2.143 -u domain\administrator -p (password) regsvr32 /s c:\windows\system32\U2lcom.dll

psexec \\192.168.2.125 -u domain\administrator -p (password) regsvr32 /s c:\windows\system32\U2ltdate.dll
psexec \\192.168.2.125 -u domain\administrator -p (password) regsvr32 /s c:\windows\system32\U2lcom.dll

Now am receiving error code 4
0
 
LVL 66

Expert Comment

by:johnb6767
ID: 24740417
Save the code snippet as register.bat,  in your PSEXEC working directory. save the dll's as well.....

psexec \\192.168.2.50 -u domain\administrator -p (password) -c register.bat

Thought I would offer an easier method..... Just create a batch file in the context of the renmote machine, and use the -c switch....

And stop switching questions......  Youre confusing me.... :^)
REM Make Local DLL Path
mkdir c:\dll 
 
REM Copy DLL's
xcopy "\\server\share\*.dll" "c:\dll\"
 
REM Register DLL's
regsrv32 /s *.dll
exit

Open in new window

0
 
LVL 66

Accepted Solution

by:
johnb6767 earned 500 total points
ID: 24740441
Or try this.....

Try the -w switch.....

psexec \\192.168.2.50 -u domain\administrator -p (password) -w "c:\dll\" c:\windows\system32\regsvr32 /s *.dll
0
DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

 
LVL 1

Author Comment

by:JamesonJendreas
ID: 24740443
Thanks for responding on this thread, previous one is going to be deleted, and I will be able to assign points.  I'll try this!
0
 
LVL 8

Expert Comment

by:RGRodgers
ID: 33875180
Restore may be best, but have you tried registering the dll?  In fact, you may want to do this to ensure you have them all registered:  (Q_22982185)
open a command prompt and navigate to %SystemRoot%\System32
then type the following command to register all DLL files in System32:
for %s in (*.dll) do regsvr32 /s %
Then reboot.
0
 
LVL 8

Expert Comment

by:RGRodgers
ID: 33875193
Sorry, wrong thread...
0

Featured Post

The New “Normal” in Modern Enterprise Operations

DevOps for the modern enterprise offers many benefits — increased agility, productivity, and more, but digital transformation isn’t easy, especially if you’re not addressing the right issues. Register for the webinar to dive into the “new normal” for enterprise modern ops.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Can I legally transfer my OEM version of Windows to another PC?  (AKA - Can I put a new systemboard in my OEM PC?) Few of us are both IT and legal experts but we all have our own views of Microsoft's licensing rules and how they apply.  There are…
It is only natural that we all want our PCs to be in good working order, improved system performance, so that is exactly how programs are advertised to entice. They say things like:            •      PC crashes? Get registry cleaner to repair it!    …
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question