Only open powershell during for setup
This commit is contained in:
parent
a80ac15677
commit
9727871912
4 changed files with 16 additions and 12 deletions
|
@ -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];
|
||||
|
||||
|
|
|
@ -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";
|
14
winfs/Scripts/Startup.ps1
Normal file
14
winfs/Scripts/Startup.ps1
Normal file
|
@ -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;
|
|
@ -1,3 +1,3 @@
|
|||
wpeinit
|
||||
powercfg /s 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c
|
||||
X:\Scripts\Setup.cmd
|
||||
X:\Scripts\Startup.cmd
|
||||
|
|
Loading…
Reference in a new issue