Show message the first time my app is started after windows has rebooted
-
Hi guys how can i accomplish this i need to show a do you want to update message every time the app is started the first time windows has rebooted. Thanks!! ;P
You could check for a 'flag' in some configuration file or the registry. After your app runs, set the flag to some other value (or remove it).
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Man who follows car will be exhausted." - Confucius
-
You could check for a 'flag' in some configuration file or the registry. After your app runs, set the flag to some other value (or remove it).
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Man who follows car will be exhausted." - Confucius
ok, but how do you detect that windows has reboot??, i mean i put a registry key called "doUpdate" value=false then i start my app i change that registry to true, so the next i launch my app it will not show the message that is ok, but how to reset that value when windows is restarted?
-
ok, but how do you detect that windows has reboot??, i mean i put a registry key called "doUpdate" value=false then i start my app i change that registry to true, so the next i launch my app it will not show the message that is ok, but how to reset that value when windows is restarted?
You might could take advantage of the HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run key by putting a small app there that runs the next time Windows is started.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Man who follows car will be exhausted." - Confucius
-
Hi guys how can i accomplish this i need to show a do you want to update message every time the app is started the first time windows has rebooted. Thanks!! ;P
-
You might could take advantage of the HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run key by putting a small app there that runs the next time Windows is started.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Man who follows car will be exhausted." - Confucius
-
ok i did that but every time windows starts up i shows the black window and then closes is kind of anoying is there a parameter to put there so it runs silently?
It shows a black window because you made a console application. Make a normal win32 one, just don't create any windows. Have it set a registry value (eg) HKCU\Software\ManchukuoSoft\MyAmazingApp\Rebooted = 1 Then, when your real MyAmazingApp is run, check the value, and maybe show a message. Then clear that value. Job done! Iain.
I have now moved to Sweden for love (awwww).
-
It shows a black window because you made a console application. Make a normal win32 one, just don't create any windows. Have it set a registry value (eg) HKCU\Software\ManchukuoSoft\MyAmazingApp\Rebooted = 1 Then, when your real MyAmazingApp is run, check the value, and maybe show a message. Then clear that value. Job done! Iain.
I have now moved to Sweden for love (awwww).
-
Hi guys how can i accomplish this i need to show a do you want to update message every time the app is started the first time windows has rebooted. Thanks!! ;P
you will need 2 programs for this. One will run as autorun (startup) and set a value in registry (say reboot = true). Another program whent started by user, will check this value in registry and if it is true then display your messagebox and set the value to false.