Quantcast

Maximum PC

It is currently Tue Sep 02, 2014 11:03 pm

All times are UTC - 8 hours




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: DLL Hell, A Useful Tool
PostPosted: Sun Jul 11, 2004 10:19 am 
Team Member [Top 500]*
Team Member [Top 500]*
User avatar

Joined: Thu Jun 24, 2004 2:22 pm
Posts: 8722
Location: Cleveland, Ohio
Those of us who have been to DLL Hell and back know how annoying those error messages are that refer to missing or corrupt .dll. .ocx and other files of type can be. I have a tool I like to use that makes things easy, and a tool that might be worth sharing. This is a Windows tool and thus it is being placed here. However, if anyone (mods) feels it should be moved, please feel free. No sense on getting into the command line and regsvr32 thing as this makes things real easy.

To give credit where credit is due, the following comes from here:

http://www.dll-downloads.com/

What is a DLL file?

DLL is short for Dynamic Link Library, a library of executable functions or data that can be used by a Windows application. A DLL provides one or more particular functions and a program accesses the functions by creating either a static or dynamic link to the DLL. A static link remains constant during program execution while a dynamic link is created by the program as needed. DLLs can also contain just data. DLL files usually end with the extension .dll,.exe., drv, or .fon.

How is a DLL file used?

A DLL file can be used by several applications at the same time. Some DLLs are provided with the Windows Operating System and available for any Windows based application. Other DLLs are written for a particular application and are loaded when the application is run.

What is Kernel32.dll?

Kernel32.dll is the 32-bit dynamic link library of the operating system kernel. Kernel32.dll handles memory management, input/output operations, and interrupts. When Windows boots up, Kernel32.dll is loaded into a protected memory space.

Where are DLL Files typically located on my computer?

On a typical installation of Windows 95, 98, 98SE and ME DLL files are usually located in the C:\WINDOWS or C:\WINDOWS\SYSTEM folders. In the case of Microsoft's Windows NT based Operating Systems, DLL files can be usually found in C:\WINNT or C:\PROGRAM FILES folders.
NOTE: In Windows XP the .DLL files generally reside happily in the System32 folder C:\WINDOWS\system32. They left off with ME (Yuck)!

Here is what you do, and I suggest a copy and paste as it is easier. I place this on every computer I have. I don't even know the actual origin of this little bit of script, however, I have likely seen a dozen variations. For the developer minded, feel free to mess with the script. For the less developer minded, don't screw with it! Following to running the script, Right click on any DLL or OCX files and note the added options. Pretty handy little chunk of code. Only copy & paste the main code body and not the numbered steps.

1. Open Notepad.
2. Paste the following code into Notepad:


REGEDIT4
[HKEY_CLASSES_ROOT\.exe]
@="exefile"
[HKEY_CLASSES_ROOT\.dll]
@="dllfile"
[HKEY_CLASSES_ROOT\.ocx]
@="ocxfile"
[HKEY_CLASSES_ROOT\.olb]
@="olbfile"
[HKEY_CLASSES_ROOT\exefile\shell\Register\command]
@="%1 /register"
[HKEY_CLASSES_ROOT\dllfile\shell\Register\command]
@="regsvr32.exe %1"
[HKEY_CLASSES_ROOT\ocxfile\shell\Register\command]
@="regsvr32.exe %1"
[HKEY_CLASSES_ROOT\olbfile\shell\Register\command]
@="regsvr32.exe %1"
[HKEY_CLASSES_ROOT\dllfile\shell\Silent Register\command]
@="regsvr32.exe /s %1"
[HKEY_CLASSES_ROOT\ocxfile\shell\Silent Register\command]
@="regsvr32.exe /s %1"
[HKEY_CLASSES_ROOT\olbfile\shell\Silent Register\command]
@="regsvr32.exe /s %1"
[HKEY_CLASSES_ROOT\exefile\shell\UnRegister\command]
@="%1 /unregister"
[HKEY_CLASSES_ROOT\dllfile\shell\UnRegister\command]
@="regsvr32.exe /u %1"
[HKEY_CLASSES_ROOT\ocxfile\shell\UnRegister\command]
@="regsvr32.exe /u %1"

[HKEY_CLASSES_ROOT\olbfile\shell\UnRegister\command]
@="regsvr32.exe /u %1"
[HKEY_CLASSES_ROOT\dllfile\shell\Silent UnRegister\command]
@="regsvr32.exe /u /s %1"
[HKEY_CLASSES_ROOT\ocxfile\shell\Silent UnRegister\command]
@="regsvr32.exe /u /s %1"
[HKEY_CLASSES_ROOT\olbfile\shell\Silent UnRegister\command]
@="regsvr32.exe /u /s %1"


3. Save the file as register.reg.
4. Right click on register.reg and select Merge from the context menu. Alternatively, you can run regedit and import the file.
After merging the script, you should be able to right click on any .exe, .dll, .ocx, or .olb file and see a list of register and unregister options.

Note: Make sure that regsvr32.exe is in your path or the menu commands will fail.

This little tool works great for all that register and unregister stuff. Simply download a needed .DLL (Google is your friend) and unzip the file (assuming it is zipped) to where it belongs. Then right click the file and choose REGISTER.

Hope this of some use to many out there...

<EDIT> I should have mentioned that things seem to point to the fact ALL DLL Files are in System32 and this is not totally true. I should have included this and thank you Logik for bring it to my attention.

System32 is used as the predominant DLL location for ALL of the NT-based OSes (NT, 2000, XP, 2003)

Even in XP, DLLs can also be found within the "Program Files" folder (under "Common Files") and in \WINNT or \WINDOWS (aka %SystemRoot%), just not very many of them.

</EDIT>

Ron


Last edited by Reloadron on Mon Jul 12, 2004 6:39 am, edited 1 time in total.

Top
  Profile  
 
 Post subject:
PostPosted: Sun Jul 11, 2004 11:48 am 
Willamette
Willamette
User avatar

Joined: Fri Jun 25, 2004 3:34 pm
Posts: 1182
Location: So Cal
very good info

::bookmarks page::


Top
  Profile  
 
 Post subject:
PostPosted: Sun Jul 11, 2004 12:23 pm 
Team Member [Top 500]*
Team Member [Top 500]*
User avatar

Joined: Thu Jun 24, 2004 2:22 pm
Posts: 8722
Location: Cleveland, Ohio
Thanks. Thought some folks might find it a useful tool.

Ron


Top
  Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 8 hours


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group