I want to be able to schedule reboot in case that some files (drivers) were upgraded.
What I did:
- Created three properties DRIVER1, DRIVER2 and DRIVER3 with values driver1.sys, driver2.sys and driver3.sys.
- Created a CA (DLL based) that gets driver names from above properties, append it to value of System64Folder property, runs MsiGetFileVersion on resulting pathes and saves versions in OLD_DRIVER_1, OLD_DRIVER_2 and OLD_DRIVER_3 properites. This CA runs in immediate mode, so there is no problem.
- Created a CA (DLL based) that gets drivers versions just like previous one and compares them with values of OLD_DRIVER_? properties. When at least one comparison fails it enables ISSCHEDULEREBOOT property. I have to run it after new files were installed.
Now the problem that in order that CA from step 3 will run after new files were installed it have to be of deferred type. But CAs from deferred type have a very limited read access to properties of installer and of course they can not change them..