Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions src/playbook/Executables/ASSOC.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -201,9 +201,12 @@ if ($Hive.StartsWith("S-"))
$fileStream.Close()
$dataString = [Text.Encoding]::Unicode.GetString($bytesData)
$position1 = $dataString.IndexOf($userExperienceSearch)
$position2 = $dataString.IndexOf("}", $position1)

$userExperience = $dataString.Substring($position1, $position2 - $position1 + 1)
if ($position1 -ge 0) {
$position2 = $dataString.IndexOf("}", $position1)
if ($position2 -gt $position1) {
$userExperience = $dataString.Substring($position1, $position2 - $position1 + 1)
}
}
}

Write-Host "Setting file associations for HKEY_USERS\$Hive..."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Start-Process -FilePath "$networkDiscoveryConfigPath\Enable Network Discovery Se
# Enable NetBios over TCP/IP
$interfaces = Get-ChildItem "HKLM:\SYSTEM\CurrentControlSet\Services\NetBT\Parameters\Interfaces" -Recurse | Where-Object { $_.GetValue("NetbiosOptions") -ne $null }
foreach ($interface in $interfaces) {
Set-ItemProperty -Path $interface.PSPath -Name "NetbiosOptions" -Value 2 | Out-Null
Set-ItemProperty -Path $interface.PSPath -Name "NetbiosOptions" -Value 0 | Out-Null
}

# Enable NetBIOS service
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ function ProcessCab($cabPath) {
return $false
}

# add test cert
# add Atlas cert to root store
# isn't cleared later as it's required for the alt repair source
$certRegPath = "HKLM:\Software\Microsoft\SystemCertificates\ROOT\Certificates\8A334AA8052DD244A647306A76B8178FA215F344"
if (!(Test-Path "$certRegPath")) {
Expand Down
2 changes: 1 addition & 1 deletion src/playbook/Executables/CLEANUP.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -101,4 +101,4 @@ else {
# Delete all system restore points
# This is so that users can't attempt to revert from Atlas to stock with Restore Points
# It won't work, a full Windows reinstall is required ^
vssadmin delete shadows /all /quiet
vssadmin delete shadows /all /quiet 2>$null
2 changes: 2 additions & 0 deletions src/playbook/Executables/LIBREWOLF.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ $librewolfDownload = "https://gitlab.com/api/v4/projects/$gitLabId/packages/gene
Write-Output "Downloading the latest LibreWolf setup"
$outputLibrewolf = "$drive\$librewolfFileName"
curl.exe -LSs "$librewolfDownload" -o "$outputLibrewolf" $timeouts
if (!$?) { throw "Downloading LibreWolf failed." }

Write-Output "Installing LibreWolf silently"
Start-Process -Wait -FilePath $outputLibrewolf -ArgumentList "/S"
Expand All @@ -44,6 +45,7 @@ $librewolfUpdaterDownload = (Invoke-RestMethod -Uri "$librewolfUpdaterURI").Asse
Write-Output "Downloading the latest LibreWolf WinUpdater ZIP"
$outputLibrewolfUpdater = "$drive\librewolf-winupdater.zip"
curl.exe -LSs "$librewolfUpdaterDownload" -o "$outputLibrewolfUpdater" $timeouts
if (!$?) { throw "Downloading LibreWolf WinUpdater failed." }

Write-Output "Extracting Librewolf-WinUpdater"
Expand-Archive -Path $outputLibrewolfUpdater -DestinationPath "$programs\LibreWolf\librewolf-winupdater" -Force
Expand Down
6 changes: 4 additions & 2 deletions src/playbook/Executables/SETPATHS.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ foreach ($key in $registryKeys) {
if ($path -notlike "$windir\AtlasDesktop\*") {
$marker = "AtlasDesktop\"
$index = $path.IndexOf($marker)
$result = $path.Substring($index + $marker.Length)
Set-ItemProperty -Path $key.PSPath -Name $valueName -Value "$windir\AtlasDesktop\$result"
if ($index -ge 0) {
$result = $path.Substring($index + $marker.Length)
Set-ItemProperty -Path $key.PSPath -Name $valueName -Value "$windir\AtlasDesktop\$result"
}
}
}
6 changes: 2 additions & 4 deletions src/playbook/Executables/TASKBARPINS.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,9 @@ foreach ($userKey in (Get-RegUserPaths -NoDefault).PsPath) {

Write-Output "Clearing current shortcuts..."
$taskBarAppData = "$appData\$taskBarLocation"
if (Test-Path $taskBarAppData -PathType Leaf) {
Write-Output "Deleting TaskBar file..."
Remove-Item -Path $taskBarAppData -Force
if (Test-Path $taskBarAppData) {
Remove-Item -Path "$taskBarAppData\*" -Force -Recurse
}
Get-ChildItem $taskBarAppData | Remove-Item -Force -Recurse

Write-Output "Adding new shortcuts..."
Copy-Item -Path "$tmp\*" -Destination $taskBarAppData -Force
Expand Down
Loading