Add kvminstall.ps1 to allow easier acquisition of KVM
This commit is contained in:
parent
9851adabc0
commit
646dae6d58
16
kvm.cmd
16
kvm.cmd
|
|
@ -1,8 +1,8 @@
|
|||
@Echo off
|
||||
|
||||
PowerShell -NoProfile -NoLogo -ExecutionPolicy unrestricted -Command "[System.Threading.Thread]::CurrentThread.CurrentCulture = ''; [System.Threading.Thread]::CurrentThread.CurrentUICulture = '';& '%~dp0kvm.ps1' %*"
|
||||
|
||||
IF EXIST "%USERPROFILE%\.kre\run-once.cmd" (
|
||||
CALL "%USERPROFILE%\.kre\run-once.cmd"
|
||||
DEL "%USERPROFILE%\.kre\run-once.cmd"
|
||||
)
|
||||
@Echo off
|
||||
|
||||
PowerShell -NoProfile -NoLogo -ExecutionPolicy unrestricted -Command "[System.Threading.Thread]::CurrentThread.CurrentCulture = ''; [System.Threading.Thread]::CurrentThread.CurrentUICulture = '';& '%~dp0kvm.ps1' %*"
|
||||
|
||||
IF EXIST "%USERPROFILE%\.kre\run-once.cmd" (
|
||||
CALL "%USERPROFILE%\.kre\run-once.cmd"
|
||||
DEL "%USERPROFILE%\.kre\run-once.cmd"
|
||||
)
|
||||
|
|
|
|||
|
|
@ -0,0 +1,15 @@
|
|||
$tempPath = Join-Path $env:TEMP "kvminstall"
|
||||
$kvmPs1Path = Join-Path $tempPath "kvm.ps1"
|
||||
$kvmCmdPath = Join-Path $tempPath "kvm.cmd"
|
||||
|
||||
Write-Host "Using temporary directory: $tempPath";
|
||||
if (![System.IO.Directory]::Exists($tempPath)) {[System.IO.Directory]::CreateDirectory($tempPath)}
|
||||
|
||||
|
||||
$webClient = New-Object System.Net.WebClient
|
||||
Write-Host "Downloading KVM.ps1 to $kvmPs1Path";
|
||||
$webClient.DownloadFile('https://raw.githubusercontent.com/aspnet/Home/master/kvm.ps1', $kvmPs1Path);
|
||||
Write-Host "Downloading KVM.cmd to $kvmCmdPath";
|
||||
$webClient.DownloadFile('https://raw.githubusercontent.com/aspnet/Home/master/kvm.cmd', $kvmCmdPath);
|
||||
Write-Host "Installing KVM";
|
||||
& $kvmCmdPath setup;
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
@"%~dp0kvm.cmd" setup
|
||||
pause
|
||||
Loading…
Reference in New Issue