Compare commits

..

No commits in common. "b51f25e7ce88cdc31aaaed0ea782cbe054241893" and "a80ac15677c97ba0bcb9b8b9ce998edfef9536e1" have entirely different histories.

5 changed files with 30 additions and 34 deletions

View file

@ -143,7 +143,7 @@
publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS"
xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<ComputerName></ComputerName> <ComputerName>DerGeret</ComputerName>
<ProductKey>W269N-WFGWX-YVC9B-4J6C9-T83GX</ProductKey> <ProductKey>W269N-WFGWX-YVC9B-4J6C9-T83GX</ProductKey>
</component> </component>
</settings> </settings>
@ -188,37 +188,37 @@
<RegisteredOwner>Admin</RegisteredOwner> <RegisteredOwner>Admin</RegisteredOwner>
<DisableAutoDaylightTimeSet>false</DisableAutoDaylightTimeSet> <DisableAutoDaylightTimeSet>false</DisableAutoDaylightTimeSet>
<FirstLogonCommands> <FirstLogonCommands>
<!-- <SynchronousCommand wcm:action="add"> <SynchronousCommand wcm:action="add">
<Description>Control Panel View</Description> <Description>Control Panel View</Description>
<Order>1</Order> <Order>1</Order>
<CommandLine>reg add <CommandLine>reg add
"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\ControlPanel" "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\ControlPanel"
/v StartupPage /t REG_DWORD /d 1 /f</CommandLine> /v StartupPage /t REG_DWORD /d 1 /f</CommandLine>
<RequiresUserInput>true</RequiresUserInput> <RequiresUserInput>true</RequiresUserInput>
</SynchronousCommand> --> </SynchronousCommand>
<!-- <SynchronousCommand wcm:action="add"> <SynchronousCommand wcm:action="add">
<Order>2</Order> <Order>2</Order>
<Description>Control Panel Icon Size</Description> <Description>Control Panel Icon Size</Description>
<RequiresUserInput>false</RequiresUserInput> <RequiresUserInput>false</RequiresUserInput>
<CommandLine>reg add <CommandLine>reg add
"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\ControlPanel" "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\ControlPanel"
/v AllItemsIconView /t REG_DWORD /d 0 /f</CommandLine> /v AllItemsIconView /t REG_DWORD /d 0 /f</CommandLine>
</SynchronousCommand> -->
<SynchronousCommand wcm:action="add">
<Order>1</Order>
<RequiresUserInput>false</RequiresUserInput>
<CommandLine>cmd /C wmic useraccount where name="Admin" set PasswordExpires=false</CommandLine>
<Description>Password Never Expires</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<Order>2</Order>
<RequiresUserInput>false</RequiresUserInput>
<CommandLine>powershell -c "Set-ExecutionPolicy -Force Bypass"</CommandLine>
<Description>Allow PowerShell scripts from anywhere.</Description>
</SynchronousCommand> </SynchronousCommand>
<SynchronousCommand wcm:action="add"> <SynchronousCommand wcm:action="add">
<Order>3</Order> <Order>3</Order>
<RequiresUserInput>false</RequiresUserInput> <RequiresUserInput>false</RequiresUserInput>
<CommandLine>cmd /C wmic useraccount where name="Admin" set
PasswordExpires=false</CommandLine>
<Description>Password Never Expires</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<Order>4</Order>
<RequiresUserInput>false</RequiresUserInput>
<CommandLine>powershell -c "Set-ExecutionPolicy -Force Bypass"</CommandLine>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<Order>5</Order>
<RequiresUserInput>false</RequiresUserInput>
<CommandLine>powershell -c <CommandLine>powershell -c
Set-ExecutionPolicy Bypass -Scope Process -Force; Set-ExecutionPolicy Bypass -Scope Process -Force;
[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072;
@ -230,8 +230,8 @@
choco install -y powershell-core --install-arguments='"ADD_FILE_CONTEXT_MENU_RUNPOWERSHELL=1 ADD_EXPLORER_CONTEXT_MENU_OPENPOWERSHELL=1 REGISTER_MANIFEST=1 USE_MU=1 ENABLE_MU=1"'; choco install -y powershell-core --install-arguments='"ADD_FILE_CONTEXT_MENU_RUNPOWERSHELL=1 ADD_EXPLORER_CONTEXT_MENU_OPENPOWERSHELL=1 REGISTER_MANIFEST=1 USE_MU=1 ENABLE_MU=1"';
refreshenv; refreshenv;
cd $env:USERPROFILE/Documents; cd $env:USERPROFILE/Documents;
git clone https://git.nuth.ch/manuth/PortValhalla.git;</CommandLine> git clone https://git.nuth.ch/manuth/PortValhalla.git;
<Description>Install PowerShell Core and git and run setup</Description> pwsh PortValhalla/profiles/DerGeret/Restore.ps1;</CommandLine>
</SynchronousCommand> </SynchronousCommand>
</FirstLogonCommands> </FirstLogonCommands>
<TimeZone>W. Europe Standard Time</TimeZone> <TimeZone>W. Europe Standard Time</TimeZone>

View file

@ -5,4 +5,4 @@ rem
cls cls
echo. echo.
echo Starting windows Setup... echo Starting windows Setup...
X:\PowerShell\pwsh.exe -ExecutionPolicy bypass -file "X:\Scripts\Startup.ps1"; X:\PowerShell\pwsh.exe -ExecutionPolicy bypass -file "X:\Scripts\Setup.ps1"

View file

@ -1,3 +1,13 @@
function Invoke-Diskpart {
param (
$script
)
$file = New-TemporaryFile;
$null = Set-Content "$file" "$script";
& diskpart -s "$file";
}
$drives = & wmic volume get "DriveLetter,Label"; $drives = & wmic volume get "DriveLetter,Label";
$drive = $($($drives | Select-String -Pattern "winiso") -split "\s+")[0]; $drive = $($($drives | Select-String -Pattern "winiso") -split "\s+")[0];

View file

@ -1,14 +0,0 @@
$null = $env:WIN_COMPUTER_NAME;
$null = $env:SETUP_SCRIPT_NAME;
Set-ExecutionPolicy Bypass -Scope Process -Force;
[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072;
Invoke-Expression ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'));
Import-Module $env:ChocolateyInstall/helpers/chocolateyProfile.psm1;
choco install -y git
choco install -y powershell-core;
refreshenv;
git clone https://git.nuth.ch/manuth/PortValhalla.git;
Set-Location PortValhalla;
pwsh;

View file

@ -1,3 +1,3 @@
wpeinit wpeinit
powercfg /s 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c powercfg /s 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c
X:\Scripts\Startup.cmd X:\Scripts\Setup.cmd