How to tell when Windows and all startup programs have completed booting?

36

8

My machine (Windows 7 64-bit) takes about 3-4 mins to completely boot. Is there any way which will indicate that boot is complete, some kind of sound / pop-up, either by using Windows in-built feature or by any 3rd party application?

I require when both windows and all the startup programs have finished booting

I usually sometime sit and wait in front of the machine, that time could be better utilized for a quickie.

This is how it looks, when the hard disk light stops blinking:

enter image description here

Firee

Posted 2014-03-16T16:37:21.130

Reputation: 1 694

Are you including logon processes, or specifically the boot process? – Austin T French – 2014-03-16T16:45:58.557

2After logon process... All the background processes etc.. The whole shebang – Firee – 2014-03-16T16:52:05.907

3You may want to add what do you mean by "completed booting": all programmes loaded or just Windows OS loaded. – zurfyx – 2014-03-16T17:02:39.780

3I'm fairly certain there's no definitive answer. Some background processes wait for the PC to become idle before they start, some just wait a fixed period. It's hard to predict that FooUpdater.EXE will sleep for 7 minutes. – MSalters – 2014-03-16T17:02:41.200

@Jerry All programs loaded – Firee – 2014-03-16T17:12:13.650

2Perhaps instead, would detecting when busy processes eventually become idle work for you? If so, does Windows Task Manager's "On Idle" task trigger not suffice? – Ƭᴇcʜιᴇ007 – 2014-03-16T18:04:22.277

The problem here is not to know if the boot process is completed but why it takes 3-4 minutes instead an average of 30 seconds... – climenole – 2014-03-16T22:29:17.957

@climenole Depends on how many startup programs you have... Also the age and type of hardware you're using – Firee – 2014-03-17T05:53:53.427

See also: Halting Problem

– Adam Davis – 2014-03-17T19:52:20.860

2Is 3-4 minutes really enough time for a "quickie"? o.O – Jason C – 2014-03-18T03:07:09.493

1@JasonC You see, its actually a 'cookie'... – Firee – 2014-03-18T12:01:41.990

Answers

25

There are several potentially helpful answers here, but I think there are two important points that haven't been made:

  1. No, it is not possible to programmatically determine that Windows and all startup programs have finished booting. This is essentially the Halting Problem and no program out there will be able to answer the question "For this arbitrary program, at what point should we say it has been loaded?".

  2. What is the actual problem you are trying to solve? All of the answers here attempt to find a solution to your question, but the question itself feels like it might be missing some important information. We want to solve your problem, not just answer the question.

Reading your question again and going just by what you've said, my response would be one of:

  • Just don't worry about it and start using your computer. Foreground tasks are prioritized and unless you've got something really unusual going on it shouldn't matter if background tasks are running.

Or:

  • Manually watch the system a few times and figure out the maximum amount of time it takes before the system is "ready" according to whatever metrics you have. Get a small timer program or script and add it to your system's startup. It can display a message or play a sound when the time you've chosen has elapsed.

This might not directly answer your current question, but hopefully it is helpful.

Nick

Posted 2014-03-16T16:37:21.130

Reputation: 491

3This is the best (and most technically correct) answer for one reason IMO: it highlights the ambiguity in defining "all startup programs have finished booting". I agree that the halting problem is quite relevant, but only in the case of the launched processes coming to a finish. Although one could monitor the CPU consumption of various programs after booting, and use a predefined threshold to dictate when the computer has "finished booted", this covers only a small subset of cases (notably, processes whose loading performance is mostly CPU-bound). – Breakthrough – 2014-03-17T18:41:32.780

@Breakthrough Good point and edit, thanks. I was really trying to succinctly express the idea that for any given program executed at startup, it might do any number of unpredictable things: (1) start and then terminate, (2) start and continue running, (3) start and spawn additional processes, then do (1) or (2). Even basing the idea of "complete" on resource consumption isn't ideal due to delayed-loading and the fact that some programs may even be waiting until the system is "idle" to begin doing some additional work. – Nick – 2014-03-17T19:02:02.067

makes one wonder how useful a "idle" or "booted" flag would be for persistent/daemon processes (caveat being, it's only useful if implemented in every process you're waiting on...). – Breakthrough – 2014-03-17T19:14:05.640

@Breakthrough If I'm not mistaken, linux' systemd has this, where, in principle, one could start a service after all others have started through its dependency mechanism. You'd have to specify all of them manually though (my systemd knowledge isn't that great). – rubenvb – 2014-03-18T10:10:00.693

@Nick Thanks for the reasoning behind trying to find the solution, it actually provides a fresh perspective. I assumed there woould be a very simple solution, but it doesn't seem so... For the time being I would use a small timer program, which lets me know that the specified time is over. – Firee – 2014-03-18T11:52:16.150

