Skip to content

Commit

Permalink
Merge branch 'dev' into lockscreen
Browse files Browse the repository at this point in the history
  • Loading branch information
he3als committed Nov 1, 2023
2 parents 623dcd5 + 8711f95 commit 84fdd6a
Show file tree
Hide file tree
Showing 22 changed files with 107 additions and 186 deletions.
12 changes: 3 additions & 9 deletions src/playbook/Configuration/atlas/start.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,18 +58,12 @@ actions:
weight: 150
option: 'browser-brave'

- !writeStatus: {status: 'Installing LibreWolf', option: 'browser-librewolf'}
- !writeStatus: {status: 'Installing Waterfox', option: 'browser-waterfox'}
- !run:
exe: 'powershell.exe'
args: '-NoP -File LIBREWOLF.ps1'
args: '-NoP -File "SOFTWARE.ps1" -Waterfox'
exeDir: true
weight: 150
option: 'librewolf-winupdater'
- !run:
exe: 'powershell.exe'
args: '-NoP -File "LIBREWOLF.ps1" -NoUpdater'
exeDir: true
weight: 150
option: 'librewolf-winget'
option: 'browser-waterfox'

################ END NO LOCAL BUILD ################
1 change: 1 addition & 0 deletions src/playbook/Configuration/tweaks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ tasks:
- tweaks\qol\show-all-tasks-control-panel.yml
- tweaks\qol\visual-effects.yml
- tweaks\qol\disable-tips.yml
- tweaks\qol\disable-system-restore.yml
- tweaks\qol\set-hidden-settings-pages.yml

# -------------------------------------------------------------------------- #
Expand Down
10 changes: 10 additions & 0 deletions src/playbook/Configuration/tweaks/qol/disable-system-restore.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
title: Disable System Restore
description: Disable System Restore as it is known to be an unreliable feature
privilege: TrustedInstaller
actions:
- !registryValue:
path: 'HKLM\SOFTWARE\Policies\Microsoft\Windows NT\SystemRestore'
value: 'DisableSR'
data: '1'
type: REG_DWORD
4 changes: 2 additions & 2 deletions src/playbook/Configuration/tweaks/qol/taskbar/config-pins.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ actions:
exeDir: true
- !run:
exe: 'TASKBARPINS.cmd'
args: '"LibreWolf"'
option: 'browser-librewolf'
args: '"Waterfox"'
option: 'browser-waterfox'
exeDir: true
- !run:
exe: 'TASKBARPINS.cmd'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,9 @@ init_item "Ungoogled Chromium" "eloston.ungoogled-chromium"
# https://winget.run/pkg/Mozilla/Firefox
init_item "Mozilla Firefox" "Mozilla.Firefox"

# https://winget.run/pkg/Waterfox/Waterfox
init_item "Waterfox" "Waterfox.Waterfox"

# https://winget.run/pkg/Brave/brave
init_item "Brave Browser" "Brave.Brave"

Expand Down
Binary file not shown.
Empty file.
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
@echo off
set "log=notepad "%~1""
set "nr=echo] > "%~2""
set "s=del /f /q "%~3""

cls & echo Type %%log%% to open the log.
echo Type %%nr%% to disable automatic restart.
echo Type %%nr%% to disable automatic restart.
echo Type %%s%% to stop auto-focus of MSHTA.
Original file line number Diff line number Diff line change
Expand Up @@ -18,25 +18,24 @@ powercfg /s 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c

echo INFO: Setting variables...

set "sourceDriveCommand=reg query "HKLM\SOFTWARE\Microsoft\RecoveryEnvironment" /v "SourceDrive""
set "associatedOSDriveLetterCommand=reg query "HKLM\SOFTWARE\Microsoft\RecoveryEnvironment" /v "AssociatedOSDriveLetter""

:: Make Windows Recovery Registry key for variables
:: Also would mount the WinRE partition
start /min %SystemDrive%\sources\recovery\RecEnv.exe
:recEnvGetKey
reg query HKLM\SOFTWARE\Microsoft\RecoveryEnvironment > nul 2>&1
if %errorlevel% NEQ 0 goto recEnvGetKey
echo INFO: Killing RecEnv...
wmic process where "name='RecEnv.exe'" call terminate > nul

