Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Can I use REGSVR32 in a Batch?

742 views
Skip to first unread message

Prekb

unread,
Dec 17, 1999, 3:00:00 AM12/17/99
to
I need to write a batch program that registers and unregisters various DLL and
OCX files to the C:\WINNT\SYSTEM32 directory...

Can this be done?

If anyone can help, please send me an e-mail...thanks!

Rob
rhur...@aetea.com

Walter Zackery

unread,
Dec 17, 1999, 3:00:00 AM12/17/99
to

In general, any Windows executable program can be used in a batch file
in Windows 9x/NT, with varying degrees of success. Although I've never
used it in a batch file, there's no reason that REGSVR32.EXE can't be
used in one. For example, you can view the help for REGSVR32.EXE
simply by typing its name at a command prompt. This will bring up a
message box listing the various switches and their meaning. You can
also redirect this help to a text file by combining the /s and /c
switches. Doing so will produce the following output.

/u - Unregister server
/s - Silent; display no message boxes
/c - Console output
/i - Call DllInstall passing it an optional [cmdline]; when used
with /u calls dll uninstall
/n - do not call DllRegisterServer; this option must be used with
/i

For batch file usage, you almost always would want to use the /s
switch to suppress message boxes. To register a dll, use something
like this in a batch file:

regsvr32 /s c:\winnt\system32\myown.dll

To unregister a dll, use:

regsvr32 /s /u c:\winnt\system32\myown.dll


"Prekb" <pr...@aol.com> wrote in message
news:19991217072227...@ng-cv1.aol.com...
: I need to write a batch program that registers and unregisters

Gene Hughes

unread,
Dec 17, 1999, 3:00:00 AM12/17/99
to
This is what we use

@echo off
c:\windows\system\regsvr32 /s c:\windows\system\My_progam.ocx

Of course you need to copy the file to c:\windows\system first
Gene


Prekb wrote in message <19991217072227...@ng-cv1.aol.com>...

0 new messages