diff --git a/winfs/Scripts/Setup.ps1 b/winfs/Scripts/Setup.ps1 index b1475e7..9ef9ffa 100644 --- a/winfs/Scripts/Setup.ps1 +++ b/winfs/Scripts/Setup.ps1 @@ -1,13 +1,3 @@ -function Invoke-Diskpart { - param ( - $script - ) - - $file = New-TemporaryFile; - $null = Set-Content "$file" "$script"; - & diskpart -s "$file"; -} - $drives = & wmic volume get "DriveLetter,Label"; $drive = $($($drives | Select-String -Pattern "winiso") -split "\s+")[0]; diff --git a/winfs/Scripts/Setup.cmd b/winfs/Scripts/Startup.cmd similarity index 91% rename from winfs/Scripts/Setup.cmd rename to winfs/Scripts/Startup.cmd index d5ecd3e..344523d 100644 --- a/winfs/Scripts/Setup.cmd +++ b/winfs/Scripts/Startup.cmd @@ -5,4 +5,4 @@ rem cls echo. echo Starting windows Setup... -X:\PowerShell\pwsh.exe -ExecutionPolicy bypass -file "X:\Scripts\Setup.ps1" +X:\PowerShell\pwsh.exe -ExecutionPolicy bypass -file "X:\Scripts\Startup.ps1"; diff --git a/winfs/Scripts/Startup.ps1 b/winfs/Scripts/Startup.ps1 new file mode 100644 index 0000000..01fff33 --- /dev/null +++ b/winfs/Scripts/Startup.ps1 @@ -0,0 +1,14 @@ +$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; diff --git a/winfs/Windows/System32/startnet.cmd b/winfs/Windows/System32/startnet.cmd index dbeae2d..876c59b 100644 --- a/winfs/Windows/System32/startnet.cmd +++ b/winfs/Windows/System32/startnet.cmd @@ -1,3 +1,3 @@ wpeinit powercfg /s 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c -X:\Scripts\Setup.cmd +X:\Scripts\Startup.cmd