Hi all,
I'm trying to write a program that will always be in the windows startup group. I should run only once a day and it is executed it will check and quit if run already. Here is the logic behind it.
Fundamentaly
Note: AMS executable always in start up group
Condition 1 (Run for the 1st time)
today is Monday eg 1/3/04
AMS runs
executes a program
give you 'Update complete' screen
sleeps for 5 seconds
then quits
write to registry: completed date
number of times it ran today
[Here i dont know what else to register]
Condition 2 (run again same day as condition 1)
If machine is rebooted or you logon again
AMS checks if it ran today - today is Monday eg 1/3/04
[ I dont know how to check?]
If it already ran today it wont run again
and exit program
[eg if you rebooted or you logon again 10 times
it will only RUN ONCE today regardless on how many times the program is executed]
How do i do this? I tried so many combinations and it either runs again and again or quits everytime
Condition 3
New day today - Tuesday eg 2/3/04
Checks if it ran Today - compares today date with completed date? How to do this?
Since it has NOT run today
AMS will execute program
then
give you 'Update complete' screen
sleeps for 5 seconds
then quits
also, write to registry values that it ran today,etc
I'm SO CONFUSED with THIS
Every time i make a way forward I get stuck or get into a BAD loop
Does someone have an easy way to track Run Once a day only code?
Can i email my project to someone PLEASE? To help me sort logic
Help please
Thanks for any help
Morci
I'm trying to write a program that will always be in the windows startup group. I should run only once a day and it is executed it will check and quit if run already. Here is the logic behind it.
Fundamentaly
Note: AMS executable always in start up group
Condition 1 (Run for the 1st time)
today is Monday eg 1/3/04
AMS runs
executes a program
give you 'Update complete' screen
sleeps for 5 seconds
then quits
write to registry: completed date
number of times it ran today
[Here i dont know what else to register]
Condition 2 (run again same day as condition 1)
If machine is rebooted or you logon again
AMS checks if it ran today - today is Monday eg 1/3/04
[ I dont know how to check?]
If it already ran today it wont run again
and exit program
[eg if you rebooted or you logon again 10 times
it will only RUN ONCE today regardless on how many times the program is executed]
How do i do this? I tried so many combinations and it either runs again and again or quits everytime
Condition 3
New day today - Tuesday eg 2/3/04
Checks if it ran Today - compares today date with completed date? How to do this?
Since it has NOT run today
AMS will execute program
then
give you 'Update complete' screen
sleeps for 5 seconds
then quits
also, write to registry values that it ran today,etc
I'm SO CONFUSED with THIS
Every time i make a way forward I get stuck or get into a BAD loop
Does someone have an easy way to track Run Once a day only code?
Can i email my project to someone PLEASE? To help me sort logic
Help please
Thanks for any help
Morci
Comment