Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

ReplacedInUseFiles Access...


4 replies to this topic

Superfreak3

Superfreak3
  • Full Members
  • 437 posts

Posted 09 August 2014 - 02:27

Hi all,

 

I have a custom action .exe stored in the binary table that I need to behave differently if the overall install causes the need for a reboot.  I've been trying to access the ReplacedInUseFiles property, but no matter where in the execute sequence I try, it has no value -- even when the .msi log indicates the property is added and given a value of 1.

 

What I would like to be able to do, if possible, is pass ReplacedInUseFiles to my .exe.  If a reboot is needed I would like to write to the RunOnce key to fire a secondary install.

 

If no reboot is needed, the widget (run asynchronously) will wait until the parent or calling .msi process is cleared then fire the secondary install.  This is what happens now, but if a reboot is needed when run silently, the restart kills the widget and the secondary install is never initiated.

 

Any help in how I can detect the need for a reboot in a Custom Action would be greatly appreciated!!

 

Chaining as a solution won't work because the main install is 32 bit while the secondary installer is 64 bit.

 

Thanks Much!



Superfreak3

Superfreak3
  • Full Members
  • 437 posts

Posted 21 August 2014 - 04:00

There's more to this here...

 

https://community.fl...xecute-Sequence

 

Hope someone can give me some tips on this.



Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 24 August 2014 - 19:22

I'm not sure, but the problem might be that the key isn't being written (at the time you expect it) - you can check this with Process Monitor - or the property is being set (for instance, a deferred custom action can't communicate back tot the install).
Why don't you simmply read the registry key in your exe instead of your installer?



Superfreak3

Superfreak3
  • Full Members
  • 437 posts

Posted 24 August 2014 - 20:51

At this point I'm not quite sure what registry key you are referring too.  I think I am able to determine when a reboot is needed and I can deal with my secondary installer accordingly.

 

Now I simply have to trick my installer during tests so it detects a hard lock condition so I can ensure my changes will function as expected.



Superfreak3

Superfreak3
  • Full Members
  • 437 posts

Posted 25 August 2014 - 22:48

Here's the latest in the saga....

On several machines, I've noticed the following message on uninstalls while trying to test my other changes...

"The setup must update files or services that cannot be updated while the system is running. If you choose to continue, a reboot will be required to complete the setup."

If OK is selected, the uninstall runs to completion with no reboot.

I do see in the log that a need for reboot has been detected, but I don't see any clue as to what may be triggering this need. I search for some related error codes like 1603, 1732, 1902, 1903, 3010, but nothing. There are also no services as part of this app install/uninstall.

All of my reboot changes posted earlier are conditioned to run if Not Installed and VersionNT64 so I don't believe any of my changes are coming into play here. I even tested this by using an early backup that didn't contain any related reboot handling changes and received the same result.

I then thought that Restart Manager might be doing something 'funky'. I added MSIRESTARTMANAGERCONTROL=1 to the Property table, installed then uninstalled = NO MESSAGE!

So, it appears Restart Manager is involved. I could simply set the control property as stated above and be done with it an simply rely on the older Files In Use mechanism, but I would like to know what is causing the issue on some machines. I'm perplexed as to what Windows Installer is detecting as in on uninstall. I was hoping the log would show, but nope.

Any help appreciated!!

 

What are the pros/cons of disabling Restart Manager?