Skip to content

Commit

Permalink
refactor: remove old checks for upgrade/downgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
he3als committed Jun 15, 2024
1 parent 3992edd commit e6a891c
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 80 deletions.
4 changes: 2 additions & 2 deletions src/playbook/Configuration/custom.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
title: Root Playbook File
description: Runs all of the Playbook files
actions:
# Check various conditions to see if the user should run Atlas or not
# Warn user if their Windows install is old
- !powerShell:
command: '.\UPGRADECHECK.ps1'
command: '.\INSTALLCHECK.ps1'
exeDir: true
wait: true

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@
title: Configure OEM Information
description: Configures OEM information to contain the Atlas version and the Atlas Discord server
actions:
- !powerShell:
command: '.\UPGRADECHECK.ps1 -SetVersion'
exeDir: true
wait: true
- !registryValue:
path: 'HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\OEMInformation'
value: 'Model'
data: 'AtlasOS v0.5.0 (dev)'
type: REG_SZ
- !registryValue:
path: 'HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\OEMInformation'
value: 'Manufacturer'
Expand All @@ -21,6 +22,8 @@ actions:
value: 'SupportPhone'
data: 'https://github.com/Atlas-OS/Atlas'
type: REG_SZ

# Legacy, not used for anything significant
- !registryValue:
path: 'HKLM\SOFTWARE\Atlas'
value: 'WinreFallbackFixed'
Expand Down
13 changes: 13 additions & 0 deletions src/playbook/Executables/INSTALLCHECK.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
if ((Get-ItemProperty $oemInfo -Name "Model" -EA 0).Model -notlike "*Atlas*") {
Write-Output "Model doesn't contain Atlas, Atlas doesn't seem to be installed currently."
if (20 -lt ((Get-Date) - (Get-CimInstance Win32_OperatingSystem).InstallDate).Days) {
@"
Windows seems to have been installed a while ago. A full Windows reinstall is highly recommended to ensure your initial install of Atlas works without problems.
Atlas will install anyways, but remember this if there's issues.
Follow our installation guide: https://docs.atlasos.net/getting-started/installation/
"@ | msg *
}
exit 2
}
74 changes: 0 additions & 74 deletions src/playbook/Executables/UPGRADECHECK.ps1

This file was deleted.

0 comments on commit e6a891c

Please sign in to comment.