Fixed issues and improved WDAC selection
This commit is contained in:
12
README.md
12
README.md
@@ -5,18 +5,6 @@ Installation Script
|
||||
irm https://git.justw.tf/Lightemerald/setup-script/raw/branch/main/setupScript.ps1 | iex
|
||||
```
|
||||
|
||||
Windows Update
|
||||
```ps
|
||||
irm https://git.justw.tf/Lightemerald/setup-script/raw/branch/main/setupUpdate.ps1 | iex
|
||||
UpdateWindows
|
||||
```
|
||||
|
||||
WDAC Installation Script
|
||||
```ps
|
||||
irm https://git.justw.tf/Lightemerald/setup-script/raw/branch/main/setupWDAC.ps1 | iex
|
||||
Show-WDACMenu
|
||||
```
|
||||
|
||||
## Linux
|
||||
|
||||
Installation Script
|
||||
|
||||
@@ -134,7 +134,7 @@ function InstallApps {
|
||||
InstallZip -zip "Tectoglob_11_complet.zip" -exe "TectoGlob.exe" -app "TectoGlob"
|
||||
InstallZip -zip "Sismolog.zip" -exe "Sismolog.exe" -app "Sismolog"
|
||||
InstallExe -app "Respipoisson.exe"
|
||||
InstallMsi -app "regressi-mpeg-setup.msi"
|
||||
InstallMsi -app "Regressi.msi"
|
||||
if ((Test-Path 'C:\Users\Admin\AppData\Roaming\Microsoft\Start Menu\Programs\Regressi.lnk') -and -not (Test-Path 'C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Regressi.lnk')) {
|
||||
Move-Item -Path 'C:\Users\Admin\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Regressi.lnk' -Destination 'C:\ProgramData\Microsoft\Windows\Start Menu\Programs\' -Force
|
||||
}
|
||||
|
||||
@@ -42,7 +42,8 @@ function StandardSetup {
|
||||
InstallApps -Type $Type
|
||||
Rename-Computer -NewName "PC-IPR-$Type"
|
||||
UpdateWindows
|
||||
Show-WDACMenu
|
||||
$input = Read-Host "Would you like to enable WDAC? (y/N)"
|
||||
if ($input -eq "y") { SetupRDP -enable 1 }
|
||||
Write-Host "Installation complete!"
|
||||
$input = Read-Host "Would you like to restart now? (y/N)"
|
||||
if ($input -eq "y") {
|
||||
@@ -106,7 +107,7 @@ function CustomSetup {
|
||||
$input = Read-Host "Do you need to update windows? (y/N)"
|
||||
if ($input -eq "y") { $Update = 1 }
|
||||
|
||||
$input = Read-Host "Do you need to setup WDAC? (y/N)"
|
||||
$input = Read-Host "Do you need to enable WDAC? (y/N)"
|
||||
if ($input -eq "y") { $WDAC = 1 }
|
||||
SetupCustom -Office $Office -Activate $Activate -Users $Users -UserReg $UserReg -UserRegUsers $UserRegUsers -RDP $RDP -Choco $Choco -ChocoApps $ChocoApps -Update $Update -WDAC $WDAC
|
||||
}
|
||||
@@ -179,7 +180,7 @@ function Show-InstallationMenu {
|
||||
|
||||
if (Test-Path -Path "C:\Windows\System32\CodeIntegrity\CiPolicies\Active\{b4d6b24c-c3ad-44e5-9dea-72c1ed9577b8}.cip") {
|
||||
Write-Host "WDAC is enabled, not disabling WDAC will prevent the script from running properly. You should enable it again after the script is done."
|
||||
$input = Read-Host "Should we disabled WDAC? (Y/n)"
|
||||
$input = Read-Host "Should we disable WDAC? (Y/n)"
|
||||
if ($input -ne "n") {
|
||||
Remove-Item -Path "C:\Windows\System32\CodeIntegrity\CiPolicies\Active\{b4d6b24c-c3ad-44e5-9dea-72c1ed9577b8}.cip"
|
||||
Restart-Computer -Force
|
||||
|
||||
@@ -17,26 +17,6 @@ function DisableWDAC {
|
||||
Write-Host "WDAC file deleted!"
|
||||
}
|
||||
|
||||
function Show-WDACMenu {
|
||||
$selection = $null
|
||||
|
||||
do {
|
||||
Write-Host "What would you like to do?"
|
||||
Write-Host "1. Enable WDAC"
|
||||
Write-Host "2. Disable WDAC"
|
||||
Write-Host "3. Skip"
|
||||
|
||||
$selection = Read-Host "Enter the number of your choice"
|
||||
|
||||
switch ($selection) {
|
||||
"1" { EnableWDAC }
|
||||
"2" { DisableWDAC }
|
||||
"3" { Write-Host "Skipping WDAC..." }
|
||||
default { Write-Host "Invalid selection. Please choose 1, 2, or 3." }
|
||||
}
|
||||
} while ($selection -ne "1" -and $selection -ne "2" -and $selection -ne "3")
|
||||
}
|
||||
|
||||
function SetupWDAC {
|
||||
param (
|
||||
[bool] $enable
|
||||
|
||||
Reference in New Issue
Block a user