REGSVR32.EXE command line options clarified please

Hi Experts

Could somebody please explain to me the differences between using RegSvr32 without a switch to "register" a DLL file, and using it with the /i switch.  I'm unclear of exactly what the /i does and what kind of other command line parameters may be used with it, eg. to copy the DLL to a given folder and then register it in situ.

Explanation of Regsvr32 usage and error messages

http://support.microsoft.com/kb/q249873/

RegSvr32.exe has the following command-line options:
Regsvr32 [/u] [/n] [/i[:cmdline]] dllname

/u - Unregister server
/i - Call DllInstall passing it optional [cmdline] (/i /u calls dll uninstall)
/n - do not call DllRegisterServer (must be used with /i)
/s  Silent (added with Windows XP and Windows Vista)

DllRegisterServer and Unregister server (/u) seem to be "registering" and "unregistering" a DLL, but how does that differ from DllInstall and DllUnInstall?

The reason I'm asking is that I found a page of "fixes" for Windows 98 which involved re-registering various DLLs to restore the Explorer Shell and various other things like IE and OE.  I expected them just to show eg.   RegSvr32 shell32.dll, but instead they show  RegSvr32 /i shell32.dll.

Thanks in advance.
Bill
LVL 39
BillDLAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

jkrCommented:
The difference here is that the - optional - 'DllInstall()' function (http://msdn2.microsoft.com/en-us/library/bb759846.aspx) *can* take arguments. Usually, the mandantory 'DllRegisterServer()' function (http://msdn2.microsoft.com/en-us/library/ms682162(VS.85).aspx) is called by regsvr32.exe. If '/i' is used and *no* arguments are passed as above, that is equivalent to a plain 'RegSvr32 shell32.dll'
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
kaylanreilorCommented:
DllRegisterServer must be implemented if the DLL is a server of COM objects. If not, DllInstall only is used .
0
BillDLAuthor Commented:
Thank you guys, that explains it well.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Development

From novice to tech pro — start learning today.