unattended update install and reboot?

T

ToddAndMargo

Hi All,

At night, from the command line (scheduled tasks), is there
a way to:

1) shutdown the computer
2) install any Microsoft updates that are pending
3) automatically restart the computer

Has to be all unattended (scheduled tasks). The
idea is that all this will be complete before I come
in in the morning.

Many thanks,
-T
 
S

Shenan Stanley

ToddAndMargo said:
At night, from the command line (scheduled tasks), is there
a way to:

1) shutdown the computer
2) install any Microsoft updates that are pending
3) automatically restart the computer

Has to be all unattended (scheduled tasks). The
idea is that all this will be complete before I come
in in the morning.

Start button --> RUN --> type in:
cmd /k shutdown -?
--> Click OK.

Don't think so...

Same as the first.

Why wouldn't you just set your Automatic Updates to do the updates at 3AM
every night?
 
T

ToddAndMargo

Shenan said:
Start button --> RUN --> type in:
cmd /k shutdown -?
--> Click OK.

Don't think so...

Same as the first.

Why wouldn't you just set your Automatic Updates to do the updates at 3AM
every night?

It won't reboot. You have to press the reboot now on the prompt.
 
S

Shenan Stanley

ToddAndMargo said:
At night, from the command line (scheduled tasks), is there
a way to:

1) shutdown the computer
2) install any Microsoft updates that are pending
3) automatically restart the computer

Has to be all unattended (scheduled tasks). The
idea is that all this will be complete before I come
in in the morning.

Shenan said:
Start button --> RUN --> type in:
cmd /k shutdown -?
--> Click OK.

Don't think so...

Same as the first.

Why wouldn't you just set your Automatic Updates to do the updates
at 3AM every night?
It won't reboot. You have to press the reboot now on the prompt.

Log off when you leave the computer.
 
T

ToddAndMargo

Shenan said:
Log off when you leave the computer.
Fascinating. Did not realize that would make it reboot after
installing the updates.

Unfortunately, it is in a locked room.
 
S

Shenan Stanley

ToddAndMargo said:
Fascinating. Did not realize that would make it reboot after
installing the updates.

Unfortunately, it is in a locked room.

Not sure what that has to do with anything.

If no one is logged in, there is no popup. Log off remotely. Log off
screensaver. Something.

Is it being updated by WSUS?
WSUS registry settings set?
 
T

ToddAndMargo

Shenan said:
Not sure what that has to do with anything.

If no one is logged in, there is no popup. Log off remotely. Log off
screensaver. Something.

Is it being updated by WSUS?
WSUS registry settings set?

It sometimes gets left logged in. I really
want this to be completely unattended.

I do not know what WSUS is. But, it is using the
standard Windows Update Service. Is there an
extra registry setting to do what I want?

Thank you for being patient with all this.
-T
 
A

Anteaus

An AutoIt script can log the user off, with the Shutdown(0) command.

opt("TrayIconHide",1); Don't allow the user to see/cancel the process.
do
sleep(10000); Prevent process from hogging CPU
until @hour>1 ; Defer start of checking to 2am if a user logs-on just after
midnight.
do
sleep(10000)
until @hour<1 ; Wait until after Dracula starts his shift...
Shutdown(0)

The issue here is that it won't log off if the user has left modified files
open. There is no easy answer to this one; you either force logoff (4) and
trash the data, or don't.

http://autoitscript.com

:
 
G

Guest

AutoIt gets picked up on some virus scanner besides this, it creates macros
which if you don't have focus won't run anyway
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top