%sourceDriveCommand% > nul 2>&1 || goto recEnvGetKey
%associatedOSDriveLetterCommand% > nul 2>&1 || goto recEnvGetKey
:: Set drive letters
for /f "usebackq tokens=3 delims=\ " %%a in (`reg query "HKLM\SOFTWARE\Microsoft\RecoveryEnvironment" /v "SourceDrive"`) do (
for /f "usebackq tokens=3 delims=\ " %%a in (`%sourceDriveCommand%`) do (
set "recoveryDrive=%%a"
)
for /f "usebackq tokens=3 delims=\ " %%a in (`reg query "HKLM\SOFTWARE\Microsoft\RecoveryEnvironment" /v "AssociatedOSDriveLetter"`) do (
for /f "usebackq tokens=3 delims=\ " %%a in (`%associatedOSDriveLetterCommand%`) do (
set "targetDrive=%%a"
)

:: Notify VBS on what to do
set "bitlockerKeyPath=%recoveryDrive%\bitlockerAtlas.txt"
set "focusPath=%currentDirectory%\FocusMSHTA"
if exist "%recoveryDrive%\AtlasComponentPackageInstallation" (
echo] > "%systemdrive%\AtlasComponentPackageInstallation"
del /f /q "%recoveryDrive%\AtlasComponentPackageInstallation"
Expand All @@ -45,6 +44,11 @@ powercfg /s 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c
call :deleteBitlockerInfo
exit
)
:: Allow enough time for RecEnv to properly initialize
%wait% 7000
del /f /q "%focusPath%"
echo INFO: Killing RecEnv...
wmic process where "name='RecEnv.exe'" call terminate > nul

:: BitLocker
if exist "%targetDrive%\Windows" goto afterBitLocker
Expand Down Expand Up @@ -84,7 +88,7 @@ powercfg /s 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c
)

echo INFO: Starting debug console...
start /i /d "%targetDrive%\Windows" /min "Atlas Debug Console" cmd /k %currentDirectory%debug.cmd "%logPath%" "%dontRestartPath%"
start /i /d "%targetDrive%\Windows" /min "Atlas Debug Console" cmd /k %currentDirectory%debug.cmd "%logPath%" "%dontRestartPath%" "%focusPath%"

:: -------------------------------------------------------------------------------------------------------- ::
:: Start looping through packages ::
Expand Down Expand Up @@ -175,7 +179,8 @@ powercfg /s 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c
exit /b

:deleteBitlockerInfo
set "bitlockerKey=nu-uh" & del /f /q "%bitlockerKeyPath%"
set "bitlockerKey=nu-uh"
del /f /q "%recoveryDrive%\bitlockerAtlas.txt" > nul 2>&1
exit /b

:strlen [strVar] [rtnVar]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,22 +23,21 @@ Do
If Not bHTARunning Then
objShell.Run "mshta " & strHTAPath
End If

WScript.Sleep 3000

If objFSO.FileExists(systemDrive & "\atlas\FocusMSHTA") Then
objShell.AppActivate("Atlas Component Removal")
WScript.Sleep 500
Else
WScript.Sleep 3000
End If
Loop
ElseIf objFSO.FileExists(systemDrive & "\AtlasNormalWindowsRecovery") Then
objShell.Run systemDrive & "\sources\recovery\RecEnv.exe", 1
Do
WScript.Sleep 999999999
Loop
WScript.Quit
End If

WScript.Sleep 1000
packagesCheck = packagesCheck + 1
If packagesCheck >= 8 Then
objShell.Run systemDrive & "\sources\recovery\RecEnv.exe", 1
Do
WScript.Sleep 999999999
Loop
WScript.Quit
End If
Loop
Original file line number Diff line number Diff line change
Expand Up @@ -138,10 +138,10 @@ $failedRemovalLink
}

