Thema: Delphi System Reboot Counter

Einzelnen Beitrag anzeigen

Der schöne Günther

Registriert seit: 6. Mär 2013
6.110 Beiträge
 
Delphi 10 Seattle Enterprise
 
#11

AW: System Reboot Counter

  Alt 15. Apr 2019, 08:20
He does not want to block reboots. He has his application already registered in auto start, but does not want his application to run for the next two times the system boots.

Trying to get your application out of the "RunOnce" thing and then back in is the wrong approach, in my opinion. Why don't you just keep track of the reboot counter when your setup (or whatever it is) starts, and when your application launches, you compare if the boot count is greater than saved_bootcount + 2 . If not, just exit your application.
  Mit Zitat antworten Zitat