"Just don't worry and start using your computer" is horribly slow on my machine. After a browser window appears, I have to wait until the end of the background tasks for it to respond to clicks! – marczellm – 2014-03-18T15:37:46.033

11

Why not using Windows Task Scheduler and the Event ID 100 to play a custom sound when Windows is really finished?

Under Triggers select "On an event" and

  • Log: LogMicrosoft-Windows-Diagnostics-Performance/Operational
  • Source: Diagnostic-Performance
  • Event ID: 100

Under Actions select "Start a program" with

  • Program/script: "%ProgramFiles(x86)%\Windows Media Player\wmplayer.exe"
  • Add arguments: "%windir%\Media\Windows Logon Sound.wav"

    Event ID: 100   
    Decription: Windows has started up
    

    Source Event ID 100: Windows Diagnostics-Performance

nixda

Posted 2014-03-16T16:37:21.130

Reputation: 23 233

Comment by an anonymous user: This method works really well if your startup time is a bit slow or very slow. It is simple and accurate. However if your startup time is quick, under about 3 min, (or within the limits defined by Windows design) no event 100 is logged, so no sound will play – nixda – 2016-06-09T09:30:42.610

1I require when both windows and all the startup programs have finished booting – Firee – 2014-03-16T17:41:39.323

2FWIW: At the time where this answer was given, the OP only mentioned "Windows startup". The second part including all startup programs was added later! – nixda – 2014-03-17T15:34:44.700

9

Windows will treat boot finished if it was 80% idle (excluding low-priority CPU and disk activity) for 10s after reaching the Desktop UI.

To see the exact boot time use xbootmgr to trace why Windows boot slowly.

magicandre1981

Posted 2014-03-16T16:37:21.130

Reputation: 86 560

1My question is not to speed up booting, I just want an indication when the entire (with all startup programs etc) booting is complete – Firee – 2014-03-17T05:56:07.303

5you should fix the slow boot instead of trying to play a sound. – magicandre1981 – 2014-03-17T18:45:15.377

8

I have a free program installed that I have used for a long time, Soluto: https://www.soluto.com/

I am just a user, not connected.

It works for me.

It does a count down and allows you to select just what you want to load on boot.

It also allows you to delay starts.

Xavierjazz

Posted 2014-03-16T16:37:21.130

Reputation: 7 993

This site/company now provides a mobile app for remote security features; I assume the domain is owned by someone else now. – mbuc91 – 2016-05-26T00:52:45.993

Does it work offline? – Firee – 2014-03-16T17:06:05.683

6

Run this Python script on startup. It will play the startup sound once cpu usage has been below 20 percent for 5 consecutive seconds:

import subprocess
import time

# set these to whatever works for you
# sound will play when cpu load has been < IDLE_PERCENT for IDLE_TIME consecutive seconds
IDLE_TIME = 5
IDLE_PERCENT = 20

# you can execute any program you want by changing the alert function below


def get_load():
    output = subprocess.check_output('wmic cpu get loadpercentage', shell=True)
    load = output.split()[1]
    return int(load)

def alert():
    subprocess.call([
        r"c:\Program Files (x86)\Windows Media Player\wmplayer.exe",
        r"c:\Windows\Media\Windows Logon Sound.wav"])


idleSeconds = 0

while idleSeconds < IDLE_TIME:
    load = get_load()
    if load < IDLE_PERCENT:
        idleSeconds += 1
    else:
        idleSeconds = 0

    time.sleep(1)

alert()

Benjamin Schug

Posted 2014-03-16T16:37:21.130

Reputation: 61

2

You can add a sound to startup.

You can delay the startup processes and put a sound effect to be executed first. The tool Startup Delayer does this.

enter image description here

stderr

Posted 2014-03-16T16:37:21.130

Reputation: 9 300

Will this detect boot complete, or do I have to put a ideal timer? – Firee – 2014-03-16T17:08:15.020

@Firee There's no need a timer, just use the "automatic delay" option – stderr – 2014-03-16T17:09:54.270

1

This may not be very effective, but it's cheap.

I usually look at the hard disk activity led (you can identify it on the case by something like a database icon), until the led stabilizes and flashes infrequently, then I know i can now use the PC without much lag. The hard disk is usually the PC's bottleneck, and if it is not being used heavily, then you have room for work.

Hope that helps.

MadeOfAir

Posted 2014-03-16T16:37:21.130

Reputation: 119

1That is known, but I have to sit and wait... – Firee – 2014-03-17T05:55:12.047

4You don't have to. You can delegate anybody in the house to do that for you.Imagine it. it's easy!. :D – MadeOfAir – 2014-03-17T09:42:11.717

0

