does anyone know what happens in the following scenarios dealing with DLLs on Windows machines:
1. An existing DLL has been registered with Windows, I replace the physical .dll file and then register the new file again (note: no unregistering process first).
2. I attempt to unregister a DLL that is currently not registered with Windows.
Specifically, I am executing the commands below from a command prompt:
regsrv32 /s "path to dll" - register DLL
regsrv32 /s /u "path to dll" - unregister a DLL
I need to know if either scenario will fail (and return a failed error code to my batch file) or if it will succeed. Success in my case would mean:
1. New dll gets registered successfully (even though the old wasn't unregistered)
2. Command gets ignored since dll isn't registered
Ideally, the process is:
unregister existing dll
replace physical file
register new dll
The problem is that I may not be able to follow this ideal process from my code and that I could end up in a situation where I attempt to unregister a dll that was never registered or I attempt to reregister a dll without doing the unregister it first.
Any help is much appreciated.