Skip to content

OS upgrade without user interaction

ge0rdi edited this page Oct 28, 2020 · 4 revisions

Issue

Open-Shell displays following message after OS upgrade:

After that UAC prompt is shown to run OS upgrade task using administrator rights.
This may be not desired in business environments where end users typically don't have administrator rights.

Solution

To perform OS upgrade related tasks without user interaction, following command should be executed:

%ProgramFiles%\Open-Shell\StartMenu.exe -upgrade -silent

It needs to be run with administrator/system privileges.
If possible, it should be executed as part of OS upgrade deployment (using for example SCCM).

Note that at least Open-Shell 4.4.138 is required.

Eventually scheduled task can be created (prior to OS upgrade) to run the command on every boot with system rights:

schtasks /Create /RU "NT AUTHORITY\SYSTEM" /SC ONSTART /TN "Open-Shell OS updgrade check" /TR "'%ProgramFiles%\Open-Shell\StartMenu.exe' -upgrade -silent"

Note that if there was no OS version change the command does nothing and quickly ends.