chamakits
27th November 2007 11:52 UTC
Keeping Important DLLs after Uninstall
Hey guys, I'm currently working on an installer for product that a small company distributes. The previous installer they had was....well...bad.. Anyways, a problem I've had is that when i uninstall the program using the old installer/uninstaller, it doesn't erase properly the Registry entries for the DLLs but does erase the DLLs perse. So I was wondering if there was a quick workaround for this, because if I'm not mistaken, if there already is an entry for a DLL then RegDLL doesn't overwrite it, right?
Also, on the new installer, my boss wants to make sure, that the uninstaller doesn't un-register any DLLs that previously existed on the machine. So, he told me if there was anyway that I could put the DLL somewhere in the computer, like the WINDOWS folder, where they wouldn't get erased, however, if I'm not mistaken, the WINDOWS folder is off-limit when it comes to adding files to it explicitly, right? So, where could I include them. And if its possible to do so in the WINDOWS folder, how should I go about it?
Thanks to everyone in advance.
UranusOne
27th November 2007 12:22 UTC
Do not uninstall or creates a log to record the existing dlls before installing your program, from the same installer. The uninstaller, then you should be able to read this log, and then not uninstall dlls that were before installing.
But equally, you can also create conflicts with programs that install after your installation, requiring those dlls.
You can install the dlls or any file in the WINDOWS directory. Normally, the DLLs are installed at
- Windows98: C:\Windows\System
Windows2000: C:\WINNT\System32
WindowsXp: C:\Windows\System32
In these folders, the DLLs, are available for the use of all programs (for example those created with VisualBasic 6.0)
Otherwise, you could include the DLLs in the same folder as the executable of your program and do not register them in any way. This not create conflicts with nothing (if then uninstall), and only your program could run these DLLs, as they are on your side, in the same folder.
kichik
27th November 2007 18:14 UTC
What RegDLL does depends entirely on the DLL itself. RegDLL simply loads the DLL and tells it to register itself. More specifically, it calls DllRegisterServer().