Tip

REGSVR32 replacement provides detailed error messages

Most admins have dealt with REGSVR32 at one time or another. It's a command-line tool they can use to manually register COM and COM+ components with a Windows system—DLLs, mainly—and it can also be used as a quick and dirty way to register or deinstall components with Windows.

But one of the drawbacks to REGSVR32 is that it is irritatingly uninteractive: If something goes wrong, it doesn't return much in the way of useful information, so it makes a component registration failure difficult to debug.

Programmer Shawn A. Van Ness decided to do something about this. He wrote a replacement for REGSVR32, called

Requires Free Membership to View

Reggie 1.0, which provides detailed error messages when a component doesn't register correctly. It can also return detailed error codes back to the command line for processing by scripts and batch commands, and it can be re-used freely in an installation kit. (There are no licensing restrictions on the program).

Like REGSVR32, Reggie accepts the name of a component—a DLL, OCX, EXE. TLB or RGS file—as its main argument. For a silent install (meaning no "success" notification), pass the -q switch on the command line; to uninstall a given component, use -u.

Note: Attempting to register an EXE file that is not a COM server will produce an error prompt, and you'll be asked to kill it after several seconds if it is still running.

There are some key differences between Reggie and REGSVR32. For one, you must supply a full pathname to the component in question; Reggie will not search your file path (as specified in the PATH environment variable) for the file. This prevents Reggie from stumbling across and accidentally registering a completely different version of the component that might be somewhere else in the path. Granted, it means that much more footwork, but it also means that much less chance of installing the wrong thing.

Reggie also does not support the DllInstall entry point (which is supported by REGSVR32 via the /i command-line switch), but the author says he might add it in a future release.

About the author: Serdar Yegulalp is editor of the  Windows Power Users Newsletter, which is devoted to hints, tips, tricks, news and goodies for Windows NT, Windows 2000 and Windows XP users and administrators. He has more than 10 years of Windows experience under his belt, and contributes regularly to SearchWinComputing.com and SearchSQLServer.com.

More information on this topic:

This was first published in December 2006

There are Comments. Add yours.

 
TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

Disclaimer: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.