I've never used it myself but Windows Task Scheduler will allow you to create a task that is triggered to run "At Startup" or "At Logon". You may be able to schedule a task to run a powershell script to access the Console.Beep() method of the .NET Framework. You may even be able to turn it into a decent tune.

From Hey Scripting Guy! Blog

[console]::beep(500,300)

Change the value of the first number to alter the pitch (anything lower than 190 or higher than 8500 can’t be heard), and change the value of the second number to alter the duration

Edit: As it turns out the Console.Beep() method may not work on 64-bit systems according to the MSDN .NET documentation. Tested beeping in a PowerShell Script and it works fine.

You may also wish to check into your startup processes. You can do this by running msconfig and clicking on services. You can also use the Sysinternals tool Autoruns.

Goldfish Sandwich

Posted 2014-03-16T16:37:21.130

Reputation: 101

0

By windows documentation last in load order is registry currentuser/runOnce (after start-up folder) ... but what ever load order is, some of programs can take long starting-up time.

So maybe watching CPU activity in batch file can be good solution:

@echo off
setlocal ENABLEDELAYEDEXPANSION
set cpuLimit=15
set /a lowCount=0

for /l %%i in (1,1,30) do (
   for /F %%c in ('wmic cpu get loadpercentage ^| findstr "[0-9]"') do (
       echo %%i cpu-Load: %%c  ...lowCnt: !lowCount!
      if %%c gtr %cpuLimit% ( set lowCount=0
      ) else ( set /a lowCount+=1
         if !lowCount! gtr 10 (
            ECHO BEEEEEEP ... mplay32 beep.wav... or something
            exit
         )
      )
   )
   ping -n1 127.0.0.1 >NUL
)

... and BEEEPing after spoting that in last 10 cpu-load-checks, there was cpu-load below 15%. this batch file can be started by link in start-up folder, or better in registry HKLM\Software\Microsoft\Windows\CurrentVersion\Run

Asain Kujovic

Posted 2014-03-16T16:37:21.130

Reputation: 143

0

You wrote:

«My machine (Windows 7 64-bit) takes about 3-4 mins to completely boot...»

A "normal" boot takes around 30 seconds including the access to the user account. There's somethings wrong and this must be fix. In order to fix it, you have to get de data. I suggest you two utilities to troubleshoot this problem:

1) Autoruns

With this one you're able to check every process, program, driver loaded during the boot process. Tka care: this is a very powerful tool and DO NOT delete items unless you know what's you're doing. But you may Uncheck (disable) some startup logon programs...

2) System Explorer

With this tool you're able to see all process started and the history of them until System Explorer is started. Also it's possible to scan all these process for security purpose (compared to a process database..)

Check this first them give us some feedback.

You may also check the services at startup with services.msc and the status of devices with devmgmt.msc (yellow triangle for defect devices,Hard disk in PIO mode instead of DMA, and so on...) in the Windows administrative tools...

Hope this help. Let us know.

climenole

Posted 2014-03-16T16:37:21.130

Reputation: 3 180

My worry is not why the boot time is so long. I may have lot of start-up programs etc... I just need an indication when the whole booting process is complete, that includes Windows, Logon, all startup programs etc – Firee – 2014-03-17T05:58:44.240

Just check with task manager... When the CPU is in the idle state it's done. Takes 3,4 minutes for your PC, right? :-/ – climenole – 2014-03-17T07:35:19.627

This is how it looks, after the Hard disks lights stops blinking http://i.stack.imgur.com/nVToB.png

– Firee – 2014-03-17T08:16:17.967

"Something is wrong and this must be fix". Or it is just the anti-virus doing its job very very thoroughly... – Thorbjørn Ravn Andersen – 2014-03-17T17:44:00.647

@ThorbjørnRavnAndersen Maybe. As I said my worry is not how long it takes, I just need to know when its completed and I can start using the system without the possible lag due to background process still in the process of starting. – Firee – 2014-03-18T11:48:56.473

0

I had been searching for something like this, and i found the answer

i will post the actual code later on probably, but here it goes

http://msdn.microsoft.com/en-us/library/aa394226%28v=vs.85%29.aspx

just save the contents of the last part as a vbs file and run it, you can poll each system event and extract its message being displayed, simple.

what one has to do to find the boot sequence completion is to have this script run only until the event id is '100' that corresponds to the boot completion process in the system events

refer: http://www.howtogeek.com/72420/how-to-use-event-viewer-to-find-your-pcs-boot-time/

So, when you have this script in startup , it will poll all events and wait for event id to be 100 and alert you . the same can be employed in any scripting tool like autoit

Just wanted all to know it. because when i searched for this. all i found was the windows task scheduler idea or soluto at the best. actually soluto stopped working on my x64 pc a while ago for some strange reason. so i wanted to do a script myself which led me to this final solution....

rajeshontheweb

Posted 2014-03-16T16:37:21.130

Reputation: 1