function StartupTask ($RecoveryBroken, $SpaceFailure) {
$arguments = '-NoP -EP Unrestricted -WindowStyle Hidden -C "& $(Join-Path $env:windir ''\AtlasModules\PackagesEnvironment\winrePackages.ps1'') -NextStartup ' `
$arguments = '/c powershell -NoP -EP Unrestricted -WindowStyle Hidden -C "& $(Join-Path $env:windir ''\AtlasModules\PackagesEnvironment\winrePackages.ps1'') -NextStartup ' `
+ $(if ($RecoveryBroken) {'-RecoveryBroken'} elseif ($SpaceFailure) {"-SpaceFailure $spaceFailure"}) `
+ $(if ($PlaybookInstall) {'-PlaybookInstall'}) + '"'
$action = New-ScheduledTaskAction -Execute 'powershell' -Argument $arguments
$action = New-ScheduledTaskAction -Execute 'cmd' -Argument $arguments
Register-ScheduledTask -TaskName $failCheck -Action $action @taskArgs | Out-Null
if ($RecoveryBroken -or $SpaceFailure) { exit 1 }
}
Expand Down Expand Up @@ -346,8 +346,8 @@ $failedRemovalLink
if ($PlaybookInstall) {
New-Item $featureStatusIndicator -Force | Out-Null
}
$action = New-ScheduledTaskAction -Execute 'powershell' `
-Argument '-EP Unrestricted -WindowStyle Hidden -NP & $(Join-Path $env:windir ''\AtlasModules\PackagesEnvironment\winrePackages.ps1'') -DeleteBitLockerPassword'
$action = New-ScheduledTaskAction -Execute 'cmd' `
-Argument '/c powershell -EP Unrestricted -WindowStyle Hidden -NP & $(Join-Path $env:windir ''\AtlasModules\PackagesEnvironment\winrePackages.ps1'') -DeleteBitLockerPassword'
Register-ScheduledTask -TaskName $bitlockerTaskName -Action $action @taskArgs | Out-Null
} else {
if (!$? -and $PlaybookInstall) {
Expand Down Expand Up @@ -398,6 +398,10 @@ $failedRemovalLink
[LaunchApps]
%WINDIR%\System32\wscript.exe, %SYSTEMDRIVE%\atlas\startup.vbs //B
"@)
# [IO.File]::WriteAllLines("$atlasWinreWim\Windows\System32\winpeshl.ini", @"
# [LaunchApps]
# %WINDIR%\System32\cmd.exe
# "@)

# Copy Atlas Package Installation Environment items
Write-Warning 'Creating package list and copying files...'
Expand Down
80 changes: 0 additions & 80 deletions src/playbook/Executables/LIBREWOLF.ps1

This file was deleted.

27 changes: 18 additions & 9 deletions src/playbook/Executables/SOFTWARE.ps1
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
param (
[switch]$Chrome,
[switch]$Brave
[switch]$Brave,
[switch]$Waterfox
)

# ----------------------------------------------------------------------------------------------------------- #
Expand All @@ -12,14 +13,6 @@ $tempDir = Join-Path -Path $env:TEMP -ChildPath $([System.IO.Path]::GetRandomFil
New-Item $tempDir -ItemType Directory -Force | Out-Null
Set-Location $tempDir

# Chrome
if ($Chrome) {
Write-Host "Installing Google Chrome..."
& curl.exe -LSs "https://dl.google.com/dl/chrome/install/googlechromestandaloneenterprise64.msi" -o "$tempDir\chrome.msi"
Start-Process -FilePath "$tempDir\chrome.msi" -WindowStyle Hidden -ArgumentList '/qn' -Wait 2>&1 | Out-Null
exit
}

# Brave
if ($Brave) {
Write-Host "Installing Brave..."
Expand All @@ -45,6 +38,22 @@ if ($Brave) {
exit
}

# Waterfox
if ($Waterfox) {
Write-Host "Installing Waterfox..."
& curl.exe -LSs "https://cdn1.waterfox.net/waterfox/releases/latest/windows" -o "$tempDir\watefox.exe"
Start-Process -FilePath "$tempDir\watefox.exe" -WindowStyle Hidden -ArgumentList '/S /ALLUSERS=1' -Wait 2>&1 | Out-Null
exit
}

# Chrome
if ($Chrome) {
Write-Host "Installing Google Chrome..."
& curl.exe -LSs "https://dl.google.com/dl/chrome/install/googlechromestandaloneenterprise64.msi" -o "$tempDir\chrome.msi"
Start-Process -FilePath "$tempDir\chrome.msi" -WindowStyle Hidden -ArgumentList '/qn' -Wait 2>&1 | Out-Null
exit
}

####################
## Software ##
####################
Expand Down
Binary file removed src/playbook/Executables/Shortcuts/LibreWolf.lnk
Binary file not shown.
Binary file added src/playbook/Executables/Shortcuts/Waterfox.lnk
Binary file not shown.
Loading

0 comments on commit 84fdd6a

Please sign in to comment.