Add kvminstall.ps1 to allow easier acquisition of KVM

This commit is contained in:
Glenn Condron 2014-06-02 16:56:44 -07:00
parent 9851adabc0
commit 646dae6d58
4 changed files with 556 additions and 543 deletions

16
kvm.cmd
View File

@ -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"
)

1066
kvm.ps1

File diff suppressed because it is too large Load Diff

15
kvminstall.ps1 Normal file
View File

@ -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;

View File

@ -1,2 +0,0 @@
@"%~dp0kvm.cmd" setup
pause