Skip to content
This repository has been archived by the owner on Oct 4, 2019. It is now read-only.

Avoid Windows login when auto-updating with win-updates.ps1 #219

Open
Conlapped opened this issue Sep 29, 2016 · 1 comment
Open

Avoid Windows login when auto-updating with win-updates.ps1 #219

Conlapped opened this issue Sep 29, 2016 · 1 comment

Comments

@Conlapped
Copy link

Hi,

I want to use win-updates.ps1 in order to spend less time updating and restarting clients.
It seems to work fine but Windows always asks for the adimin password when restarting.
Is there a way to bypass it as long as the script is running?
I'd like the client to update + restart as long as their are updates available and restore the admin-passwort afterwards. I know that there is a registry key called "AutoAdminLogon" but I am not sure how and where to include it.

I apreciate any help =)

@glangfield
Copy link

You can get creative and create a windows service that calls an .exe (I've used PrimalScript to wrap a .ps1) and make an .exe from it.

You can use instsrv.exe and srvany.exe to create and manage the service. You will also need to create a registry key for this. Something similar to below.

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\NAME OF SERVICE]
"Start"=dword:00000004
"DependOnService"="wuauserv"

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\NAME OF SERVICE\Parameters]
"Application"="c:\script.exe"

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants