Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for silent OS upgrade task #176

Merged
merged 1 commit into from Jun 9, 2019

Conversation

ge0rdi
Copy link
Member

@ge0rdi ge0rdi commented Jun 6, 2019

Open-Shell needs to adjust itself after OS upgrade. It seems that
StartMenuHelper registration is lost after such upgrade:

http://www.classicshell.net/forum/viewtopic.php?f=7&t=8082#p34821

To fix this registration, administrator rights are required (means user
interaction, UAC).

While this is acceptable in consumer environment, it is typically not
desired in business environment where users typically doesn't have
administrator rights.

This patch allows to run Open-Shell in silent upgrade mode that will:

  • check if OS version changed (otherwise end immediately)
  • perform OS upgrade tasks without any user interraction

Such mode can be then used to create scheduled task that will run this
silent upgrade check 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"

#167

`Open-Shell` needs to adjust itself after OS upgrade. It seems that
`StartMenuHelper` registration is lost after such upgrade:

http://www.classicshell.net/forum/viewtopic.php?f=7&t=8082#p34821

To fix this registration, administrator rights are required (means user
interaction, UAC).

While this is acceptable in consumer environment, it is typically not
desired in business environment where users typically doesn't have
administrator rights.

This patch allows to run `Open-Shell` in silent upgrade mode that will:
* check if OS version changed (otherwise end immediately)
* perform OS upgrade tasks without any user interraction

Such mode can be then used to create scheduled task that will run this
silent upgrade check 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"`

 Open-Shell#167
@AppVeyorBot
Copy link

@Ibuprophen
Copy link
Member

👍 Kudos to you @ge0rdi!👌

@coddec coddec requested a review from Ibuprophen June 7, 2019 00:30
@ge0rdi ge0rdi merged commit 38c155c into Open-Shell:master Jun 9, 2019
@ge0rdi ge0rdi deleted the silent-upgrade-switch branch June 9, 2019 18:27
@Nodens-
Copy link

Nodens- commented Jun 11, 2019

@ibuprophen1 The way he is doing it is correct. System32 is automatically redirected to syswow64 when applicable. Even the document you linked tells you so if you read it carefully.

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

Successfully merging this pull request may close these issues.

None yet

5 participants