Solved

Remote DLL Register

Posted on 2009-06-29
7
1,169 Views
Last Modified: 2012-06-27
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
0
Comment
Question by:JamesonJendreas
  • 5
  • 2
7 Comments
 
LVL 1

Author Comment

by:JamesonJendreas
ID: 24740037
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
 
LVL 1

Accepted Solution

by:
JamesonJendreas earned 0 total points
ID: 24740084
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 npi\administrator -p scp1301N@T regsvr32 /s c:\windows\system32\U2ltdate.dll
psexec \\192.168.2.112 -u npi\administrator -p scp1301N@T regsvr32 /s c:\windows\system32\U2lcom.dll

psexec \\192.168.2.50 -u npi\administrator -p scp1301N@T regsvr32 /s c:\windows\system32\U2ltdate.dll
psexec \\192.168.2.50 -u npi\administrator -p scp1301N@T regsvr32 /s c:\windows\system32\U2lcom.dll

psexec \\192.168.2.143 -u npi\administrator -p scp1301N@T regsvr32 /s c:\windows\system32\U2ltdate.dll
psexec \\192.168.2.143 -u npi\administrator -p scp1301N@T regsvr32 /s c:\windows\system32\U2lcom.dll

psexec \\192.168.2.125 -u npi\administrator -p scp1301N@T regsvr32 /s c:\windows\system32\U2ltdate.dll
psexec \\192.168.2.125 -u npi\administrator -p scp1301N@T regsvr32 /s c:\windows\system32\U2lcom.dll

Now am receiving error code 4
0
 
LVL 66

Expert Comment

by:johnb6767
ID: 24740180
Try the -w switch.....

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


0
What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

 
LVL 66

Expert Comment

by:johnb6767
ID: 24740188
LOL... So it still isnt working?
0
 
LVL 66

Expert Comment

by:johnb6767
ID: 24740231
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....



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

Expert Comment

by:johnb6767
ID: 24740432
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
 
LVL 66

Expert Comment

by:johnb6767
ID: 24740439
Wrong one....

See??

:^)
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Issue: Unstable cursor in Windows XP and Windows runs extremely slow in that any click will bring up the Hour glass (sometimes for several seconds before giving you what you want) . Troubleshooting Process and the FINAL FIX: This issue see…
You may have already been in the need to update a whole folder stucture using a script. Robocopy does it well and even provides a list of non-updated files in a log (if asked to). Generally those files that were locked by a user or a process by the …
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

708 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now