I have not come across any crystal kb which highlights the correct reg/unreg order. The order of dll listed in our iss source stanzas is correct (at-least with respect to keycode and
craxdrt9 dlls) because it has been working fine for as far back as I remember. We are seeing this on 2019 servers. I also verified that the unreg is in reverse order to the one listed in the iss source sections.
When the issue was reported to us, The 32 bit regsvr32 /s /u
craxdrt9.dll was stuck trying to CoCreateInstance on a GUID which on checking further belonged to crystal's keycode.dll. I also saw that the
_iu14D2N pid mentioned in the 1002 event was not the one currently hang. Being first on the scene I checked the status of keycode.dll's registration in HKCR\CLSID but there were no entries for it in the registry. I immediately moved to a vanilla machine and on a working setup unregistered keycode first and then initiated the unreg of craxdrt9.dll. This hanged just like what happened on the repro machine. Now at this point I have 2 observations:
Given a list of dlls to be registered and unregistered (during install and uninstall respectively) does inno guarantee that the order as specified in the script file would always be preserved. Is there a chance that multiple reg or unreg could be executed in parallel under any circumstance ? This based on procmon logs for few install uninstall runs seems to be okay.
Second, why is the OS detecting that the primary message pump of _iu14D2N.tmp is not responsive ? Does the wait on the child processes (regsvr32) happen on the primary thread ? Has inno's uninstaller
registered for a automatic restart or is the OS doing it via some default policy ?
Because the OS is terminating and restarting
_iu14D2N
it seems sometimes the very first instance of
_iu14D2N.tmp (after spawning a bunch of unregs) is detected as unresponsive, killed and then restarted. At this point depending upon, till what point the first instance ran or even if it unreg'ed everything successfully (implying the first
_iu14D2N hang is because of a different reason). Any subsequent unconditional _iu14D2N runs are bound to hang because keycode should be registered at the point of craxdrt9 unregistration. But keycode was already unreg'ed via the previous
_iu14D2N instance. So basically at this point I'd like to understand why is the very first instance of
_iu14D2N hanging ? and if there is any way we can disable automatic restart of
_iu14D2N. For now I have disabled wer service to check that. Hopefully with that the first
_iu14D2N which "hangs" will not be terminated allowing us to investigate its state. Though I am not sure if disabling wer is the thing that would disable sutomatic restarts.