Switched back to old import method and improved custom setup
This commit is contained in:
@@ -70,7 +70,7 @@ function CustomSetup {
|
||||
$Activate
|
||||
$Users = 0
|
||||
$UserReg = 0
|
||||
$UserRegUsername = ""
|
||||
$UserRegUsers = ""
|
||||
$RDP = 0
|
||||
$Choco = 0
|
||||
$ChocoApps = 0
|
||||
@@ -85,12 +85,19 @@ function CustomSetup {
|
||||
|
||||
$input = Read-Host "Do you need to setup users? (y/n)"
|
||||
if ($input -eq "y") {
|
||||
$Users = 1
|
||||
$Users = @()
|
||||
do {
|
||||
$input = Read-Host "Enter the name of the user you want to setup (leave empty to stop)"
|
||||
if ($input -ne "") { $Users += $input }
|
||||
} while ($input -ne "")
|
||||
$input = Read-Host "Do you need to setup a restricted user registry? (y/n)"
|
||||
if ($input -eq "y") {
|
||||
$UserReg = 1
|
||||
$input = Read-Host "Enter the username of the user you want to setup"
|
||||
$UserRegUsername = $input
|
||||
$UserRegUsers = @()
|
||||
do {
|
||||
$input = Read-Host "Enter the name of the user you want to setup registry for (leave empty to stop)"
|
||||
if ($input -ne "") { $UserRegUsers += $input }
|
||||
} while ($input -ne "")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -115,16 +122,16 @@ function CustomSetup {
|
||||
|
||||
$input = Read-Host "Do you need to setup WDAC? (y/n)"
|
||||
if ($input -eq "y") { $WDAC = 1 }
|
||||
SetupCustom -Office $Office -Activate $Activate -Users $Users -UserReg $UserReg -UserRegUsername $UserRegUsername -RDP $RDP -Choco $Choco -ChocoApps $ChocoApps -Update $Update -WDAC $WDAC
|
||||
SetupCustom -Office $Office -Activate $Activate -Users $Users -UserReg $UserReg -UserRegUsers $UserRegUsers -RDP $RDP -Choco $Choco -ChocoApps $ChocoApps -Update $Update -WDAC $WDAC
|
||||
}
|
||||
|
||||
function SetupCustom {
|
||||
param (
|
||||
[bool] $Office,
|
||||
[bool] $Activate,
|
||||
[bool] $Users,
|
||||
[array] $Users,
|
||||
[bool] $UserReg,
|
||||
[string] $UserRegUsername,
|
||||
[array] $UserRegUsers,
|
||||
[bool] $RDP,
|
||||
[bool] $Choco,
|
||||
[array] $ChocoApps,
|
||||
@@ -136,7 +143,11 @@ function SetupCustom {
|
||||
if ($Activate) { SetupActivaton }
|
||||
if ($Users) {
|
||||
SetupUsers
|
||||
if ($UserReg) { SetupUserReg -username $UserRegUsername }
|
||||
if ($UserReg) {
|
||||
foreach ($User in $UserRegUsers) {
|
||||
SetupUserReg -username $User
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($RDP) { EnableRDP }
|
||||
if ($Choco) {
|
||||
@@ -188,5 +199,5 @@ if (Test-Path -Path "C:\Windows\System32\CodeIntegrity\CiPolicies\Active\{b4d6b2
|
||||
Remove-Item -Path "C:\Windows\System32\CodeIntegrity\CiPolicies\Active\{b4d6b24c-c3ad-44e5-9dea-72c1ed9577b8}.cip"
|
||||
}
|
||||
}
|
||||
ImportModules
|
||||
OldImportModules
|
||||
Show-InstallationMenu
|
||||
Reference in New Issue
Block a user