Hey,
Windows Starts up a few programs during the Startup process. Usually they are mentioned in the [...Windows\CurrentVersion\Run\] Key or in autoexec.bat
What I'm asking here is that...like a Startup List...is there one for Shutdowns as well? as in can we specify programs that execute just before a system shuts down?
Thanks,
Sanchit
Shutdown List?Is there a Shutdown Queue?
Page 1 of 1
6 Replies - 1871 Views - Last Post: 30 December 2004 - 06:15 AM
Replies To: Shutdown List?
#2
Re: Shutdown List?
Posted 29 December 2004 - 11:00 AM
OK....Assuming that there is no Shutdown queue....here's my actual problem.
I want to write a program that Logs the time when the PC was switched on and which also logs how long the PC has been used. I've written the first half but how can I do the latter unless I can record the value of GetTickCount() during the shutdown process?? For that you need to have a shutdown list or queue...which I hope there is...
Does a Windows Shutdown Queue List Exist? Is yes...how do I use it?
If No...then can you suggest a better idea on how to achieve the latter half of my requirement in my program???
Thanks Again.
I want to write a program that Logs the time when the PC was switched on and which also logs how long the PC has been used. I've written the first half but how can I do the latter unless I can record the value of GetTickCount() during the shutdown process?? For that you need to have a shutdown list or queue...which I hope there is...
Does a Windows Shutdown Queue List Exist? Is yes...how do I use it?
If No...then can you suggest a better idea on how to achieve the latter half of my requirement in my program???
Thanks Again.
#3
Re: Shutdown List?
Posted 29 December 2004 - 01:05 PM
you could have it write the time duration every second to a file, overwriting the previous entry. when it stops, then the timer stops.
#4
Re: Shutdown List?
Posted 29 December 2004 - 01:56 PM
i searched and the only thin i was able to find we're applications that kept track of what was running during shutdown (so that you could change the shutdown time from 60 seconds so programs could close properly) or addressing shutdown issues, nothing as far as a list like what's in msconfig.
#5
Re: Shutdown List?
Posted 29 December 2004 - 04:54 PM
Hmm...that's a really good question. I'm not aware of any batch file that runs programs on shutdown, but I've never had to look for one before. I suppose you could write one, but as mentioned, you'd have to trigger it somehow. You may have to go with Trakker's sugestion of having a program write the time sporadically to a file. On shutdown, it would stop. Of course, you'd have to either use unique filenames for each session, or it would overwrite on startup again.
#6
Re: Shutdown List?
Posted 30 December 2004 - 01:49 AM
I already tried that....the code runs at startup....stores GetTickCount Value in a File and keeps recording the value until the user shuts it down. But then wouldn't that take up some precious RAM?
I mean...usually it goes unnoticed...but if you start playing some Game...For Eg. FIFA or something....there is a noticeable difference in speed.
I mean...usually it goes unnoticed...but if you start playing some Game...For Eg. FIFA or something....there is a noticeable difference in speed.
#7
Re: Shutdown List?
Posted 30 December 2004 - 06:15 AM
Hmm...you could try scheduling the program to run only at intervals, say once every ten minutes or so. I admit, this will not give you the exact time the user logs off, just the closest write to file, but it should free resources.
Page 1 of 1

New Topic/Question
This topic is locked


MultiQuote



|