I need to Unregister and Register many, many DLLs. Directories of DLLs to "Fix" a problem with Crystal Reports 10. I can't find any module that is built for this and I am not asking for code.
My problem is I don't exactly know where to start. The W2K commandline
regsrv32 only seems to work on one DLL at a time (that is
regsvr32 *.dll doesn't work.) Which is probably safe and smart... Sadly I need neither of those at the moment. Seagate's (the makers of Crystal Reports) advice is basically, see which DLLs come up bad and manually register them. While that is fine advice it looks like about 125 or so DLLs need to be registered. And yes I'd love to not be using this product but it came bundled with a Third Party Vendor's software that my company HAS to use. I need to fix about 5 machines out of 120 which the TPV seems to think is "pretty good".
OK so here's how I see it. I read in the directory all the DLLs then create a commandline to Unregister all of the DLLs then Resgister all the DLLs I read in.
I would backtick ` the command (ie
`regsvr32 -u crappycrystal.dll` ; Maybe print it out to a file to read later to see how it went. So there would be some loop.
Here's where things get fuzzy for me. I know how I would do a loop in the
until ($foo=0) { way but I have no idea how to loop through all the DLLs. I don't how to tell it is done.
And because I have horrid self doubt I am pretty sure this is a stupid way to do this. So I ask you fellow Monks how would you handle this? And is there a wheel I don't need to reinvent?
--
ell em 52@g mail,com
There's more than one way to do it, but only some of them actually work.
20050114 Edit by castaway: Changed title from 'Resgistering DLLs, lots of them'