Shutdown List?

Is there a Shutdown Queue?

Page 1 of 1

6 Replies - 1871 Views - Last Post: 30 December 2004 - 06:15 AM

#1 born2c0de   User is offline

  • printf("I'm a %XR",195936478);
  • member icon

Reputation: 187
  • View blog
  • Posts: 4,673
  • Joined: 26-November 04

Shutdown List?

Post icon  Posted 29 December 2004 - 10:56 AM

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
Is This A Good Question/Topic? 0
  • +

Replies To: Shutdown List?

#2 born2c0de   User is offline

  • printf("I'm a %XR",195936478);
  • member icon

Reputation: 187
  • View blog
  • Posts: 4,673
  • Joined: 26-November 04

Re: Shutdown List?

Post icon  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.
Was This Post Helpful? 0
  • +
  • -

#3 Trakker   User is offline

  • A$$hole Extraordinaire.
  • member icon

Reputation: 13
  • View blog
  • Posts: 2,386
  • Joined: 06-June 01

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.
Was This Post Helpful? 0
  • +
  • -

#4 supersloth   User is offline

  • serial frotteur - RUDEST MEMBER ON D.I.C.
  • member icon


Reputation: 4695
  • View blog
  • Posts: 28,516
  • Joined: 21-March 01

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.
Was This Post Helpful? 0
  • +
  • -

#5 Amadeus   User is offline

  • g+ + -o drink whiskey.cpp
  • member icon

Reputation: 253
  • View blog
  • Posts: 13,507
  • Joined: 12-July 02

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.
Was This Post Helpful? 0
  • +
  • -

#6 born2c0de   User is offline

  • printf("I'm a %XR",195936478);
  • member icon

Reputation: 187
  • View blog
  • Posts: 4,673
  • Joined: 26-November 04

Re: Shutdown List?

Post icon  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.
Was This Post Helpful? 0
  • +
  • -

#7 Amadeus   User is offline

  • g+ + -o drink whiskey.cpp
  • member icon

Reputation: 253
  • View blog
  • Posts: 13,507
  • Joined: 12-July 02

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.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1