Link to home
Start Free TrialLog in
Avatar of edmund_mitchell
edmund_mitchell

asked on

Batch file to add/register 7 .dlls?

Hello all,

I have two workstations that are slightly out of sync.  One is the reference standard, and the other is completely lacking 4 .dlls, and has older versions of 3 others.

I'd like to bundle all  7 .dlls along with (I think a batch file can do this) a .bat file that when double-clicked, will put all the .dlls into the System32 folder (including overwriting the three .dlls which are already present but are older), and regsvr32 them.

Then I can just bring this bundle over to the other system, double-click on the .bat file, and  all will be done.

I've never written a .bat file, so I have no idea how such a thing is created, or if it can even do what I want.

Thanks for any help

E
Avatar of birdski
birdski

rem   *unregisters old dlls*
regsvr32 /u oldfile1
regsvr32 /u oldfile2   ;repeat as needed

copy source destination /y

rem *registers silently*
regsvr32 /s newfile1  
regsvr32 /s newfile2   ;repeat as needed
Avatar of edmund_mitchell

ASKER

birdski,

Thanks -- it looks good.  One thing I don't understand before I go forward and give you the points --

"copy source destination /y"

is a little puzzling.  If the batchfile is in the same dir as newfile1, newfile2, newfile3... etc, and I want all the .dlls to go to the winnt\system32 dir, then would I type

copy newfile1 newfile2 newfile3 newfile4 C:\winnt\system32 /y

or is there a delimited between the files, or to I have to be more complete with the path, or?

Thanks

E
ASKER CERTIFIED SOLUTION
Avatar of birdski
birdski

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Oh yeah -- you don't have to answer this; the points are yours and you did a great job, but if you are so inclined, I'd love to learn more about the things I can do inside a batch file and the syntax to make them happen.

Do you have any links?

Thanks again

 My suggestion would be to google it,  you'll get thousands of results and many might even be helpful.  There's a lot up there.    I'm just fortunate enough to have started computing back in the DOS 5.0 days.  One helpful hint is to get used to doing the "command" /? alot from a prompt and test sections of your batch individually or put pause commands inside so you can see the results before it goes on to the next step.