There appears to be no information on this anywhere that I can find and I'd rather not wait until it happens again before I can start to piece things together. Unfortunately, therefore, this is a slightly broader question than I would normally like to post, but as I have yet to pin down the cause, reproduce it, collect complete details and document it fully, I can only wait until it next occurs to be able collect and provide further information. So, based on what I do know, I am hoping someone might be able to shed some light on this.
It seems that in some cases, Inno Setup will require a restart to complete that requires an Administrator to login following that restart. I believe it is related to file registrations, possibly in System32, that couldn't be done at the time of the install due to other changes already pending.
On the occasions this has happened there have been (I think) three randomly named (similar to the randomly generated {temp} constant) files in the Windows directory that I (retrospectively, after some thought) assume must be tied to a RunOnce Registry key (which I will look for the next time I see this happen), that I (again) assume run following login as an Administrator to complete the installation. It appears that they do not run until an Administrator logs in, leaving the installation in an incomplete state if a standard user logs in. Once an Administrator logs in these files disappear and the installed application works as expected, rather than giving a:
Class not Registered
error that appears when the application is run before an Administrator logs in and allows the installation to complete fully.
What I want to do is find a way to ensure the installation completes fully, regardless of the privileges of the user that logs in after reboot, as if the application is centrally deployed (e.g. via SCCM), there will be no Administrator available to login at the PC and the application won't run until one does (which defeats the point of using something like SCCM). I am actually quite surprised that Inno Setup does not take care of this automatically, by setting the files to run as the SYSTEM account on next logon or some similar method.
If someone can explain roughly what is happening here, how to find out the names of the files (I could possibly do this by reading the RunOnce Registry key, but I would need to know the name of the value I need to read) and what needs to be done to run them and complete the installation, I should be able to take care of this by, for example, using a Scheduled Task to run as SYSTEM at logon, or some other method.