From bd7f8f783df973ebf5140ee69810bae1d2e617b9 Mon Sep 17 00:00:00 2001
From: James Stringer <38541878+jamesstringerparsec@users.noreply.github.com>
Date: Thu, 6 Jan 2022 23:55:39 +0100
Subject: [PATCH 01/50] Be more strict with the assignment percentage

---
 CopyFilesToVM.ps1 | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/CopyFilesToVM.ps1 b/CopyFilesToVM.ps1
index 6585e0c..bd8be89 100644
--- a/CopyFilesToVM.ps1
+++ b/CopyFilesToVM.ps1
@@ -4256,10 +4256,10 @@ param(
 
     [float]$devider = [math]::round($(100 / $GPUResourceAllocationPercentage),2)
 
-    Set-VMGpuPartitionAdapter -VMName $VMName -MinPartitionVRAM 0 -MaxPartitionVRAM 1000000000 -OptimalPartitionVRAM ([math]::round($(1000000000 / $devider)))
-    Set-VMGPUPartitionAdapter -VMName $VMName -MinPartitionEncode 0 -MaxPartitionEncode 18446744073709551615 -OptimalPartitionEncode ([math]::round($(18446744073709551615 / $devider)))
-    Set-VMGpuPartitionAdapter -VMName $VMName -MinPartitionDecode 0 -MaxPartitionDecode 1000000000 -OptimalPartitionDecode ([math]::round($(1000000000 / $devider)))
-    Set-VMGpuPartitionAdapter -VMName $VMName -MinPartitionCompute 0 -MaxPartitionCompute 1000000000 -OptimalPartitionCompute ([math]::round($(1000000000 / $devider)))
+    Set-VMGpuPartitionAdapter -VMName $VMName -MinPartitionVRAM ([math]::round($(1000000000 / $devider))) -MaxPartitionVRAM ([math]::round($(1000000000 / $devider))) -OptimalPartitionVRAM ([math]::round($(1000000000 / $devider)))
+    Set-VMGPUPartitionAdapter -VMName $VMName -MinPartitionEncode ([math]::round($(18446744073709551615 / $devider))) -MaxPartitionEncode ([math]::round($(18446744073709551615 / $devider))) -OptimalPartitionEncode ([math]::round($(18446744073709551615 / $devider)))
+    Set-VMGpuPartitionAdapter -VMName $VMName -MinPartitionDecode ([math]::round($(1000000000 / $devider))) -MaxPartitionDecode ([math]::round($(1000000000 / $devider))) -OptimalPartitionDecode ([math]::round($(1000000000 / $devider)))
+    Set-VMGpuPartitionAdapter -VMName $VMName -MinPartitionCompute ([math]::round($(1000000000 / $devider))) -MaxPartitionCompute ([math]::round($(1000000000 / $devider))) -OptimalPartitionCompute ([math]::round($(1000000000 / $devider)))
 
 }
 

From 486ec10e445781b6d73806e169c877995ecf1b10 Mon Sep 17 00:00:00 2001
From: James Stringer <38541878+jamesstringerparsec@users.noreply.github.com>
Date: Fri, 7 Jan 2022 16:28:45 +0100
Subject: [PATCH 02/50] Update README.md

---
 README.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/README.md b/README.md
index aefe752..cd88a15 100644
--- a/README.md
+++ b/README.md
@@ -24,7 +24,7 @@ Easy-GPU-P does the following...
 3. Search your system for Powershell ISE and run as Administrator.
 4. In the extracted folder you downloaded, open PreChecks.ps1 in Powershell ISE.
 5. Open and Run PreChecks.ps1 in Powershell ISE using the green play button and copy the GPU Listed (or the warnings that you need to fix).
-6. Open CopyFilesToVM.ps1 and edit the params section at the top of the file, you need to be careful about how much ram, storage and hard drive you give it as you system needs to have that available.  On Windows 10 the GPUName must be left as "AUTO", In Windows 11 it can be either "AUTO" or the specific name of the GPU you want to partition exactly how it appears in PreChecks.ps1.  Additionally, you need to provide the path to the Windows 10/11 ISO file you downloaded.
+6. Open CopyFilesToVM.ps1 Powershell ISE and edit the params section at the top of the file, you need to be careful about how much ram, storage and hard drive you give it as you system needs to have that available.  On Windows 10 the GPUName must be left as "AUTO", In Windows 11 it can be either "AUTO" or the specific name of the GPU you want to partition exactly how it appears in PreChecks.ps1.  Additionally, you need to provide the path to the Windows 10/11 ISO file you downloaded.
 7. Run CopyFilesToVM.ps1 with your changes to the params section - this may take 5-10 minutes.
 8. View the VM in Hyper-V, once it gets to the Windows Desktop you will need to approve the certificate install request for Parsec and Virtual Audio Cable.
 9. Sign into Parsec on the VM.

From 8eb9e35f2bc49bebd59c884001b5236d9d5e2ee6 Mon Sep 17 00:00:00 2001
From: James Stringer <38541878+jamesstringerparsec@users.noreply.github.com>
Date: Sat, 8 Jan 2022 20:25:55 +0100
Subject: [PATCH 03/50] Remove commented out code

---
 User/Install.ps1 | 32 ++++----------------------------
 1 file changed, 4 insertions(+), 28 deletions(-)

diff --git a/User/Install.ps1 b/User/Install.ps1
index dc861d2..e58cef4 100644
--- a/User/Install.ps1
+++ b/User/Install.ps1
@@ -21,24 +21,7 @@ if (Test-Path HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninst
     $configfile += "host_privacy_mode = 1"
     $configfile | Out-File C:\ProgramData\Parsec\config.txt -Encoding ascii
     }
-
-<#
-    if (!((Get-ChildItem -Path Cert:\CurrentUser\TrustedPublisher).DnsNameList.Unicode -like "Parsec Cloud, Inc.")) {
-    cmd /c C:\ProgramFiles\Easy-GPU-P\cert.bat
-    }
-
-    Invoke-Item Cert:\CurrentUser\TrustedPublisher
-    start-sleep -s 30
-
-
-if (!((Get-ChildItem -Path Cert:\CurrentUser\TrustedPublisher).DnsNameList.Unicode -like "Parsec Cloud, Inc.")) {
-    Import-Certificate -CertStoreLocation Cert:\CurrentUser\TrustedPublisher -FilePath C:\ProgramData\Easy-GPU-P\parsecpublic.cer
-if (!(Test-Path C:\ProgramData\Easy-GPU-P\second.txt)) {
-    New-Item -ItemType File -Path C:\ProgramData\Easy-GPU-P\second.txt
-    Restart-Computer
-    }
-}
-#>
+    
 if (!(Get-WmiObject Win32_VideoController | Where-Object name -like "VB-Audio Virtual Cable")) {
     New-Item -Path "C:\Users\$env:Username\Downloads\VBCable" -ItemType Directory| Out-Null
     Expand-Archive -Path "C:\Users\$env:USERNAME\Downloads\VBCable.zip" -DestinationPath "C:\Users\$env:USERNAME\Downloads\VBCable"
@@ -54,15 +37,8 @@ if (!(Get-WmiObject Win32_VideoController | Where-Object name -like "VB-Audio Vi
     Start-Process -FilePath "C:\Users\$env:Username\Downloads\VBCable\VBCABLE_Setup_x64.exe" -ArgumentList '-i','-h'
     }
   
-#if(((Get-ChildItem -Path Cert:\CurrentUser\TrustedPublisher).DnsNameList.Unicode -like "Parsec Cloud, Inc.")) {
-    if (!(Get-WmiObject Win32_VideoController | Where-Object name -like "Parsec Virtual Display Adapter")) {
-    #cmd /c C:\ProgramFiles\Easy-GPU-P\cert.bat
-    Get-PnpDevice | Where-Object {$_.friendlyname -like "Microsoft Hyper-V Video" -and $_.status -eq "OK"} | Disable-PnpDevice -confirm:$false
-    Start-Process "C:\Users\$env:USERNAME\Downloads\parsec-vdd.exe" -ArgumentList "/s"
-    }
 
-<#}
-Else {
-Restart-Computer
+if (!(Get-WmiObject Win32_VideoController | Where-Object name -like "Parsec Virtual Display Adapter")) {
+Get-PnpDevice | Where-Object {$_.friendlyname -like "Microsoft Hyper-V Video" -and $_.status -eq "OK"} | Disable-PnpDevice -confirm:$false
+Start-Process "C:\Users\$env:USERNAME\Downloads\parsec-vdd.exe" -ArgumentList "/s"
 }
-#>

From 4dad50917d1d636d3f3d8b80d1f1d70d6bb7a61b Mon Sep 17 00:00:00 2001
From: James Stringer <38541878+jamesstringerparsec@users.noreply.github.com>
Date: Sun, 9 Jan 2022 01:16:34 +0100
Subject: [PATCH 04/50] Delete psscripts.ini

---
 User/psscripts.ini | 4 ----
 1 file changed, 4 deletions(-)
 delete mode 100644 User/psscripts.ini

diff --git a/User/psscripts.ini b/User/psscripts.ini
deleted file mode 100644
index 80b7b8b..0000000
--- a/User/psscripts.ini
+++ /dev/null
@@ -1,4 +0,0 @@
-
-[Logon]
-0CmdLine=Install.ps1
-0Parameters=-team_id 1mhDZ8RNbpGwFYwGYrMu9ewwcby -key ae31d6e201227b7caa977a0a9bce83652e67f29662d284c5e5c20db61e6d16d2

From a0d7fa1621ec4cfcce4518de5344c025d1047d17 Mon Sep 17 00:00:00 2001
From: James Stringer <38541878+jamesstringerparsec@users.noreply.github.com>
Date: Sun, 9 Jan 2022 13:17:26 +0100
Subject: [PATCH 05/50] Add files via upload

---
 User/psscripts.ini | 4 ++++
 1 file changed, 4 insertions(+)
 create mode 100644 User/psscripts.ini

diff --git a/User/psscripts.ini b/User/psscripts.ini
new file mode 100644
index 0000000..9292f3c
--- /dev/null
+++ b/User/psscripts.ini
@@ -0,0 +1,4 @@
+
+[Logon]
+0CmdLine=Install.ps1
+0Parameters=
\ No newline at end of file

From 11acb54e46054d888118a257a77af14c3474895b Mon Sep 17 00:00:00 2001
From: James Stringer <38541878+jamesstringerparsec@users.noreply.github.com>
Date: Sun, 9 Jan 2022 13:24:06 +0100
Subject: [PATCH 06/50] Improve install of VDD and VBCable

---
 CopyFilesToVM.ps1              |   9 +-
 User/Install.ps1               | 205 +++++++++++++++++++++++++++++----
 VMScripts/ParsecPublic.cer     | Bin 0 -> 1468 bytes
 VMScripts/ParsecVDDInstall.ps1 |  10 ++
 VMScripts/VBCableInstall.ps1   |  19 +++
 VMScripts/VDDMonitor.ps1       |  19 +++
 autounattend.xml               |   4 +-
 7 files changed, 242 insertions(+), 24 deletions(-)
 create mode 100644 VMScripts/ParsecPublic.cer
 create mode 100644 VMScripts/ParsecVDDInstall.ps1
 create mode 100644 VMScripts/VBCableInstall.ps1
 create mode 100644 VMScripts/VDDMonitor.ps1

diff --git a/CopyFilesToVM.ps1 b/CopyFilesToVM.ps1
index bd8be89..4b04432 100644
--- a/CopyFilesToVM.ps1
+++ b/CopyFilesToVM.ps1
@@ -7,6 +7,7 @@
     SizeBytes  = 40GB
     MemoryAmount = 8GB
     CPUCores = 4
+    NetworkSwitch = "Default Switch"
     UnattendPath = "$PSScriptRoot"+"\autounattend.xml"
     GPUName = "AUTO"
     GPUResourceAllocationPercentage = 50
@@ -103,6 +104,10 @@ param(
     if((Test-Path -Path $DriveLetter\Windows\system32\GroupPolicy\Machine\Scripts\Startup) -eq $true) {} Else {New-Item -Path $DriveLetter\Windows\system32\GroupPolicy\Machine\Scripts\Startup -ItemType directory | Out-Null}
     if((Test-Path -Path $DriveLetter\Windows\system32\GroupPolicy\Machine\Scripts\Shutdown) -eq $true) {} Else {New-Item -Path $DriveLetter\Windows\system32\GroupPolicy\Machine\Scripts\Shutdown -ItemType directory | Out-Null}
     if((Test-Path -Path $DriveLetter\ProgramData\Easy-GPU-P) -eq $true) {} Else {New-Item -Path $DriveLetter\ProgramData\Easy-GPU-P -ItemType directory | Out-Null}
+    Copy-Item -Path $psscriptroot\VMScripts\VDDMonitor.ps1 -Destination $DriveLetter\ProgramData\Easy-GPU-P
+    Copy-Item -Path $psscriptroot\VMScripts\VBCableInstall.ps1 -Destination $DriveLetter\ProgramData\Easy-GPU-P
+    Copy-Item -Path $psscriptroot\VMScripts\ParsecVDDInstall.ps1 -Destination $DriveLetter\ProgramData\Easy-GPU-P
+    Copy-Item -Path $psscriptroot\VMScripts\ParsecPublic.cer -Destination $DriveLetter\ProgramData\Easy-GPU-P
     Copy-Item -Path $psscriptroot\gpt.ini -Destination $DriveLetter\Windows\system32\GroupPolicy
     Copy-Item -Path $psscriptroot\User\psscripts.ini -Destination $DriveLetter\Windows\system32\GroupPolicy\User\Scripts
     Copy-Item -Path $psscriptroot\User\Install.ps1 -Destination $DriveLetter\Windows\system32\GroupPolicy\User\Scripts\Logon
@@ -4274,6 +4279,7 @@ param(
 [string]$UnattendPath,
 [int64]$MemoryAmount,
 [int]$CPUCores,
+[string]$NetworkSwitch,
 [string]$GPUName,
 [float]$GPUResourceAllocationPercentage,
 [string]$SourcePath,
@@ -4294,7 +4300,7 @@ param(
     $MaxAvailableVersion = (Get-VMHostSupportedVersion).Version | Where-Object {$_.Major -lt 254}| Select-Object -Last 1 
     Convert-WindowsImage -SourcePath $SourcePath -Edition $Edition -VHDFormat $Vhdformat -VHDPath $VhdPath -DiskLayout $DiskLayout -UnattendPath $UnattendPath -GPUName $GPUName -Team_ID $Team_ID -Key $Key -SizeBytes $SizeBytes| Out-Null
     if (Test-Path $vhdPath) {
-        New-VM -Name $VMName -MemoryStartupBytes $MemoryAmount -VHDPath $VhdPath -Generation 2 -SwitchName "Default Switch" -Version $MaxAvailableVersion | Out-Null
+        New-VM -Name $VMName -MemoryStartupBytes $MemoryAmount -VHDPath $VhdPath -Generation 2 -SwitchName $NetworkSwitch -Version $MaxAvailableVersion | Out-Null
         Set-VM -Name $VMName -ProcessorCount $CPUCores -CheckpointType Disabled -LowMemoryMappedIoSpace 3GB -HighMemoryMappedIoSpace 32GB -GuestControlledCacheTypes $true -AutomaticStopAction ShutDown
         Set-VMMemory -VMName $VMName -DynamicMemoryEnabled $false 
         $CPUManufacturer = Get-CimInstance -ClassName Win32_Processor | Foreach-Object Manufacturer
@@ -4305,6 +4311,7 @@ param(
             Set-VMProcessor -VMName $VMName -ExposeVirtualizationExtensions $true
             }
         Set-VMHost -ComputerName $ENV:Computername -EnableEnhancedSessionMode $false
+        Set-VMVideo -VMName $VMName -HorizontalResolution 1920 -VerticalResolution 1080
         Set-VMKeyProtector -VMName $VMName -NewLocalKeyProtector
         Enable-VMTPM -VMName $VMName 
         Add-VMDvdDrive -VMName $VMName -Path $SourcePath
diff --git a/User/Install.ps1 b/User/Install.ps1
index e58cef4..682606f 100644
--- a/User/Install.ps1
+++ b/User/Install.ps1
@@ -11,8 +11,6 @@ if (Test-Path HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninst
     {}
     else {
     (New-Object System.Net.WebClient).DownloadFile("https://builds.parsecgaming.com/package/parsec-windows.exe", "C:\Users\$env:USERNAME\Downloads\parsec-windows.exe")
-    (New-Object System.Net.WebClient).DownloadFile("https://builds.parsec.app/vdd/parsec-vdd-0.37.0.0.exe", "C:\Users\$env:USERNAME\Downloads\parsec-vdd.exe")
-    (New-Object System.Net.WebClient).DownloadFile("https://download.vb-audio.com/Download_CABLE/VBCABLE_Driver_Pack43.zip", "C:\Users\$env:USERNAME\Downloads\VBCable.zip")
     $currentPrincipal = New-Object Security.Principal.WindowsPrincipal([Security.Principal.WindowsIdentity]::GetCurrent())
     $currentPrincipal.IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator) | Out-File C:\ProgramData\Easy-GPU-P\admim.txt
     Start-Process "C:\Users\$env:USERNAME\Downloads\parsec-windows.exe" -ArgumentList "/silent", "/shared","/team_id=$team_id","/team_computer_key=$key" -wait
@@ -21,24 +19,189 @@ if (Test-Path HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninst
     $configfile += "host_privacy_mode = 1"
     $configfile | Out-File C:\ProgramData\Parsec\config.txt -Encoding ascii
     }
-    
-if (!(Get-WmiObject Win32_VideoController | Where-Object name -like "VB-Audio Virtual Cable")) {
-    New-Item -Path "C:\Users\$env:Username\Downloads\VBCable" -ItemType Directory| Out-Null
-    Expand-Archive -Path "C:\Users\$env:USERNAME\Downloads\VBCable.zip" -DestinationPath "C:\Users\$env:USERNAME\Downloads\VBCable"
-    $pathToCatFile = "C:\Users\$env:USERNAME\Downloads\VBCable\vbaudio_cable64_win7.cat"
-    $FullCertificateExportPath = "C:\Users\$env:USERNAME\Downloads\VBCable\VBCert.cer"
-    $VB = @{}
-    $VB.DriverFile = $pathToCatFile;
-    $VB.CertName = $FullCertificateExportPath;
-    $VB.ExportType = [System.Security.Cryptography.X509Certificates.X509ContentType]::Cert;
-    $VB.Cert = (Get-AuthenticodeSignature -filepath $VB.DriverFile).SignerCertificate;
-    [System.IO.File]::WriteAllBytes($VB.CertName, $VB.Cert.Export($VB.ExportType))
-    Import-Certificate -CertStoreLocation Cert:\LocalMachine\TrustedPublisher -FilePath $VB.CertName | Out-Null
-    Start-Process -FilePath "C:\Users\$env:Username\Downloads\VBCable\VBCABLE_Setup_x64.exe" -ArgumentList '-i','-h'
+
+Function ParsecVDDMonitorSetupScheduledTask {
+$XML = @"
+<?xml version="1.0" encoding="UTF-16"?>
+<Task version="1.2" xmlns="http://schemas.microsoft.com/windows/2004/02/mit/task">
+  <RegistrationInfo>
+    <Description>Monitors the state of Parsec Virtual Display and repairs if broken</Description>
+    <URI>\Monitor Parsec VDD State</URI>
+  </RegistrationInfo>
+  <Triggers>
+    <LogonTrigger>
+      <Enabled>true</Enabled>
+      <UserId>$(([System.Security.Principal.WindowsIdentity]::GetCurrent()).Name)</UserId>
+      <Delay>PT2M</Delay>
+    </LogonTrigger>
+  </Triggers>
+  <Principals>
+    <Principal id="Author">
+      <UserId>$(([System.Security.Principal.WindowsIdentity]::GetCurrent()).User.Value)</UserId>
+      <LogonType>S4U</LogonType>
+      <RunLevel>HighestAvailable</RunLevel>
+    </Principal>
+  </Principals>
+  <Settings>
+    <MultipleInstancesPolicy>IgnoreNew</MultipleInstancesPolicy>
+    <DisallowStartIfOnBatteries>true</DisallowStartIfOnBatteries>
+    <StopIfGoingOnBatteries>true</StopIfGoingOnBatteries>
+    <AllowHardTerminate>true</AllowHardTerminate>
+    <StartWhenAvailable>false</StartWhenAvailable>
+    <RunOnlyIfNetworkAvailable>false</RunOnlyIfNetworkAvailable>
+    <IdleSettings>
+      <StopOnIdleEnd>true</StopOnIdleEnd>
+      <RestartOnIdle>false</RestartOnIdle>
+    </IdleSettings>
+    <AllowStartOnDemand>true</AllowStartOnDemand>
+    <Enabled>true</Enabled>
+    <Hidden>false</Hidden>
+    <RunOnlyIfIdle>false</RunOnlyIfIdle>
+    <WakeToRun>false</WakeToRun>
+    <ExecutionTimeLimit>PT72H</ExecutionTimeLimit>
+    <Priority>7</Priority>
+  </Settings>
+  <Actions Context="Author">
+    <Exec>
+      <Command>C:\WINDOWS\system32\WindowsPowerShell\v1.0\powershell.exe</Command>
+      <Arguments>-file %programdata%\Easy-GPU-P\VDDMonitor.ps1</Arguments>
+    </Exec>
+  </Actions>
+</Task>
+"@
+
+    try {
+        Get-ScheduledTask -TaskName "Monitor Parsec VDD State" -ErrorAction Stop | Out-Null
+        Unregister-ScheduledTask -TaskName "Monitor Parsec VDD State" -Confirm:$false
+        }
+    catch {}
+    $action = New-ScheduledTaskAction -Execute 'C:\WINDOWS\system32\WindowsPowerShell\v1.0\powershell.exe' -Argument '-file %programdata%\Easy-GPU-P\VDDMonitor.ps1'
+    $trigger =  New-ScheduledTaskTrigger -AtStartup
+    Register-ScheduledTask -XML $XML -TaskName "Monitor Parsec VDD State" | Out-Null
+    }
+Function VBCableInstallSetupScheduledTask {
+$XML = @"
+<?xml version="1.0" encoding="UTF-16"?>
+<Task version="1.2" xmlns="http://schemas.microsoft.com/windows/2004/02/mit/task">
+  <RegistrationInfo>
+    <Description>Install VB Cable</Description>
+    <URI>\Install VB Cable</URI>
+  </RegistrationInfo>
+  <Triggers>
+    <LogonTrigger>
+      <Enabled>true</Enabled>
+      <UserId>$(([System.Security.Principal.WindowsIdentity]::GetCurrent()).Name)</UserId>
+      <Delay>PT2M</Delay>
+    </LogonTrigger>
+  </Triggers>
+  <Principals>
+    <Principal id="Author">
+      <UserId>$(([System.Security.Principal.WindowsIdentity]::GetCurrent()).User.Value)</UserId>
+      <LogonType>S4U</LogonType>
+      <RunLevel>HighestAvailable</RunLevel>
+    </Principal>
+  </Principals>
+  <Settings>
+    <MultipleInstancesPolicy>IgnoreNew</MultipleInstancesPolicy>
+    <DisallowStartIfOnBatteries>true</DisallowStartIfOnBatteries>
+    <StopIfGoingOnBatteries>true</StopIfGoingOnBatteries>
+    <AllowHardTerminate>true</AllowHardTerminate>
+    <StartWhenAvailable>false</StartWhenAvailable>
+    <RunOnlyIfNetworkAvailable>false</RunOnlyIfNetworkAvailable>
+    <IdleSettings>
+      <StopOnIdleEnd>true</StopOnIdleEnd>
+      <RestartOnIdle>false</RestartOnIdle>
+    </IdleSettings>
+    <AllowStartOnDemand>true</AllowStartOnDemand>
+    <Enabled>true</Enabled>
+    <Hidden>false</Hidden>
+    <RunOnlyIfIdle>false</RunOnlyIfIdle>
+    <WakeToRun>false</WakeToRun>
+    <ExecutionTimeLimit>PT72H</ExecutionTimeLimit>
+    <Priority>7</Priority>
+  </Settings>
+  <Actions Context="Author">
+    <Exec>
+      <Command>C:\WINDOWS\system32\WindowsPowerShell\v1.0\powershell.exe</Command>
+      <Arguments>-file %programdata%\Easy-GPU-P\VBCableInstall.ps1</Arguments>
+    </Exec>
+  </Actions>
+</Task>
+"@
+
+    try {
+        Get-ScheduledTask -TaskName "Install VB Cable" -ErrorAction Stop | Out-Null
+        Unregister-ScheduledTask -TaskName "Install VB Cable" -Confirm:$false
+        }
+    catch {}
+    $action = New-ScheduledTaskAction -Execute 'C:\WINDOWS\system32\WindowsPowerShell\v1.0\powershell.exe' -Argument '-file %programdata%\Easy-GPU-P\VBCableInstall.ps1'
+    $trigger =  New-ScheduledTaskTrigger -AtStartup
+    Register-ScheduledTask -XML $XML -TaskName "Install VB Cable" | Out-Null
     }
-  
+Function ParsecVDDInstallSetupScheduledTask {
+$XML = @"
+<?xml version="1.0" encoding="UTF-16"?>
+<Task version="1.2" xmlns="http://schemas.microsoft.com/windows/2004/02/mit/task">
+  <RegistrationInfo>
+    <Description>Install Parsec Virtual Display Driver</Description>
+    <URI>\Install Parsec Virtual Display Driver</URI>
+  </RegistrationInfo>
+  <Triggers>
+    <LogonTrigger>
+      <Enabled>true</Enabled>
+      <UserId>$(([System.Security.Principal.WindowsIdentity]::GetCurrent()).Name)</UserId>
+      <Delay>PT2M</Delay>
+    </LogonTrigger>
+  </Triggers>
+  <Principals>
+    <Principal id="Author">
+      <UserId>$(([System.Security.Principal.WindowsIdentity]::GetCurrent()).User.Value)</UserId>
+      <LogonType>S4U</LogonType>
+      <RunLevel>HighestAvailable</RunLevel>
+    </Principal>
+  </Principals>
+  <Settings>
+    <MultipleInstancesPolicy>IgnoreNew</MultipleInstancesPolicy>
+    <DisallowStartIfOnBatteries>true</DisallowStartIfOnBatteries>
+    <StopIfGoingOnBatteries>true</StopIfGoingOnBatteries>
+    <AllowHardTerminate>true</AllowHardTerminate>
+    <StartWhenAvailable>false</StartWhenAvailable>
+    <RunOnlyIfNetworkAvailable>false</RunOnlyIfNetworkAvailable>
+    <IdleSettings>
+      <StopOnIdleEnd>true</StopOnIdleEnd>
+      <RestartOnIdle>false</RestartOnIdle>
+    </IdleSettings>
+    <AllowStartOnDemand>true</AllowStartOnDemand>
+    <Enabled>true</Enabled>
+    <Hidden>false</Hidden>
+    <RunOnlyIfIdle>false</RunOnlyIfIdle>
+    <WakeToRun>false</WakeToRun>
+    <ExecutionTimeLimit>PT72H</ExecutionTimeLimit>
+    <Priority>7</Priority>
+  </Settings>
+  <Actions Context="Author">
+    <Exec>
+      <Command>C:\WINDOWS\system32\WindowsPowerShell\v1.0\powershell.exe</Command>
+      <Arguments>-file %programdata%\Easy-GPU-P\ParsecVDDInstall.ps1</Arguments>
+    </Exec>
+  </Actions>
+</Task>
+"@
+
+    try {
+        Get-ScheduledTask -TaskName "Install Parsec Virtual Display Driver" -ErrorAction Stop | Out-Null
+        Unregister-ScheduledTask -TaskName "Install Parsec Virtual Display Driver" -Confirm:$false
+        }
+    catch {}
+    $action = New-ScheduledTaskAction -Execute 'C:\WINDOWS\system32\WindowsPowerShell\v1.0\powershell.exe' -Argument '-file %programdata%\Easy-GPU-P\ParsecVDDInstall.ps1'
+    $trigger =  New-ScheduledTaskTrigger -AtStartup
+    Register-ScheduledTask -XML $XML -TaskName "Install Parsec Virtual Display Driver" | Out-Null
+    }
+
+ParsecVDDMonitorSetupScheduledTask
+VBCableInstallSetupScheduledTask
+ParsecVDDInstallSetupScheduledTask
 
-if (!(Get-WmiObject Win32_VideoController | Where-Object name -like "Parsec Virtual Display Adapter")) {
-Get-PnpDevice | Where-Object {$_.friendlyname -like "Microsoft Hyper-V Video" -and $_.status -eq "OK"} | Disable-PnpDevice -confirm:$false
-Start-Process "C:\Users\$env:USERNAME\Downloads\parsec-vdd.exe" -ArgumentList "/s"
-}
+Start-ScheduledTask -TaskName "Install VB Cable"
+Start-ScheduledTask -TaskName "Install Parsec Virtual Display Driver"
+Start-ScheduledTask -TaskName "Monitor Parsec VDD State"
\ No newline at end of file
diff --git a/VMScripts/ParsecPublic.cer b/VMScripts/ParsecPublic.cer
new file mode 100644
index 0000000000000000000000000000000000000000..dfc68ab4698742a88a2fab9805c4c0f904c0b27f
GIT binary patch
literal 1468
zcma)6drVVz6z=cd+Xu9zV4;A#3We~H$L~_!Lguv)-VWA*$Tml9n^LG0OQ8w_p=vP>
z1w~vmZgf#2fyiUo42omPM!^~wB1BD=K?VymxS4@4TpX}_2^iS+$L@dUeCOQroiE?{
zK_k5v8ZomOMF4`>^Oo$K#vU~%tOoh_PJMCkAmlP^f=nr<Wi9}0It^-YHnd@&IT(YF
z<VbNR$fp8ZJ||JFQcILNy)d;zj=Mr<D$VBG8w`d}1qsPXC{(UJjPHVh6om49-gG48
z3ME>FQYclcO4KDPp@a|yNK=ULK<Mer4Tmri7sK^0pA5w?B0LHwvk>OPy6<s5bYQS|
zF#raP(eVgC*J)Anw<HlhD^aPD8Du&o?g8DX`8<wemQGzE(<_B<>r}E5b)`(N)|TM*
z(2j!Xd}b6Bi^FlaeP0L2qhJ=FwNGgf9?<HF@r@L7OUezpQdPG69a%D6nNlv4Xtd>u
zU`m=$d;>)P3xr1CvsH0Gr=do`qmg-A#0UVb{Z@W<{i4*lq40He(emKvF!R;U(wY}>
zw3kQL_GF7`R=iWreURF6sZYH!Gjy^5O(gm*+<nV`+^iY(Z(Ht{;J-Z2IPi1R*OQr#
z5^wx?`CPfk4SZVIS?_iMaDI3)ck)*eF&4SA$mSZi>eco0gV9gAuErc2!GqlbCX;)J
zp2gLE_ldI~h%Pmb(}OjqI{fyyUv6vbLfC8SfirurJXrn1#C;l7<lZ|q=9Qun9*<dc
zSWySA@-*Vnh=$LJcSWn8u@zSX6+;<t#Hwoju%}>v-JnS4PS)KUvD9m;#*EW9b+?Cn
z#uI4q6P8<+#)rKb9Xa>&YNMqC?7v)P2nuN6ni0&Ciu?w>NR>TAm<trtIyOG5`TcNs
z5sfYyD*dD=u4%1!ZUTBx1$LMKb3Ef+9=z6O$LMs3^(~$H?i_wPK?6f6*a7p0er6Ga
zMVg3CXR=VUGj!tcbEF}ONg2d`;+>?B4J)i$!-EIF8it_=vv%G49)1`H+HQ8ED6FD>
z>V@f{4n~_J&0-T?sMnXqg@ws=8u7MU2usSPe7|9P%JCs8Jd`Z^cVoo=Y)q$y3$aAF
z7e+H|3QQ@$w4y-~7z6`0DI!4NPBAJYDgE<0!z5W!$Yjt}bsT`gn#~pfFdZy~zMC-w
zCYOz+wDPjjZQNkWn<~T<zqz`My8p6mg<+fbzfA=R5kd(;s-TA)Y8gHyHv(x}&w_l2
z$g=>nw9M{Rz248W#XIo*>4r=f*uJzZI+nw{ey@Y1)t|uIcS0b3E#05{;_lPp=eKEA
z<l&5xHPc_QFgOjmhto4yI*}~fJ}q{9_H1kOkxuWN`|}2#@YzMrZ{oRg)h4y!s1M^~
zj4LA?YeIS}Zw}XG6pSpeTL$_L?RK8MV<|)aWG8nYe|a(cy%E=X?wBcQ?hp&72d6F!
zhc#KiOiYAz$82x)(evh7{qDztL5pl@&rj_EE}hm>iu}0Dv`$fV-gugID*OhaPp**3
zR|KP@o`YXTdJNPw6B@tA);vq&m9Lg(?o3IESV3jax9J~=tit(}R^Jn5byu|hZ@e+)
AOaK4?

literal 0
HcmV?d00001

diff --git a/VMScripts/ParsecVDDInstall.ps1 b/VMScripts/ParsecVDDInstall.ps1
new file mode 100644
index 0000000..f5d71bd
--- /dev/null
+++ b/VMScripts/ParsecVDDInstall.ps1
@@ -0,0 +1,10 @@
+if (!(Get-WmiObject Win32_VideoController | Where-Object name -like "Parsec Virtual Display Adapter")) {
+(New-Object System.Net.WebClient).DownloadFile("https://builds.parsec.app/vdd/parsec-vdd-0.37.0.0.exe", "C:\Users\$env:USERNAME\Downloads\parsec-vdd.exe")
+while (((Get-ChildItem Cert:\LocalMachine\TrustedPublisher) | Where-Object {$_.Subject -like '*Parsec*'}) -eq $NULL) {
+    certutil -Enterprise -Addstore "TrustedPublisher" C:\ProgramData\Easy-GPU-P\ParsecPublic.cer
+    Start-Sleep -s 5
+    }
+Get-PnpDevice | Where-Object {$_.friendlyname -like "Microsoft Hyper-V Video" -and $_.status -eq "OK"} | Disable-PnpDevice -confirm:$false
+Start-Process "C:\Users\$env:USERNAME\Downloads\parsec-vdd.exe" -ArgumentList "/s"
+}
+
diff --git a/VMScripts/VBCableInstall.ps1 b/VMScripts/VBCableInstall.ps1
new file mode 100644
index 0000000..1c981a7
--- /dev/null
+++ b/VMScripts/VBCableInstall.ps1
@@ -0,0 +1,19 @@
+if (!(Get-WmiObject Win32_SoundDevice | Where-Object name -like "VB-Audio Virtual Cable")) {
+    (New-Object System.Net.WebClient).DownloadFile("https://download.vb-audio.com/Download_CABLE/VBCABLE_Driver_Pack43.zip", "C:\Users\$env:USERNAME\Downloads\VBCable.zip")
+    New-Item -Path "C:\Users\$env:Username\Downloads\VBCable" -ItemType Directory| Out-Null
+    Expand-Archive -Path "C:\Users\$env:USERNAME\Downloads\VBCable.zip" -DestinationPath "C:\Users\$env:USERNAME\Downloads\VBCable"
+    $pathToCatFile = "C:\Users\$env:USERNAME\Downloads\VBCable\vbaudio_cable64_win7.cat"
+    $FullCertificateExportPath = "C:\Users\$env:USERNAME\Downloads\VBCable\VBCert.cer"
+    $VB = @{}
+    $VB.DriverFile = $pathToCatFile;
+    $VB.CertName = $FullCertificateExportPath;
+    $VB.ExportType = [System.Security.Cryptography.X509Certificates.X509ContentType]::Cert;
+    $VB.Cert = (Get-AuthenticodeSignature -filepath $VB.DriverFile).SignerCertificate;
+    [System.IO.File]::WriteAllBytes($VB.CertName, $VB.Cert.Export($VB.ExportType))
+    while (((Get-ChildItem Cert:\LocalMachine\TrustedPublisher) | Where-Object {$_.Subject -like '*Vincent Burel*'}) -eq $NULL) {
+        certutil -Enterprise -Addstore "TrustedPublisher" $VB.CertName
+        Start-Sleep -s 5
+        }
+    Start-Process -FilePath "C:\Users\$env:Username\Downloads\VBCable\VBCABLE_Setup_x64.exe" -ArgumentList '-i','-h'
+    }
+  
\ No newline at end of file
diff --git a/VMScripts/VDDMonitor.ps1 b/VMScripts/VDDMonitor.ps1
new file mode 100644
index 0000000..5e0701c
--- /dev/null
+++ b/VMScripts/VDDMonitor.ps1
@@ -0,0 +1,19 @@
+$Global:VDD
+
+Function GetVDDState {
+$Global:VDD = Get-PnpDevice | where {$_.friendlyname -like "Parsec Virtual Display Adapter"}
+}
+
+While (1 -gt 0) {
+    GetVDDSTate
+    If ($Global:VDD -eq $NULL){
+    Exit
+    }
+    Do {
+        Enable-PnpDevice -InstanceId $Global:VDD.InstanceId -Confirm:$false
+        Start-Sleep -s 5
+        GetVDDState
+        }
+    Until ($Global:VDD.Status -eq 'OK')
+    Start-Sleep -s 10
+}
diff --git a/autounattend.xml b/autounattend.xml
index 46b308c..3665e20 100644
--- a/autounattend.xml
+++ b/autounattend.xml
@@ -123,7 +123,7 @@
       <CEIPEnabled>0</CEIPEnabled>
     </component>
     <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
-      <ComputerName>GPUP</ComputerName>
+      <ComputerName>GPUP122</ComputerName>
       <ProductKey>W269N-WFGWX-YVC9B-4J6C9-T83GX</ProductKey>
     </component>
   </settings>
@@ -201,4 +201,4 @@
       <TimeZone>GTB Standard Time</TimeZone>
     </component>
   </settings>
-</unattend>
+</unattend>
\ No newline at end of file

From 9a89cbba97a66162511dd3a33cd73d63d37fa95d Mon Sep 17 00:00:00 2001
From: James Stringer <38541878+jamesstringerparsec@users.noreply.github.com>
Date: Sun, 9 Jan 2022 13:47:25 +0100
Subject: [PATCH 07/50] Test

---
 VMScripts/ParsecVDDInstall.ps1 | 4 ++--
 VMScripts/VBCableInstall.ps1   | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/VMScripts/ParsecVDDInstall.ps1 b/VMScripts/ParsecVDDInstall.ps1
index f5d71bd..a767a5c 100644
--- a/VMScripts/ParsecVDDInstall.ps1
+++ b/VMScripts/ParsecVDDInstall.ps1
@@ -1,9 +1,9 @@
 if (!(Get-WmiObject Win32_VideoController | Where-Object name -like "Parsec Virtual Display Adapter")) {
 (New-Object System.Net.WebClient).DownloadFile("https://builds.parsec.app/vdd/parsec-vdd-0.37.0.0.exe", "C:\Users\$env:USERNAME\Downloads\parsec-vdd.exe")
-while (((Get-ChildItem Cert:\LocalMachine\TrustedPublisher) | Where-Object {$_.Subject -like '*Parsec*'}) -eq $NULL) {
+#while (((Get-ChildItem Cert:\LocalMachine\TrustedPublisher) | Where-Object {$_.Subject -like '*Parsec*'}) -eq $NULL) {
     certutil -Enterprise -Addstore "TrustedPublisher" C:\ProgramData\Easy-GPU-P\ParsecPublic.cer
     Start-Sleep -s 5
-    }
+#    }
 Get-PnpDevice | Where-Object {$_.friendlyname -like "Microsoft Hyper-V Video" -and $_.status -eq "OK"} | Disable-PnpDevice -confirm:$false
 Start-Process "C:\Users\$env:USERNAME\Downloads\parsec-vdd.exe" -ArgumentList "/s"
 }
diff --git a/VMScripts/VBCableInstall.ps1 b/VMScripts/VBCableInstall.ps1
index 1c981a7..7fbbddc 100644
--- a/VMScripts/VBCableInstall.ps1
+++ b/VMScripts/VBCableInstall.ps1
@@ -10,10 +10,10 @@
     $VB.ExportType = [System.Security.Cryptography.X509Certificates.X509ContentType]::Cert;
     $VB.Cert = (Get-AuthenticodeSignature -filepath $VB.DriverFile).SignerCertificate;
     [System.IO.File]::WriteAllBytes($VB.CertName, $VB.Cert.Export($VB.ExportType))
-    while (((Get-ChildItem Cert:\LocalMachine\TrustedPublisher) | Where-Object {$_.Subject -like '*Vincent Burel*'}) -eq $NULL) {
+    #while (((Get-ChildItem Cert:\LocalMachine\TrustedPublisher) | Where-Object {$_.Subject -like '*Vincent Burel*'}) -eq $NULL) {
         certutil -Enterprise -Addstore "TrustedPublisher" $VB.CertName
         Start-Sleep -s 5
-        }
+    #    }
     Start-Process -FilePath "C:\Users\$env:Username\Downloads\VBCable\VBCABLE_Setup_x64.exe" -ArgumentList '-i','-h'
     }
   
\ No newline at end of file

From ad17fa5a7a5e72f8f0efe3370e2aba4f86489905 Mon Sep 17 00:00:00 2001
From: James Stringer <38541878+jamesstringerparsec@users.noreply.github.com>
Date: Sun, 9 Jan 2022 14:13:28 +0100
Subject: [PATCH 08/50] Unblock Files

---
 User/Install.ps1               | 2 ++
 VMScripts/ParsecVDDInstall.ps1 | 4 ++--
 VMScripts/VBCableInstall.ps1   | 4 ++--
 3 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/User/Install.ps1 b/User/Install.ps1
index 682606f..7db2409 100644
--- a/User/Install.ps1
+++ b/User/Install.ps1
@@ -7,6 +7,8 @@ while(!(Test-NetConnection Google.com).PingSucceeded){
     Start-Sleep -Seconds 1
     }
 
+Get-ChildItem -Path C:\ProgramData\Easy-GPU-P -Recurse | Unblock-File
+
 if (Test-Path HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Parsec) 
     {}
     else {
diff --git a/VMScripts/ParsecVDDInstall.ps1 b/VMScripts/ParsecVDDInstall.ps1
index a767a5c..f5d71bd 100644
--- a/VMScripts/ParsecVDDInstall.ps1
+++ b/VMScripts/ParsecVDDInstall.ps1
@@ -1,9 +1,9 @@
 if (!(Get-WmiObject Win32_VideoController | Where-Object name -like "Parsec Virtual Display Adapter")) {
 (New-Object System.Net.WebClient).DownloadFile("https://builds.parsec.app/vdd/parsec-vdd-0.37.0.0.exe", "C:\Users\$env:USERNAME\Downloads\parsec-vdd.exe")
-#while (((Get-ChildItem Cert:\LocalMachine\TrustedPublisher) | Where-Object {$_.Subject -like '*Parsec*'}) -eq $NULL) {
+while (((Get-ChildItem Cert:\LocalMachine\TrustedPublisher) | Where-Object {$_.Subject -like '*Parsec*'}) -eq $NULL) {
     certutil -Enterprise -Addstore "TrustedPublisher" C:\ProgramData\Easy-GPU-P\ParsecPublic.cer
     Start-Sleep -s 5
-#    }
+    }
 Get-PnpDevice | Where-Object {$_.friendlyname -like "Microsoft Hyper-V Video" -and $_.status -eq "OK"} | Disable-PnpDevice -confirm:$false
 Start-Process "C:\Users\$env:USERNAME\Downloads\parsec-vdd.exe" -ArgumentList "/s"
 }
diff --git a/VMScripts/VBCableInstall.ps1 b/VMScripts/VBCableInstall.ps1
index 7fbbddc..1c981a7 100644
--- a/VMScripts/VBCableInstall.ps1
+++ b/VMScripts/VBCableInstall.ps1
@@ -10,10 +10,10 @@
     $VB.ExportType = [System.Security.Cryptography.X509Certificates.X509ContentType]::Cert;
     $VB.Cert = (Get-AuthenticodeSignature -filepath $VB.DriverFile).SignerCertificate;
     [System.IO.File]::WriteAllBytes($VB.CertName, $VB.Cert.Export($VB.ExportType))
-    #while (((Get-ChildItem Cert:\LocalMachine\TrustedPublisher) | Where-Object {$_.Subject -like '*Vincent Burel*'}) -eq $NULL) {
+    while (((Get-ChildItem Cert:\LocalMachine\TrustedPublisher) | Where-Object {$_.Subject -like '*Vincent Burel*'}) -eq $NULL) {
         certutil -Enterprise -Addstore "TrustedPublisher" $VB.CertName
         Start-Sleep -s 5
-    #    }
+        }
     Start-Process -FilePath "C:\Users\$env:Username\Downloads\VBCable\VBCABLE_Setup_x64.exe" -ArgumentList '-i','-h'
     }
   
\ No newline at end of file

From 1652a1d0ab832b64f4055b1b93ee0f1493a6c7c9 Mon Sep 17 00:00:00 2001
From: James Stringer <38541878+jamesstringerparsec@users.noreply.github.com>
Date: Sun, 9 Jan 2022 14:40:09 +0100
Subject: [PATCH 09/50] Create Desktop icon

---
 User/Install.ps1     |   3 +--
 VMScripts/Parsec.lnk | Bin 0 -> 2235 bytes
 2 files changed, 1 insertion(+), 2 deletions(-)
 create mode 100644 VMScripts/Parsec.lnk

diff --git a/User/Install.ps1 b/User/Install.ps1
index 7db2409..8ab3290 100644
--- a/User/Install.ps1
+++ b/User/Install.ps1
@@ -13,13 +13,12 @@ if (Test-Path HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninst
     {}
     else {
     (New-Object System.Net.WebClient).DownloadFile("https://builds.parsecgaming.com/package/parsec-windows.exe", "C:\Users\$env:USERNAME\Downloads\parsec-windows.exe")
-    $currentPrincipal = New-Object Security.Principal.WindowsPrincipal([Security.Principal.WindowsIdentity]::GetCurrent())
-    $currentPrincipal.IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator) | Out-File C:\ProgramData\Easy-GPU-P\admim.txt
     Start-Process "C:\Users\$env:USERNAME\Downloads\parsec-windows.exe" -ArgumentList "/silent", "/shared","/team_id=$team_id","/team_computer_key=$key" -wait
     $configfile = Get-Content C:\ProgramData\Parsec\config.txt
     $configfile += "host_virtual_monitors = 1"
     $configfile += "host_privacy_mode = 1"
     $configfile | Out-File C:\ProgramData\Parsec\config.txt -Encoding ascii
+    Copy-Item C:\ProgramData\Parsec\Easy-GPU-P\Parsec.lnk -Destination C:\Users\Public\Desktop
     }
 
 Function ParsecVDDMonitorSetupScheduledTask {
diff --git a/VMScripts/Parsec.lnk b/VMScripts/Parsec.lnk
new file mode 100644
index 0000000000000000000000000000000000000000..a31af00565c93e395aa40379b13bb48d2ea7e894
GIT binary patch
literal 2235
zcmd^ATS${(7=C9~E-e+8n3b+{VwQ6%od%Yoc&gm*X4%D0Ik%;YscSP3f})^{V1Ype
zg@%SDfnJ!Xcws7(-o;StWQ4aFA>M@D^}OF^+ssbTm3`xRztj7@-}AkPf5(YPp$dZ}
z8WWO=XY(US&EwRm`$s2c6dB4(2i{N4D3<4?Q5%G&Ldbx)pioh=G-vRt=k@lOhi@Wi
zuTIy#jj{^$azN|*$V1s;oGGbBVo5R@N{j`UvD8dT3a5o<?uxr<yr+d$e^NMP;KFio
zGW=r<N#vp?s)ICB185hMog8E%H#G7g>oIoVmrFUMC94?kqfE@Q=^z~v91^I?&qXU$
zx5B2`<+fRfj`*2mNEII5VJ0W~H$(ayCP)Y|eySQw%wXZheK<<-REs;<Rq0aOH8nYf
zO{><{Vxv;OUEax%3?8=I)5)*fF06$LXOLYh-e98^fG82D0(Jm=misJ#n+b>m)&c6-
zuU#?d4JJY$Bv(_N%iN$YwmWQY+4oX8n4IvFmSo)YEBSN3%OReSX?6YyR7iT<^5=F^
z{`$n~H>V<aN}`Ti@JY5wGJV#Kyep&|CEZKjxGwj(-50TL1t^&n08StdYO_eSMkHCf
zpUO!QZVtLk<stz&@nkB%qn%WQm1aODBT|&p(@u>@)ldiR;j2XJg=9jyMa|GcNn*^S
z#jqOBgHJuIv57U9P$Uriu0TEzZN*+RfW$}3nYj9TbXviSQ9S1XeR#=*L~K$F*d*`z
z7(2kwB3RqOxDo4oXbTWxlINWOlYM;NlAd>GDt6!%jTzo1c&}qUi51wg9`J?vUwBIX
zArhg<73>P4!?>FX_Qf|8_1<)rc9-UByYgB*JF#95pbCj9`)b_AFP5@__6S|-y(lgt
z(Nrj$jmQy=zg$GMXjUzk<s)mh*Q}_~z!z4tB9%kK5&W%Mv(EXC9>)J6>roSF=!XIR
zzrok2W6*M@b#%O<>}i{AC}(;qk@so<lu*ZM^xRsU?#%4{zA?)ss-4-Qj4t=c&ztA2
bRGy7Xc`_N9J0Cl|t8LKx;@Iuq?X!(<ilQ`c

literal 0
HcmV?d00001


From d9029f50f0d31c11c2ebe0889d09ee1b915eabae Mon Sep 17 00:00:00 2001
From: James Stringer <38541878+jamesstringerparsec@users.noreply.github.com>
Date: Sun, 9 Jan 2022 15:08:23 +0100
Subject: [PATCH 10/50] Link Fixes

---
 CopyFilesToVM.ps1 | 1 +
 User/Install.ps1  | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/CopyFilesToVM.ps1 b/CopyFilesToVM.ps1
index 4b04432..1daef88 100644
--- a/CopyFilesToVM.ps1
+++ b/CopyFilesToVM.ps1
@@ -108,6 +108,7 @@ param(
     Copy-Item -Path $psscriptroot\VMScripts\VBCableInstall.ps1 -Destination $DriveLetter\ProgramData\Easy-GPU-P
     Copy-Item -Path $psscriptroot\VMScripts\ParsecVDDInstall.ps1 -Destination $DriveLetter\ProgramData\Easy-GPU-P
     Copy-Item -Path $psscriptroot\VMScripts\ParsecPublic.cer -Destination $DriveLetter\ProgramData\Easy-GPU-P
+    Copy-Item -Path $psscriptroot\VMScripts\Parsec.lnk -Destination $DriveLetter\ProgramData\Easy-GPU-P
     Copy-Item -Path $psscriptroot\gpt.ini -Destination $DriveLetter\Windows\system32\GroupPolicy
     Copy-Item -Path $psscriptroot\User\psscripts.ini -Destination $DriveLetter\Windows\system32\GroupPolicy\User\Scripts
     Copy-Item -Path $psscriptroot\User\Install.ps1 -Destination $DriveLetter\Windows\system32\GroupPolicy\User\Scripts\Logon
diff --git a/User/Install.ps1 b/User/Install.ps1
index 8ab3290..18a220a 100644
--- a/User/Install.ps1
+++ b/User/Install.ps1
@@ -18,7 +18,7 @@ if (Test-Path HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninst
     $configfile += "host_virtual_monitors = 1"
     $configfile += "host_privacy_mode = 1"
     $configfile | Out-File C:\ProgramData\Parsec\config.txt -Encoding ascii
-    Copy-Item C:\ProgramData\Parsec\Easy-GPU-P\Parsec.lnk -Destination C:\Users\Public\Desktop
+    Copy-Item -Path "C:\ProgramData\Easy-GPU-P\Parsec.lnk" -Destination "C:\Users\Public\Desktop"
     }
 
 Function ParsecVDDMonitorSetupScheduledTask {

From 6d74fcc07082f2b4e0d34d271adde92816f006ed Mon Sep 17 00:00:00 2001
From: James Stringer <38541878+jamesstringerparsec@users.noreply.github.com>
Date: Sun, 9 Jan 2022 15:28:35 +0100
Subject: [PATCH 11/50] Update README.md

---
 README.md | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/README.md b/README.md
index cd88a15..51accd8 100644
--- a/README.md
+++ b/README.md
@@ -26,9 +26,8 @@ Easy-GPU-P does the following...
 5. Open and Run PreChecks.ps1 in Powershell ISE using the green play button and copy the GPU Listed (or the warnings that you need to fix).
 6. Open CopyFilesToVM.ps1 Powershell ISE and edit the params section at the top of the file, you need to be careful about how much ram, storage and hard drive you give it as you system needs to have that available.  On Windows 10 the GPUName must be left as "AUTO", In Windows 11 it can be either "AUTO" or the specific name of the GPU you want to partition exactly how it appears in PreChecks.ps1.  Additionally, you need to provide the path to the Windows 10/11 ISO file you downloaded.
 7. Run CopyFilesToVM.ps1 with your changes to the params section - this may take 5-10 minutes.
-8. View the VM in Hyper-V, once it gets to the Windows Desktop you will need to approve the certificate install request for Parsec and Virtual Audio Cable.
-9. Sign into Parsec on the VM.
-10. You should be good to go!
+8. Open and sign into Parsec on the VM.
+9. You should be good to go!
 
 ### Upgrading GPU Drivers when you update the host GPU Drivers
 It's important to update the VM GPU Drivers after you have updated the Host GPUs drivers. You can do this by...  
@@ -65,4 +64,4 @@ It's important to update the VM GPU Drivers after you have updated the Host GPUs
 - A powered on display / HDMI dummy dongle must be plugged into the GPU to allow Parsec to capture the screen.  You only only need one of these per host machine regardless of number of VM's.
 - The screen may go black for times up to 10 seconds in sitautions when UAC prompts appear, applications go in and out of fullscreen and when you switch between video codecs in Parsec - not really sure why this happens, it's unique to GPU-P machines and seems to recover faster at 1280x720.
 - Vulkan renderer is unavailable and GL games may or may not work.  [This](https://www.microsoft.com/en-us/p/opencl-and-opengl-compatibility-pack/9nqpsl29bfff?SilentAuth=1&wa=wsignin1.0#activetab=pivot:overviewtab) may help with some OpenGL apps.  
-- If you boot your VM up for the first time and you are unable to press Yes to the UAC prompts for Parsec Virtual Display Driver / Virtual Audio cable it means that you used either special characters in the username you set or the username you set is the same as the VM name.  Please recreate the VM making sure not to use the same username as the VM name and be sure not to include special characters.  
+- If you do not have administrator permissions on the machine it means you set the username and vmname to the same thing, these needs to be different.  

From 7c8d1d4fc61e620bfcbd4631e85b6936a7af878e Mon Sep 17 00:00:00 2001
From: James Stringer <38541878+jamesstringerparsec@users.noreply.github.com>
Date: Sun, 9 Jan 2022 15:31:37 +0100
Subject: [PATCH 12/50] Update README.md

---
 README.md | 1 +
 1 file changed, 1 insertion(+)

diff --git a/README.md b/README.md
index 51accd8..ffbd5ec 100644
--- a/README.md
+++ b/README.md
@@ -44,6 +44,7 @@ It's important to update the VM GPU Drivers after you have updated the Host GPUs
   ```SizeBytes  = 40gb``` - Disk size, in this case 40GB  
   ```MemoryAmount = 8GB``` - Memory size, in this case 8GB  
   ```CPUCores = 4``` - CPU Cores you want to give VM, in this case 4   
+  ```NetworkSwitch = "Default Switch"``` - Leave this alone unless you're not using the default Hyper-V Switch  
   ```UnattendPath = "$PSScriptRoot"+"\autounattend.xml"``` -Leave this value alone  
   ```GPUName = "AUTO"``` - AUTO selects the first available GPU. On Windows 11 you may also use the exact name of the GPU you want to share with the VM in multi GPU situations (GPU selection is not available in Windows 10 and must be set to AUTO)    
   ```GPUResourceAllocationPercentage = 50``` - Percentage of the GPU you want to share with the VM   

From d47db7993bdcb1426f163decb427da13a5bffd13 Mon Sep 17 00:00:00 2001
From: James Stringer <38541878+jamesstringerparsec@users.noreply.github.com>
Date: Sun, 9 Jan 2022 15:37:11 +0100
Subject: [PATCH 13/50] Change exit text

---
 CopyFilesToVM.ps1 | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/CopyFilesToVM.ps1 b/CopyFilesToVM.ps1
index 1daef88..a343b6e 100644
--- a/CopyFilesToVM.ps1
+++ b/CopyFilesToVM.ps1
@@ -4332,6 +4332,6 @@ New-GPUEnabledVM @params
 
 Start-VM -Name $params.VMName
 
-SmartExit -ExitReason "If all went well the Virtual Machine will have started - 
-you need to accept two certificate install dialogs inside the VM to install a 
-virtual display and virtual audio cable via the Hyper-V viewer then sign into Parsec and connect via Parsec"
+SmartExit -ExitReason "If all went well the Virtual Machine will have started, 
+In a few minutes it will load the Windows desktop, 
+when it does sign into Parsec and start installing your games.  Have fun!"

From 40219cfb9552c56cf7487342c1dc0215b446248a Mon Sep 17 00:00:00 2001
From: James Stringer <38541878+jamesstringerparsec@users.noreply.github.com>
Date: Sun, 9 Jan 2022 16:25:22 +0100
Subject: [PATCH 14/50] Update info about AMD Polaris GPUs like RX 580

---
 README.md | 1 +
 1 file changed, 1 insertion(+)

diff --git a/README.md b/README.md
index ffbd5ec..2904740 100644
--- a/README.md
+++ b/README.md
@@ -66,3 +66,4 @@ It's important to update the VM GPU Drivers after you have updated the Host GPUs
 - The screen may go black for times up to 10 seconds in sitautions when UAC prompts appear, applications go in and out of fullscreen and when you switch between video codecs in Parsec - not really sure why this happens, it's unique to GPU-P machines and seems to recover faster at 1280x720.
 - Vulkan renderer is unavailable and GL games may or may not work.  [This](https://www.microsoft.com/en-us/p/opencl-and-opengl-compatibility-pack/9nqpsl29bfff?SilentAuth=1&wa=wsignin1.0#activetab=pivot:overviewtab) may help with some OpenGL apps.  
 - If you do not have administrator permissions on the machine it means you set the username and vmname to the same thing, these needs to be different.  
+- AMD Polaris GPUS like the RX 580 do not support hardware video encoding via GPU Paravirtualization at this time.

From 2d6b43d193694fad19b8effa0a266be8339ffdde Mon Sep 17 00:00:00 2001
From: James Stringer <38541878+jamesstringerparsec@users.noreply.github.com>
Date: Sun, 9 Jan 2022 16:44:57 +0100
Subject: [PATCH 15/50] Link to Parsec sign-up.

---
 CopyFilesToVM.ps1 | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/CopyFilesToVM.ps1 b/CopyFilesToVM.ps1
index a343b6e..4fa99de 100644
--- a/CopyFilesToVM.ps1
+++ b/CopyFilesToVM.ps1
@@ -4334,4 +4334,5 @@ Start-VM -Name $params.VMName
 
 SmartExit -ExitReason "If all went well the Virtual Machine will have started, 
 In a few minutes it will load the Windows desktop, 
-when it does sign into Parsec and start installing your games.  Have fun!"
+when it does sign into Parsec and start installing your games.  Have fun!
+Sign up to Parsec at https://parsec.app"

From 6bac997c788dc9e2c6af281a207b9a43ff0d438b Mon Sep 17 00:00:00 2001
From: James Stringer <38541878+jamesstringerparsec@users.noreply.github.com>
Date: Sun, 9 Jan 2022 16:49:47 +0100
Subject: [PATCH 16/50] Update README.md

---
 README.md | 1 +
 1 file changed, 1 insertion(+)

diff --git a/README.md b/README.md
index 2904740..fb54302 100644
--- a/README.md
+++ b/README.md
@@ -63,6 +63,7 @@ It's important to update the VM GPU Drivers after you have updated the Host GPUs
 ### Notes:    
 - Windows 10 20H1 is not well tested as I don't have any Win10 20H1 installs, if you have success on Windows 10 20H1 - 21H2 please let me know.
 - A powered on display / HDMI dummy dongle must be plugged into the GPU to allow Parsec to capture the screen.  You only only need one of these per host machine regardless of number of VM's.
+- If your computer is super fast it may get to the login screen before the audio driver (VB Cable) and Parsec display driver are installed, but fear not! They should soon install.  
 - The screen may go black for times up to 10 seconds in sitautions when UAC prompts appear, applications go in and out of fullscreen and when you switch between video codecs in Parsec - not really sure why this happens, it's unique to GPU-P machines and seems to recover faster at 1280x720.
 - Vulkan renderer is unavailable and GL games may or may not work.  [This](https://www.microsoft.com/en-us/p/opencl-and-opengl-compatibility-pack/9nqpsl29bfff?SilentAuth=1&wa=wsignin1.0#activetab=pivot:overviewtab) may help with some OpenGL apps.  
 - If you do not have administrator permissions on the machine it means you set the username and vmname to the same thing, these needs to be different.  

From 9d489b4c95fc11a517309e765172504933126146 Mon Sep 17 00:00:00 2001
From: James Stringer <38541878+jamesstringerparsec@users.noreply.github.com>
Date: Sun, 9 Jan 2022 16:53:15 +0100
Subject: [PATCH 17/50] Update CopyFilesToVM.ps1

---
 CopyFilesToVM.ps1 | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/CopyFilesToVM.ps1 b/CopyFilesToVM.ps1
index 4fa99de..1640136 100644
--- a/CopyFilesToVM.ps1
+++ b/CopyFilesToVM.ps1
@@ -4334,5 +4334,6 @@ Start-VM -Name $params.VMName
 
 SmartExit -ExitReason "If all went well the Virtual Machine will have started, 
 In a few minutes it will load the Windows desktop, 
-when it does sign into Parsec and start installing your games.  Have fun!
+when it does, sign into Parsec and start installing your games.  
+Have fun!
 Sign up to Parsec at https://parsec.app"

From 12e15b34217e411ceaaabcb9cae277570601ca90 Mon Sep 17 00:00:00 2001
From: James Stringer <38541878+jamesstringerparsec@users.noreply.github.com>
Date: Sun, 9 Jan 2022 21:02:31 +0100
Subject: [PATCH 18/50] Update README.md

---
 README.md | 1 +
 1 file changed, 1 insertion(+)

diff --git a/README.md b/README.md
index fb54302..cf5ab80 100644
--- a/README.md
+++ b/README.md
@@ -61,6 +61,7 @@ It's important to update the VM GPU Drivers after you have updated the Host GPUs
 
 
 ### Notes:    
+- If you get "ERROR  : Cannot bind argument to parameter 'Path' because it is null." this probably means you used Media Creation Tool to download the ISO.  You unfortunately cannot use that, if you don't see a direct ISO download link at the Microsoft page, follow [this guide.](https://www.nextofwindows.com/downloading-windows-10-iso-images-using-rufus)  
 - Windows 10 20H1 is not well tested as I don't have any Win10 20H1 installs, if you have success on Windows 10 20H1 - 21H2 please let me know.
 - A powered on display / HDMI dummy dongle must be plugged into the GPU to allow Parsec to capture the screen.  You only only need one of these per host machine regardless of number of VM's.
 - If your computer is super fast it may get to the login screen before the audio driver (VB Cable) and Parsec display driver are installed, but fear not! They should soon install.  

From 9185b5945978db67488253bda3ce4adb72a8bf65 Mon Sep 17 00:00:00 2001
From: James Stringer <38541878+jamesstringerparsec@users.noreply.github.com>
Date: Sun, 9 Jan 2022 21:31:04 +0100
Subject: [PATCH 19/50] Update password info.

---
 README.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/README.md b/README.md
index cf5ab80..dfcd67b 100644
--- a/README.md
+++ b/README.md
@@ -51,7 +51,7 @@ It's important to update the VM GPU Drivers after you have updated the Host GPUs
   ```Team_ID = ""``` - The Parsec for Teams ID if you are a Parsec for Teams Subscriber  
   ```Key = ""``` - The Parsec for Teams Secret Key if you are a Parsec for Teams Subscriber  
   ```Username = "GPUVM"``` - The VM Windows Username, do not include special characters, and must be different from the "VMName" value you set  
-  ```Password = "CoolestPassword!"``` - The VM Windows Password  
+  ```Password = "CoolestPassword!"``` - The VM Windows Password, cannot be blank.
   ```Autologon = "true"```- If you want the VM to automatically login to the Windows Desktop
 
 

From bff2dbe662af2ac67fbc6682e7a73ab20bacaf60 Mon Sep 17 00:00:00 2001
From: James Stringer <38541878+jamesstringerparsec@users.noreply.github.com>
Date: Sun, 9 Jan 2022 22:13:52 +0100
Subject: [PATCH 20/50] Update README.md

---
 README.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/README.md b/README.md
index dfcd67b..4a36cb5 100644
--- a/README.md
+++ b/README.md
@@ -51,7 +51,7 @@ It's important to update the VM GPU Drivers after you have updated the Host GPUs
   ```Team_ID = ""``` - The Parsec for Teams ID if you are a Parsec for Teams Subscriber  
   ```Key = ""``` - The Parsec for Teams Secret Key if you are a Parsec for Teams Subscriber  
   ```Username = "GPUVM"``` - The VM Windows Username, do not include special characters, and must be different from the "VMName" value you set  
-  ```Password = "CoolestPassword!"``` - The VM Windows Password, cannot be blank.
+  ```Password = "CoolestPassword!"``` - The VM Windows Password, cannot be blank    
   ```Autologon = "true"```- If you want the VM to automatically login to the Windows Desktop
 
 

From 37b1c248aa2421aa2646c9ba17728fa360f6f2a9 Mon Sep 17 00:00:00 2001
From: James Stringer <38541878+jamesstringerparsec@users.noreply.github.com>
Date: Mon, 10 Jan 2022 10:24:29 +0100
Subject: [PATCH 21/50] Update README.md

---
 README.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/README.md b/README.md
index 4a36cb5..c2c682c 100644
--- a/README.md
+++ b/README.md
@@ -41,7 +41,7 @@ It's important to update the VM GPU Drivers after you have updated the Host GPUs
   ```Edition    = 6``` - Leave as 6, this means Windows 10/11 Pro  
   ```VhdFormat  = "VHDX"``` - Leave this value alone  
   ```DiskLayout = "UEFI"``` - Leave this value alone  
-  ```SizeBytes  = 40gb``` - Disk size, in this case 40GB  
+  ```SizeBytes  = 40gb``` - Disk size, in this case 40GB, the minimum is 20GB  
   ```MemoryAmount = 8GB``` - Memory size, in this case 8GB  
   ```CPUCores = 4``` - CPU Cores you want to give VM, in this case 4   
   ```NetworkSwitch = "Default Switch"``` - Leave this alone unless you're not using the default Hyper-V Switch  

From f9798704a47aadcebd9e62e5bd05625d4828988c Mon Sep 17 00:00:00 2001
From: James Stringer <38541878+jamesstringerparsec@users.noreply.github.com>
Date: Mon, 10 Jan 2022 17:52:16 +0100
Subject: [PATCH 22/50] Detect wim-less ISO files

---
 CopyFilesToVM.ps1 | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/CopyFilesToVM.ps1 b/CopyFilesToVM.ps1
index 1640136..188397c 100644
--- a/CopyFilesToVM.ps1
+++ b/CopyFilesToVM.ps1
@@ -26,6 +26,16 @@ function Is-Administrator
     (New-Object Security.Principal.WindowsPrincipal $CurrentUser).IsInRole([Security.Principal.WindowsBuiltinRole]::Administrator)  
 }
 
+Function Test-ISOType {
+param(
+[string]$SourcePath
+)
+    $mountResult = Mount-DiskImage $SourcePath -PassThru 
+    $Driveletter = ($mountResult | Get-Volume).DriveLetter
+    Test-Path $($Driveletter + ":\sources\Install.wim")
+    Dismount-DiskImage -DevicePath $mountResult.DevicePath | Out-Null
+    }
+
 Function SmartExit {
 param (
 [switch]$NoHalt,
@@ -58,6 +68,9 @@ if ((Is-Administrator) -eq $false) {
 if (!(test-path $params.SourcePath)) {
     $ExitReason += "ISO Path Invalid. Please enter a valid ISO Path in the SourcePath section of Params."
     }
+if (!(Test-ISOType -SourcePath $params.SourcePath)) {
+    $ExitReason += "This ISO is invalid, please check readme for ISO downloading instructions."
+    }
 if ($params.Username -eq $params.VMName ) {
     $ExitReason += "Username cannot be the same as VMName."
     }

From 2b9638a6c5e7ba9fc44adad8f9d3aa1ee54b6094 Mon Sep 17 00:00:00 2001
From: James Stringer <38541878+jamesstringerparsec@users.noreply.github.com>
Date: Mon, 10 Jan 2022 20:07:37 +0100
Subject: [PATCH 23/50] Allow user to specify VHD Path

---
 CopyFilesToVM.ps1 | 23 +++++++++++++++++++++--
 1 file changed, 21 insertions(+), 2 deletions(-)

diff --git a/CopyFilesToVM.ps1 b/CopyFilesToVM.ps1
index 188397c..f019e48 100644
--- a/CopyFilesToVM.ps1
+++ b/CopyFilesToVM.ps1
@@ -8,6 +8,7 @@
     MemoryAmount = 8GB
     CPUCores = 4
     NetworkSwitch = "Default Switch"
+    VHDPath = "C:\Users\Public\Documents\Hyper-V\Virtual Hard Disks\"
     UnattendPath = "$PSScriptRoot"+"\autounattend.xml"
     GPUName = "AUTO"
     GPUResourceAllocationPercentage = 50
@@ -36,6 +37,19 @@ param(
     Dismount-DiskImage -DevicePath $mountResult.DevicePath | Out-Null
     }
 
+Function ConcatenateVHDPath {
+param(
+[string]$VHDPath,
+[string]$VMName
+)
+if ($VHDPath[-1] -eq '\') {
+    $VHDPath + $VMName + ".vhdx"
+    }
+Else {
+    $VHDPath + "\" +  $VMName + ".vhdx"
+    }
+}
+
 Function SmartExit {
 param (
 [switch]$NoHalt,
@@ -62,9 +76,13 @@ Function Check-Params {
 
 $ExitReason = @()
 
+
 if ((Is-Administrator) -eq $false) {
     $ExitReason += "Script not running as Administrator, please run script as Administrator."
     }
+if (!(Test-Path $params.VHDPath)) {
+    $ExitReason += "VHDPath Directory doesn't exist, please create it before running this script."
+    }
 if (!(test-path $params.SourcePath)) {
     $ExitReason += "ISO Path Invalid. Please enter a valid ISO Path in the SourcePath section of Params."
     }
@@ -4287,7 +4305,7 @@ param(
 [int64]$SizeBytes,
 [int]$Edition,
 [string]$VhdFormat,
-[string]$VhdPath = "C:\Users\Public\Documents\Hyper-V\Virtual Hard Disks\$($VMName).vhdx",
+[string]$VhdPath,
 [string]$VMName,
 [string]$DiskLayout,
 [string]$UnattendPath,
@@ -4303,7 +4321,8 @@ param(
 [string]$password,
 [string]$autologon
 )
-    
+    $VHDPath = ConcatenateVHDPath -VHDPath $VHDPath -VMName $VMName
+
     if ($(Get-VM -Name $VMName -ErrorAction SilentlyContinue) -ne $NULL) {
         SmartExit -ExitReason "Virtual Machine already exists with name $VMName, please delete existing VM or change VMName"
         }

From f0f9d6c3488e5d8cabf00bad7bdd7411af72c5bd Mon Sep 17 00:00:00 2001
From: James Stringer <38541878+jamesstringerparsec@users.noreply.github.com>
Date: Mon, 10 Jan 2022 20:12:43 +0100
Subject: [PATCH 24/50] Update README.md

---
 README.md | 1 +
 1 file changed, 1 insertion(+)

diff --git a/README.md b/README.md
index c2c682c..4d6c277 100644
--- a/README.md
+++ b/README.md
@@ -45,6 +45,7 @@ It's important to update the VM GPU Drivers after you have updated the Host GPUs
   ```MemoryAmount = 8GB``` - Memory size, in this case 8GB  
   ```CPUCores = 4``` - CPU Cores you want to give VM, in this case 4   
   ```NetworkSwitch = "Default Switch"``` - Leave this alone unless you're not using the default Hyper-V Switch  
+  ```VHDPath = "C:\Users\Public\Documents\Hyper-V\Virtual Hard Disks\"``` - Path to the folder you want the VM Disk to be stored in, it must already exist  
   ```UnattendPath = "$PSScriptRoot"+"\autounattend.xml"``` -Leave this value alone  
   ```GPUName = "AUTO"``` - AUTO selects the first available GPU. On Windows 11 you may also use the exact name of the GPU you want to share with the VM in multi GPU situations (GPU selection is not available in Windows 10 and must be set to AUTO)    
   ```GPUResourceAllocationPercentage = 50``` - Percentage of the GPU you want to share with the VM   

From 99ee36cd6940266fad70f37997711dd1da293c07 Mon Sep 17 00:00:00 2001
From: James Stringer <38541878+jamesstringerparsec@users.noreply.github.com>
Date: Mon, 10 Jan 2022 21:13:15 +0100
Subject: [PATCH 25/50] Update issue templates

---
 .github/ISSUE_TEMPLATE/custom.md | 13 +++++++++++++
 1 file changed, 13 insertions(+)
 create mode 100644 .github/ISSUE_TEMPLATE/custom.md

diff --git a/.github/ISSUE_TEMPLATE/custom.md b/.github/ISSUE_TEMPLATE/custom.md
new file mode 100644
index 0000000..610d985
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/custom.md
@@ -0,0 +1,13 @@
+---
+name: Custom issue template
+about: Describe this issue template's purpose here.
+title: ''
+labels: ''
+assignees: ''
+
+---
+
+Before you post an issue 
+1. If something doesn't work, please carefully read the readme to see if you missed something
+2. If the answer isn't in the readme, search the other Github issues, both open and closed issues
+3. If you're posting a question about something you want to try, please first try it on your own and post the results

From 5525c9b7583b5e0423b3f34ca7d74fb6db909cfe Mon Sep 17 00:00:00 2001
From: James Stringer <38541878+jamesstringerparsec@users.noreply.github.com>
Date: Mon, 10 Jan 2022 21:15:08 +0100
Subject: [PATCH 26/50] Update custom.md

---
 .github/ISSUE_TEMPLATE/custom.md | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/.github/ISSUE_TEMPLATE/custom.md b/.github/ISSUE_TEMPLATE/custom.md
index 610d985..dd56bc8 100644
--- a/.github/ISSUE_TEMPLATE/custom.md
+++ b/.github/ISSUE_TEMPLATE/custom.md
@@ -1,6 +1,6 @@
 ---
-name: Custom issue template
-about: Describe this issue template's purpose here.
+name: Post an Issue
+about: All issues go here
 title: ''
 labels: ''
 assignees: ''

From e1dfac8c0c3d8722873fc8ab5b7fd84d9c46c33b Mon Sep 17 00:00:00 2001
From: James Stringer <38541878+jamesstringerparsec@users.noreply.github.com>
Date: Mon, 10 Jan 2022 21:17:16 +0100
Subject: [PATCH 27/50] Rename custom.md to issue_template.md

---
 .github/ISSUE_TEMPLATE/{custom.md => issue_template.md} | 0
 1 file changed, 0 insertions(+), 0 deletions(-)
 rename .github/ISSUE_TEMPLATE/{custom.md => issue_template.md} (100%)

diff --git a/.github/ISSUE_TEMPLATE/custom.md b/.github/ISSUE_TEMPLATE/issue_template.md
similarity index 100%
rename from .github/ISSUE_TEMPLATE/custom.md
rename to .github/ISSUE_TEMPLATE/issue_template.md

From 89b14a6b99d853c5d61d38314f639a45516f211e Mon Sep 17 00:00:00 2001
From: James Stringer <38541878+jamesstringerparsec@users.noreply.github.com>
Date: Mon, 10 Jan 2022 21:19:58 +0100
Subject: [PATCH 28/50] Delete .github/ISSUE_TEMPLATE directory

---
 .github/ISSUE_TEMPLATE/issue_template.md | 13 -------------
 1 file changed, 13 deletions(-)
 delete mode 100644 .github/ISSUE_TEMPLATE/issue_template.md

diff --git a/.github/ISSUE_TEMPLATE/issue_template.md b/.github/ISSUE_TEMPLATE/issue_template.md
deleted file mode 100644
index dd56bc8..0000000
--- a/.github/ISSUE_TEMPLATE/issue_template.md
+++ /dev/null
@@ -1,13 +0,0 @@
----
-name: Post an Issue
-about: All issues go here
-title: ''
-labels: ''
-assignees: ''
-
----
-
-Before you post an issue 
-1. If something doesn't work, please carefully read the readme to see if you missed something
-2. If the answer isn't in the readme, search the other Github issues, both open and closed issues
-3. If you're posting a question about something you want to try, please first try it on your own and post the results

From ec01e8ec866610497622dbcf9d6b26e1bc0ab9e2 Mon Sep 17 00:00:00 2001
From: James Stringer <38541878+jamesstringerparsec@users.noreply.github.com>
Date: Mon, 10 Jan 2022 21:27:07 +0100
Subject: [PATCH 29/50] Update README.md

---
 README.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/README.md b/README.md
index 4d6c277..d46cd9a 100644
--- a/README.md
+++ b/README.md
@@ -26,7 +26,7 @@ Easy-GPU-P does the following...
 5. Open and Run PreChecks.ps1 in Powershell ISE using the green play button and copy the GPU Listed (or the warnings that you need to fix).
 6. Open CopyFilesToVM.ps1 Powershell ISE and edit the params section at the top of the file, you need to be careful about how much ram, storage and hard drive you give it as you system needs to have that available.  On Windows 10 the GPUName must be left as "AUTO", In Windows 11 it can be either "AUTO" or the specific name of the GPU you want to partition exactly how it appears in PreChecks.ps1.  Additionally, you need to provide the path to the Windows 10/11 ISO file you downloaded.
 7. Run CopyFilesToVM.ps1 with your changes to the params section - this may take 5-10 minutes.
-8. Open and sign into Parsec on the VM.
+8. Open and sign into Parsec on the VM.  You can use Parsec to connect to the VM up to 4K60FPS.
 9. You should be good to go!
 
 ### Upgrading GPU Drivers when you update the host GPU Drivers

From 9a4c8d59caec5c2576f0945d533bdc966c937f9d Mon Sep 17 00:00:00 2001
From: James Stringer <38541878+jamesstringerparsec@users.noreply.github.com>
Date: Mon, 10 Jan 2022 23:26:04 +0100
Subject: [PATCH 30/50] Update README.md

---
 README.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/README.md b/README.md
index d46cd9a..c71250b 100644
--- a/README.md
+++ b/README.md
@@ -8,7 +8,7 @@ Easy-GPU-P does the following...
 1) Creates a VM of your choosing
 2) Automatically Installs Windows 11 to the VM
 3) Partitions your GPU of choice and copies the required driver files to the VM  
-4) Installs [Parsec](https://parsec.app) to the VM, you can use Parsec for free non commercially. To use Parsec commercially, sign up to a [Parsec For Teams](https://parsec.app/teams) account  
+4) Installs [Parsec](https://parsec.app) to the VM, Parsec is an ultra low latency remote desktop app.  You can use Parsec for free non commercially. To use Parsec commercially, sign up to a [Parsec For Teams](https://parsec.app/teams) account  
 
 ### Prerequisites:
 * Windows 10 20H1+ Pro or Enterprise  or Windows 11 Pro or Enterprise.  

From 4ca75a98f2b2df39be62dd3b6ece802ee3fd332a Mon Sep 17 00:00:00 2001
From: James Stringer <38541878+jamesstringerparsec@users.noreply.github.com>
Date: Mon, 10 Jan 2022 23:28:18 +0100
Subject: [PATCH 31/50] Update CopyFilesToVM.ps1

---
 CopyFilesToVM.ps1 | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/CopyFilesToVM.ps1 b/CopyFilesToVM.ps1
index f019e48..312265a 100644
--- a/CopyFilesToVM.ps1
+++ b/CopyFilesToVM.ps1
@@ -4366,6 +4366,7 @@ Start-VM -Name $params.VMName
 
 SmartExit -ExitReason "If all went well the Virtual Machine will have started, 
 In a few minutes it will load the Windows desktop, 
-when it does, sign into Parsec and start installing your games.  
+when it does, sign into Parsec (a fast remote desktop app)
+and connect to the machine using Parsec from another computer. 
 Have fun!
 Sign up to Parsec at https://parsec.app"

From 5063a0962410b6ea60adc1bba41c71d81a09d4e2 Mon Sep 17 00:00:00 2001
From: James Stringer <38541878+jamesstringerparsec@users.noreply.github.com>
Date: Wed, 12 Jan 2022 00:06:48 +0100
Subject: [PATCH 32/50] Update README.md

---
 README.md | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/README.md b/README.md
index c71250b..914e72b 100644
--- a/README.md
+++ b/README.md
@@ -1,10 +1,10 @@
-# Easy-GPU-P
-A work-in-progress project dedicated to making GPU Partitioning on Windows Hyper-V easier! Also known as GPU Paravirtualization (GPU-PV).  
+# Easy-GPU-PV
+A work-in-progress project dedicated to making GPU Paravirtualization on Windows Hyper-V easier!  
 
 GPU-P allows you to partition your systems dedicated or integrated GPU and assign it to several Hyper-V VMs.  It's the same technology that is used in WSL2, and Windows Sandbox.  
 
-Easy-GPU-P aims to make this easier by automating the steps required to get a GPU-P VM up and running.  
-Easy-GPU-P does the following...  
+Easy-GPU-PV aims to make this easier by automating the steps required to get a GPU-P VM up and running.  
+Easy-GPU-PV does the following...  
 1) Creates a VM of your choosing
 2) Automatically Installs Windows 11 to the VM
 3) Partitions your GPU of choice and copies the required driver files to the VM  
@@ -20,7 +20,7 @@ Easy-GPU-P does the following...
 
 ### Instructions
 1. Make sure your system meets the prerequisits.
-2. [Download the Repo and extract.](https://github.com/jamesstringerparsec/Easy-GPU-P/archive/refs/heads/main.zip)
+2. [Download the Repo and extract.](https://github.com/jamesstringerparsec/Easy-GPU-PV/archive/refs/heads/main.zip)
 3. Search your system for Powershell ISE and run as Administrator.
 4. In the extracted folder you downloaded, open PreChecks.ps1 in Powershell ISE.
 5. Open and Run PreChecks.ps1 in Powershell ISE using the green play button and copy the GPU Listed (or the warnings that you need to fix).

From 1ae71e43737e2b2dc47ed7ce27c5c2a2e4a048e0 Mon Sep 17 00:00:00 2001
From: James Stringer <38541878+jamesstringerparsec@users.noreply.github.com>
Date: Wed, 12 Jan 2022 00:17:55 +0100
Subject: [PATCH 33/50] Update README.md

---
 README.md | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/README.md b/README.md
index 914e72b..e0e1a40 100644
--- a/README.md
+++ b/README.md
@@ -1,9 +1,9 @@
 # Easy-GPU-PV
 A work-in-progress project dedicated to making GPU Paravirtualization on Windows Hyper-V easier!  
 
-GPU-P allows you to partition your systems dedicated or integrated GPU and assign it to several Hyper-V VMs.  It's the same technology that is used in WSL2, and Windows Sandbox.  
+GPU-PV allows you to partition your systems dedicated or integrated GPU and assign it to several Hyper-V VMs.  It's the same technology that is used in WSL2, and Windows Sandbox.  
 
-Easy-GPU-PV aims to make this easier by automating the steps required to get a GPU-P VM up and running.  
+Easy-GPU-PV aims to make this easier by automating the steps required to get a GPU-PV VM up and running.  
 Easy-GPU-PV does the following...  
 1) Creates a VM of your choosing
 2) Automatically Installs Windows 11 to the VM

From 1628c53eef8bf153e34f5d1cb1b1e3ab05eb989e Mon Sep 17 00:00:00 2001
From: James Stringer <38541878+jamesstringerparsec@users.noreply.github.com>
Date: Wed, 12 Jan 2022 00:23:58 +0100
Subject: [PATCH 34/50] Update CopyFilesToVM.ps1

---
 CopyFilesToVM.ps1 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/CopyFilesToVM.ps1 b/CopyFilesToVM.ps1
index 312265a..9a0dc2a 100644
--- a/CopyFilesToVM.ps1
+++ b/CopyFilesToVM.ps1
@@ -1,5 +1,5 @@
 $params = @{
-    VMName = "GPUP"
+    VMName = "GPUPV"
     SourcePath = "C:\Users\james\Downloads\Win11_English_x64.iso"
     Edition    = 6
     VhdFormat  = "VHDX"

From d400ffc2cdf4a90ee9bd5ca5f198906154668f0b Mon Sep 17 00:00:00 2001
From: James Stringer <38541878+jamesstringerparsec@users.noreply.github.com>
Date: Wed, 12 Jan 2022 13:23:17 +0100
Subject: [PATCH 35/50] Update README.md

---
 README.md | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/README.md b/README.md
index e0e1a40..08ca50a 100644
--- a/README.md
+++ b/README.md
@@ -8,7 +8,7 @@ Easy-GPU-PV does the following...
 1) Creates a VM of your choosing
 2) Automatically Installs Windows 11 to the VM
 3) Partitions your GPU of choice and copies the required driver files to the VM  
-4) Installs [Parsec](https://parsec.app) to the VM, Parsec is an ultra low latency remote desktop app.  You can use Parsec for free non commercially. To use Parsec commercially, sign up to a [Parsec For Teams](https://parsec.app/teams) account  
+4) Installs [Parsec](https://parsec.app) to the VM, Parsec is an ultra low latency remote desktop app, use this to connect to the VM.  You can use Parsec for free non commercially. To use Parsec commercially, sign up to a [Parsec For Teams](https://parsec.app/teams) account  
 
 ### Prerequisites:
 * Windows 10 20H1+ Pro or Enterprise  or Windows 11 Pro or Enterprise.  
@@ -62,6 +62,7 @@ It's important to update the VM GPU Drivers after you have updated the Host GPUs
 
 
 ### Notes:    
+- After you have signed into Parsec on the VM, always use Parsec to connect to the VM.  Keep the Microsft Hyper-V Video adapter disabled. Using RDP and Hyper-V Enhanced Session mode will result in broken behaviour and black screens in Parsec.  RDP and the Hyper-V video adapter only offer a maximum of 30FPS. Using Parsec will allow you to use up to 4k60 FPS.
 - If you get "ERROR  : Cannot bind argument to parameter 'Path' because it is null." this probably means you used Media Creation Tool to download the ISO.  You unfortunately cannot use that, if you don't see a direct ISO download link at the Microsoft page, follow [this guide.](https://www.nextofwindows.com/downloading-windows-10-iso-images-using-rufus)  
 - Windows 10 20H1 is not well tested as I don't have any Win10 20H1 installs, if you have success on Windows 10 20H1 - 21H2 please let me know.
 - A powered on display / HDMI dummy dongle must be plugged into the GPU to allow Parsec to capture the screen.  You only only need one of these per host machine regardless of number of VM's.

From b403c138508229e15e054ea203111ce70f3dfc73 Mon Sep 17 00:00:00 2001
From: James Stringer <38541878+jamesstringerparsec@users.noreply.github.com>
Date: Wed, 12 Jan 2022 18:54:54 +0100
Subject: [PATCH 36/50] Update README.md

---
 README.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/README.md b/README.md
index 08ca50a..b4ec2d1 100644
--- a/README.md
+++ b/README.md
@@ -22,7 +22,7 @@ Easy-GPU-PV does the following...
 1. Make sure your system meets the prerequisits.
 2. [Download the Repo and extract.](https://github.com/jamesstringerparsec/Easy-GPU-PV/archive/refs/heads/main.zip)
 3. Search your system for Powershell ISE and run as Administrator.
-4. In the extracted folder you downloaded, open PreChecks.ps1 in Powershell ISE.
+4. In the extracted folder you downloaded, open PreChecks.ps1 in Powershell ISE.  Run the files from within the extracted folder. Do not move them.
 5. Open and Run PreChecks.ps1 in Powershell ISE using the green play button and copy the GPU Listed (or the warnings that you need to fix).
 6. Open CopyFilesToVM.ps1 Powershell ISE and edit the params section at the top of the file, you need to be careful about how much ram, storage and hard drive you give it as you system needs to have that available.  On Windows 10 the GPUName must be left as "AUTO", In Windows 11 it can be either "AUTO" or the specific name of the GPU you want to partition exactly how it appears in PreChecks.ps1.  Additionally, you need to provide the path to the Windows 10/11 ISO file you downloaded.
 7. Run CopyFilesToVM.ps1 with your changes to the params section - this may take 5-10 minutes.

From b91e231f3554ab8a3793ea0aa0d00d11694bcd6b Mon Sep 17 00:00:00 2001
From: James Stringer <38541878+jamesstringerparsec@users.noreply.github.com>
Date: Wed, 12 Jan 2022 20:46:44 +0100
Subject: [PATCH 37/50] Support Windows Education

---
 PreChecks.ps1 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/PreChecks.ps1 b/PreChecks.ps1
index ce8afab..fe8a611 100644
--- a/PreChecks.ps1
+++ b/PreChecks.ps1
@@ -15,7 +15,7 @@ Function Get-DesktopPC
 
 Function Get-WindowsCompatibleOS {
 $build = Get-ItemProperty 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion'
-if ($build.CurrentBuild -ge 19041 -and ($($build.editionid -like 'Professional*') -or $($build.editionid -like 'Enterprise*'))) {
+if ($build.CurrentBuild -ge 19041 -and ($($build.editionid -like 'Professional*') -or $($build.editionid -like 'Enterprise*') -or $($build.editionid -like 'Education*'))) {
     Return $true
     }
 Else {

From c0a97b1f6281041371bd1c87298126c85014001b Mon Sep 17 00:00:00 2001
From: James Stringer <38541878+jamesstringerparsec@users.noreply.github.com>
Date: Wed, 12 Jan 2022 20:48:16 +0100
Subject: [PATCH 38/50] Update README.md

---
 README.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/README.md b/README.md
index b4ec2d1..374b821 100644
--- a/README.md
+++ b/README.md
@@ -11,7 +11,7 @@ Easy-GPU-PV does the following...
 4) Installs [Parsec](https://parsec.app) to the VM, Parsec is an ultra low latency remote desktop app, use this to connect to the VM.  You can use Parsec for free non commercially. To use Parsec commercially, sign up to a [Parsec For Teams](https://parsec.app/teams) account  
 
 ### Prerequisites:
-* Windows 10 20H1+ Pro or Enterprise  or Windows 11 Pro or Enterprise.  
+* Windows 10 20H1+ Pro, Enterprise or Education OR Windows 11 Pro, Enterprise or Education.  Windows 11 on host and VM is preferred due to better compatibility.  
 * Desktop Computer with dedicated NVIDIA/AMD GPU or Integrated Intel GPU - Laptops with NVIDIA GPUs are not supported at this time, but Intel integrated GPUs work on laptops.  GPU must support hardware video encoding (NVIDIA NVENC, Intel Quicksync or AMD AMF).  
 * Latest GPU driver from Intel.com or NVIDIA.com, don't rely on Device manager or Windows update.  
 * Latest Windows 10 ISO [downloaded from here](https://www.microsoft.com/en-gb/software-download/windows10ISO) / Windows 11 ISO [downloaded from here.](https://www.microsoft.com/en-us/software-download/windows11) - Do not use Media Creation Tool, if no direct ISO link is available, follow [this guide.](https://www.nextofwindows.com/downloading-windows-10-iso-images-using-rufus)

From a98b494d007e49bc18a0437f04fae64ddb5d8cb6 Mon Sep 17 00:00:00 2001
From: James Stringer <38541878+jamesstringerparsec@users.noreply.github.com>
Date: Thu, 13 Jan 2022 17:45:18 +0100
Subject: [PATCH 39/50] Improve config file writing logic

---
 User/Install.ps1 | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/User/Install.ps1 b/User/Install.ps1
index 18a220a..bdc007f 100644
--- a/User/Install.ps1
+++ b/User/Install.ps1
@@ -14,11 +14,15 @@ if (Test-Path HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninst
     else {
     (New-Object System.Net.WebClient).DownloadFile("https://builds.parsecgaming.com/package/parsec-windows.exe", "C:\Users\$env:USERNAME\Downloads\parsec-windows.exe")
     Start-Process "C:\Users\$env:USERNAME\Downloads\parsec-windows.exe" -ArgumentList "/silent", "/shared","/team_id=$team_id","/team_computer_key=$key" -wait
+    While (!(Test-Path C:\ProgramData\Parsec\config.txt)){
+        Start-Sleep -s 1
+        }
     $configfile = Get-Content C:\ProgramData\Parsec\config.txt
     $configfile += "host_virtual_monitors = 1"
     $configfile += "host_privacy_mode = 1"
     $configfile | Out-File C:\ProgramData\Parsec\config.txt -Encoding ascii
     Copy-Item -Path "C:\ProgramData\Easy-GPU-P\Parsec.lnk" -Destination "C:\Users\Public\Desktop"
+    Stop-Process parsecd -Force
     }
 
 Function ParsecVDDMonitorSetupScheduledTask {

From 396f876e8c36610df6575f1a8f1f9e34415684a6 Mon Sep 17 00:00:00 2001
From: James Stringer <38541878+jamesstringerparsec@users.noreply.github.com>
Date: Fri, 14 Jan 2022 11:54:11 +0100
Subject: [PATCH 40/50] Update README.md

---
 README.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/README.md b/README.md
index 374b821..a61778e 100644
--- a/README.md
+++ b/README.md
@@ -64,7 +64,7 @@ It's important to update the VM GPU Drivers after you have updated the Host GPUs
 ### Notes:    
 - After you have signed into Parsec on the VM, always use Parsec to connect to the VM.  Keep the Microsft Hyper-V Video adapter disabled. Using RDP and Hyper-V Enhanced Session mode will result in broken behaviour and black screens in Parsec.  RDP and the Hyper-V video adapter only offer a maximum of 30FPS. Using Parsec will allow you to use up to 4k60 FPS.
 - If you get "ERROR  : Cannot bind argument to parameter 'Path' because it is null." this probably means you used Media Creation Tool to download the ISO.  You unfortunately cannot use that, if you don't see a direct ISO download link at the Microsoft page, follow [this guide.](https://www.nextofwindows.com/downloading-windows-10-iso-images-using-rufus)  
-- Windows 10 20H1 is not well tested as I don't have any Win10 20H1 installs, if you have success on Windows 10 20H1 - 21H2 please let me know.
+- Your GPU on the host will have a Microsoft driver in device manager, rather than an nvidia/intel/amd driver. As long as it doesn't have a yellow triangle over top of the device in device manager, it's working correctly.  
 - A powered on display / HDMI dummy dongle must be plugged into the GPU to allow Parsec to capture the screen.  You only only need one of these per host machine regardless of number of VM's.
 - If your computer is super fast it may get to the login screen before the audio driver (VB Cable) and Parsec display driver are installed, but fear not! They should soon install.  
 - The screen may go black for times up to 10 seconds in sitautions when UAC prompts appear, applications go in and out of fullscreen and when you switch between video codecs in Parsec - not really sure why this happens, it's unique to GPU-P machines and seems to recover faster at 1280x720.

From 0d41cdfbd53bfbe7c190813f147992fa83479f81 Mon Sep 17 00:00:00 2001
From: James Stringer <38541878+jamesstringerparsec@users.noreply.github.com>
Date: Sat, 15 Jan 2022 00:11:54 +0100
Subject: [PATCH 41/50] Hopefully improve ISO mounting reliability

---
 CopyFilesToVM.ps1 | 65 ++++++++++++++++++++++++++++++++---------------
 1 file changed, 44 insertions(+), 21 deletions(-)

diff --git a/CopyFilesToVM.ps1 b/CopyFilesToVM.ps1
index 9a0dc2a..4db781c 100644
--- a/CopyFilesToVM.ps1
+++ b/CopyFilesToVM.ps1
@@ -27,15 +27,35 @@ function Is-Administrator
     (New-Object Security.Principal.WindowsPrincipal $CurrentUser).IsInRole([Security.Principal.WindowsBuiltinRole]::Administrator)  
 }
 
-Function Test-ISOType {
-param(
+Function Mount-ISOReliable {
+param (
 [string]$SourcePath
 )
-    $mountResult = Mount-DiskImage $SourcePath -PassThru 
-    $Driveletter = ($mountResult | Get-Volume).DriveLetter
-    Test-Path $($Driveletter + ":\sources\Install.wim")
-    Dismount-DiskImage -DevicePath $mountResult.DevicePath | Out-Null
+$VirtualDiskDrives = Get-Volume | Where-Object {$_.DriveType -eq "CD-ROM"} | select *
+Foreach ($individualDrive in $VirtualDiskDrives) {
+    Dismount-DiskImage -ImagePath $sourcePath | Out-Null
     }
+$mountResult = Mount-DiskImage -ImagePath $SourcePath
+$delay = 0
+Do {
+    if ($delay -gt 15) {
+        Function Get-NewDriveLetter {
+            $UsedDriveLetters = ((Get-Volume).DriveLetter) -join ""
+             Do {
+                $DriveLetter = (65..90)| Get-Random | % {[char]$_}
+                }
+            Until (!$UsedDriveLetters.Contains("$DriveLetter"))
+            $DriveLetter
+            }
+        $DriveLetter = "$(Get-NewDriveLetter)" +  ":"
+        Get-WmiObject -Class Win32_volume | Where-Object {$_.Label -eq "CCCOMA_X64FRE_EN-US_DV9"} | Set-WmiInstance -Arguments @{DriveLetter="$driveletter"}
+        }
+    Start-Sleep -s 1 
+    $delay++
+    }
+Until (($mountResult | Get-Volume).DriveLetter -ne $NULL)
+($mountResult | Get-Volume).DriveLetter
+}
 
 Function ConcatenateVHDPath {
 param(
@@ -76,6 +96,7 @@ Function Check-Params {
 
 $ExitReason = @()
 
+$ISODriveLetter = Mount-ISOReliable -SourcePath $params.SourcePath
 
 if ((Is-Administrator) -eq $false) {
     $ExitReason += "Script not running as Administrator, please run script as Administrator."
@@ -86,7 +107,7 @@ if (!(Test-Path $params.VHDPath)) {
 if (!(test-path $params.SourcePath)) {
     $ExitReason += "ISO Path Invalid. Please enter a valid ISO Path in the SourcePath section of Params."
     }
-if (!(Test-ISOType -SourcePath $params.SourcePath)) {
+if (!(Test-Path $("$ISODriveLetter"+":\Sources\install.wim"))) {
     $ExitReason += "This ISO is invalid, please check readme for ISO downloading instructions."
     }
 if ($params.Username -eq $params.VMName ) {
@@ -329,6 +350,12 @@ function Convert-WindowsImage {
         [ValidateScript({ Test-Path $(Resolve-Path $_) })]
         $SourcePath,
 
+        [Parameter(ParameterSetName="SRC")]
+        [Alias("DriveLetter")]
+        [string]
+        [ValidateNotNullOrEmpty()]
+        [string]$ISODriveLetter,
+
         [Parameter(ParameterSetName="SRC")]
         [Alias("GPU")]
         [string]
@@ -1276,12 +1303,6 @@ You can use the fields below to configure the VHD or VHDX that you want to creat
                             $txtSourcePath.Text = $isoPath = (Resolve-Path $openFileDialog1.FileName).Path
                             Write-W2VInfo "Opening ISO $(Split-Path $isoPath -Leaf)..."
 
-                            $openIso     = Mount-DiskImage -ImagePath $isoPath -StorageType ISO -PassThru
-
-                            # Refresh the DiskImage object so we can get the real information about it.  I assume this is a bug.
-                            $openIso     = Get-DiskImage -ImagePath $isoPath
-                            $driveLetter = ($openIso | Get-Volume).DriveLetter
-
                             $script:SourcePath  = "$($driveLetter):\sources\install.wim"
 
                             # Check to see if there's a WIM file we can muck about with.
@@ -1923,22 +1944,23 @@ You can use the fields below to configure the VHD or VHDX that you want to creat
                 # or about network latency.
                 if (Test-IsNetworkLocation $SourcePath)
                 {
-                    Write-W2VInfo "Copying ISO $(Split-Path $SourcePath -Leaf) to temp folder..."
-                    robocopy $(Split-Path $SourcePath -Parent) $TempDirectory $(Split-Path $SourcePath -Leaf) | Out-Null
-                    $SourcePath = "$($TempDirectory)\$(Split-Path $SourcePath -Leaf)"
-
-                    $tempSource = $SourcePath
+                    Write-W2VError "ISO Path cannot be network location"
+                    #Write-W2VInfo "Copying ISO $(Split-Path $SourcePath -Leaf) to temp folder..."
+                    #robocopy $(Split-Path $SourcePath -Parent) $TempDirectory $(Split-Path $SourcePath -Leaf) | Out-Null
+                    #$SourcePath = "$($TempDirectory)\$(Split-Path $SourcePath -Leaf)"
+                    #$tempSource = $SourcePath
                 }
 
                 $isoPath = (Resolve-Path $SourcePath).Path
 
                 Write-W2VInfo "Opening ISO $(Split-Path $isoPath -Leaf)..."
+                <#
                 $openIso     = Mount-DiskImage -ImagePath $isoPath -StorageType ISO -PassThru
                 # Refresh the DiskImage object so we can get the real information about it.  I assume this is a bug.
                 $openIso     = Get-DiskImage -ImagePath $isoPath
                 $driveLetter = ($openIso | Get-Volume).DriveLetter
-
-                $SourcePath  = "$($driveLetter):\sources\install.wim"
+                #>
+                $SourcePath  = "$($DriveLetter):\sources\install.wim"
 
                 # Check to see if there's a WIM file we can muck about with.
                 Write-W2VInfo "Looking for $($SourcePath)..."
@@ -4322,6 +4344,7 @@ param(
 [string]$autologon
 )
     $VHDPath = ConcatenateVHDPath -VHDPath $VHDPath -VMName $VMName
+    $DriveLetter = Mount-ISOReliable -SourcePath $SourcePath
 
     if ($(Get-VM -Name $VMName -ErrorAction SilentlyContinue) -ne $NULL) {
         SmartExit -ExitReason "Virtual Machine already exists with name $VMName, please delete existing VM or change VMName"
@@ -4331,7 +4354,7 @@ param(
         }
     Modify-AutoUnattend -username "$username" -password "$password" -autologon $autologon -hostname $VMName -UnattendPath $UnattendPath
     $MaxAvailableVersion = (Get-VMHostSupportedVersion).Version | Where-Object {$_.Major -lt 254}| Select-Object -Last 1 
-    Convert-WindowsImage -SourcePath $SourcePath -Edition $Edition -VHDFormat $Vhdformat -VHDPath $VhdPath -DiskLayout $DiskLayout -UnattendPath $UnattendPath -GPUName $GPUName -Team_ID $Team_ID -Key $Key -SizeBytes $SizeBytes| Out-Null
+    Convert-WindowsImage -SourcePath $SourcePath -ISODriveLetter $DriveLetter -Edition $Edition -VHDFormat $Vhdformat -VHDPath $VhdPath -DiskLayout $DiskLayout -UnattendPath $UnattendPath -GPUName $GPUName -Team_ID $Team_ID -Key $Key -SizeBytes $SizeBytes| Out-Null
     if (Test-Path $vhdPath) {
         New-VM -Name $VMName -MemoryStartupBytes $MemoryAmount -VHDPath $VhdPath -Generation 2 -SwitchName $NetworkSwitch -Version $MaxAvailableVersion | Out-Null
         Set-VM -Name $VMName -ProcessorCount $CPUCores -CheckpointType Disabled -LowMemoryMappedIoSpace 3GB -HighMemoryMappedIoSpace 32GB -GuestControlledCacheTypes $true -AutomaticStopAction ShutDown

From ef70de43321eb08603914667b87152d5aa968cfb Mon Sep 17 00:00:00 2001
From: James Stringer <38541878+jamesstringerparsec@users.noreply.github.com>
Date: Sat, 15 Jan 2022 20:47:11 +0100
Subject: [PATCH 42/50] Bugfix to hopefully address non-english iso bug

---
 CopyFilesToVM.ps1 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/CopyFilesToVM.ps1 b/CopyFilesToVM.ps1
index 4db781c..a146a56 100644
--- a/CopyFilesToVM.ps1
+++ b/CopyFilesToVM.ps1
@@ -1987,7 +1987,7 @@ You can use the fields below to configure the VHD or VHDX that you want to creat
             ####################################################################################################
 
             Write-W2VInfo "Looking for the requested Windows image in the WIM file"
-            $WindowsImage = Get-WindowsImage -ImagePath $SourcePath
+            $WindowsImage = Get-WindowsImage -ImagePath "$($driveLetter):\sources\install.wim"
 
             if (-not $WindowsImage -or ($WindowsImage -is [System.Array]))
             {

From 61c2fd2ec4a6d662b59b4868b01f8dab091f18ec Mon Sep 17 00:00:00 2001
From: James Stringer <38541878+jamesstringerparsec@users.noreply.github.com>
Date: Sat, 15 Jan 2022 22:02:30 +0100
Subject: [PATCH 43/50] Clean up mounted ISOs

---
 CopyFilesToVM.ps1 | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)

diff --git a/CopyFilesToVM.ps1 b/CopyFilesToVM.ps1
index a146a56..b3aab12 100644
--- a/CopyFilesToVM.ps1
+++ b/CopyFilesToVM.ps1
@@ -27,14 +27,20 @@ function Is-Administrator
     (New-Object Security.Principal.WindowsPrincipal $CurrentUser).IsInRole([Security.Principal.WindowsBuiltinRole]::Administrator)  
 }
 
-Function Mount-ISOReliable {
+Function Dismount-ISO {
 param (
 [string]$SourcePath
 )
-$VirtualDiskDrives = Get-Volume | Where-Object {$_.DriveType -eq "CD-ROM"} | select *
-Foreach ($individualDrive in $VirtualDiskDrives) {
+$disk = Get-Volume | Where-Object {$_.DriveType -eq "CD-ROM"} | select *
+Foreach ($d in $disk) {
     Dismount-DiskImage -ImagePath $sourcePath | Out-Null
     }
+}
+
+Function Mount-ISOReliable {
+param (
+[string]$SourcePath
+)
 $mountResult = Mount-DiskImage -ImagePath $SourcePath
 $delay = 0
 Do {
@@ -57,6 +63,7 @@ Until (($mountResult | Get-Volume).DriveLetter -ne $NULL)
 ($mountResult | Get-Volume).DriveLetter
 }
 
+
 Function ConcatenateVHDPath {
 param(
 [string]$VHDPath,
@@ -122,6 +129,7 @@ if (($params.VMName -notmatch "^[a-zA-Z0-9]+$") -or ($params.VMName.Length -gt 1
 if (([Environment]::OSVersion.Version.Build -lt 22000) -and ($params.GPUName -ne "AUTO")) {
     $ExitReason += "GPUName must be set to AUTO on Windows 10."
     }
+    Dismount-ISO -SourcePath $params.SourcePath 
 If ($ExitReason.Count -gt 0) {
     Write-Host "Script failed params check due to the following reasons:" -ForegroundColor DarkYellow
     ForEach ($IndividualReason in $ExitReason) {
@@ -2610,6 +2618,7 @@ You can use the fields below to configure the VHD or VHDX that you want to creat
             }
 
             # Close out the transcript and tell the user we're done.
+            Dismount-ISO -SourcePath $ISOPath
             Write-W2VInfo "Done."
             if ($transcripting)
             {
@@ -4377,7 +4386,6 @@ param(
         }
     else {
     SmartExit -ExitReason "Failed to create VHDX, stopping script"
-
     }
 }
 

From ccee5f12dcee68c2563ed9ebd8885cffe131ebbb Mon Sep 17 00:00:00 2001
From: Kodikuu <Kodikuu@users.noreply.github.com>
Date: Tue, 1 Feb 2022 14:30:52 +0000
Subject: [PATCH 44/50] Windows version matching, Rufus download info

- Add "matched Windows versions" as a requirement for compatibility
- Specify that Rufus needs "Check for updates" enabled to be able to download ISOs
- Minor spelling corrections
---
 README.md | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/README.md b/README.md
index a61778e..77a0580 100644
--- a/README.md
+++ b/README.md
@@ -6,12 +6,13 @@ GPU-PV allows you to partition your systems dedicated or integrated GPU and assi
 Easy-GPU-PV aims to make this easier by automating the steps required to get a GPU-PV VM up and running.  
 Easy-GPU-PV does the following...  
 1) Creates a VM of your choosing
-2) Automatically Installs Windows 11 to the VM
+2) Automatically Installs Windows to the VM
 3) Partitions your GPU of choice and copies the required driver files to the VM  
 4) Installs [Parsec](https://parsec.app) to the VM, Parsec is an ultra low latency remote desktop app, use this to connect to the VM.  You can use Parsec for free non commercially. To use Parsec commercially, sign up to a [Parsec For Teams](https://parsec.app/teams) account  
 
 ### Prerequisites:
 * Windows 10 20H1+ Pro, Enterprise or Education OR Windows 11 Pro, Enterprise or Education.  Windows 11 on host and VM is preferred due to better compatibility.  
+* Matched Windows versions between the host and VM. Mismatches may cause compatibility issues, blue-screens, or other issues. (Win10 21H1 + Win10 21H1, or Win11 21H2 + Win11 21H2, for example)  
 * Desktop Computer with dedicated NVIDIA/AMD GPU or Integrated Intel GPU - Laptops with NVIDIA GPUs are not supported at this time, but Intel integrated GPUs work on laptops.  GPU must support hardware video encoding (NVIDIA NVENC, Intel Quicksync or AMD AMF).  
 * Latest GPU driver from Intel.com or NVIDIA.com, don't rely on Device manager or Windows update.  
 * Latest Windows 10 ISO [downloaded from here](https://www.microsoft.com/en-gb/software-download/windows10ISO) / Windows 11 ISO [downloaded from here.](https://www.microsoft.com/en-us/software-download/windows11) - Do not use Media Creation Tool, if no direct ISO link is available, follow [this guide.](https://www.nextofwindows.com/downloading-windows-10-iso-images-using-rufus)
@@ -19,12 +20,12 @@ Easy-GPU-PV does the following...
 * Allow Powershell scripts to run on your system - typically by running "Set-ExecutionPolicy unrestricted" in Powershell running as Administrator.  
 
 ### Instructions
-1. Make sure your system meets the prerequisits.
+1. Make sure your system meets the prerequisites.
 2. [Download the Repo and extract.](https://github.com/jamesstringerparsec/Easy-GPU-PV/archive/refs/heads/main.zip)
 3. Search your system for Powershell ISE and run as Administrator.
 4. In the extracted folder you downloaded, open PreChecks.ps1 in Powershell ISE.  Run the files from within the extracted folder. Do not move them.
 5. Open and Run PreChecks.ps1 in Powershell ISE using the green play button and copy the GPU Listed (or the warnings that you need to fix).
-6. Open CopyFilesToVM.ps1 Powershell ISE and edit the params section at the top of the file, you need to be careful about how much ram, storage and hard drive you give it as you system needs to have that available.  On Windows 10 the GPUName must be left as "AUTO", In Windows 11 it can be either "AUTO" or the specific name of the GPU you want to partition exactly how it appears in PreChecks.ps1.  Additionally, you need to provide the path to the Windows 10/11 ISO file you downloaded.
+6. Open CopyFilesToVM.ps1 Powershell ISE and edit the params section at the top of the file, you need to be careful about how much ram, storage and hard drive you give it as your system needs to have that available.  On Windows 10 the GPUName must be left as "AUTO", In Windows 11 it can be either "AUTO" or the specific name of the GPU you want to partition exactly how it appears in PreChecks.ps1.  Additionally, you need to provide the path to the Windows 10/11 ISO file you downloaded.
 7. Run CopyFilesToVM.ps1 with your changes to the params section - this may take 5-10 minutes.
 8. Open and sign into Parsec on the VM.  You can use Parsec to connect to the VM up to 4K60FPS.
 9. You should be good to go!
@@ -65,9 +66,10 @@ It's important to update the VM GPU Drivers after you have updated the Host GPUs
 - After you have signed into Parsec on the VM, always use Parsec to connect to the VM.  Keep the Microsft Hyper-V Video adapter disabled. Using RDP and Hyper-V Enhanced Session mode will result in broken behaviour and black screens in Parsec.  RDP and the Hyper-V video adapter only offer a maximum of 30FPS. Using Parsec will allow you to use up to 4k60 FPS.
 - If you get "ERROR  : Cannot bind argument to parameter 'Path' because it is null." this probably means you used Media Creation Tool to download the ISO.  You unfortunately cannot use that, if you don't see a direct ISO download link at the Microsoft page, follow [this guide.](https://www.nextofwindows.com/downloading-windows-10-iso-images-using-rufus)  
 - Your GPU on the host will have a Microsoft driver in device manager, rather than an nvidia/intel/amd driver. As long as it doesn't have a yellow triangle over top of the device in device manager, it's working correctly.  
-- A powered on display / HDMI dummy dongle must be plugged into the GPU to allow Parsec to capture the screen.  You only only need one of these per host machine regardless of number of VM's.
+- A powered on display / HDMI dummy dongle must be plugged into the GPU to allow Parsec to capture the screen.  You only need one of these per host machine regardless of number of VM's.
 - If your computer is super fast it may get to the login screen before the audio driver (VB Cable) and Parsec display driver are installed, but fear not! They should soon install.  
-- The screen may go black for times up to 10 seconds in sitautions when UAC prompts appear, applications go in and out of fullscreen and when you switch between video codecs in Parsec - not really sure why this happens, it's unique to GPU-P machines and seems to recover faster at 1280x720.
+- The screen may go black for times up to 10 seconds in situations when UAC prompts appear, applications go in and out of fullscreen and when you switch between video codecs in Parsec - not really sure why this happens, it's unique to GPU-P machines and seems to recover faster at 1280x720.
 - Vulkan renderer is unavailable and GL games may or may not work.  [This](https://www.microsoft.com/en-us/p/opencl-and-opengl-compatibility-pack/9nqpsl29bfff?SilentAuth=1&wa=wsignin1.0#activetab=pivot:overviewtab) may help with some OpenGL apps.  
 - If you do not have administrator permissions on the machine it means you set the username and vmname to the same thing, these needs to be different.  
-- AMD Polaris GPUS like the RX 580 do not support hardware video encoding via GPU Paravirtualization at this time.
+- AMD Polaris GPUS like the RX 580 do not support hardware video encoding via GPU Paravirtualization at this time.  
+- To download Windows ISOs with Rufus, it must have "Check for updates" enabled.

From e8b71fad5d55633f743afd5c0a04feb747b04e4e Mon Sep 17 00:00:00 2001
From: Kodikuu <Kodikuu@users.noreply.github.com>
Date: Tue, 6 Sep 2022 12:08:33 +0100
Subject: [PATCH 45/50] Update driver to 0.38

---
 VMScripts/ParsecVDDInstall.ps1 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/VMScripts/ParsecVDDInstall.ps1 b/VMScripts/ParsecVDDInstall.ps1
index f5d71bd..0876075 100644
--- a/VMScripts/ParsecVDDInstall.ps1
+++ b/VMScripts/ParsecVDDInstall.ps1
@@ -1,5 +1,5 @@
 if (!(Get-WmiObject Win32_VideoController | Where-Object name -like "Parsec Virtual Display Adapter")) {
-(New-Object System.Net.WebClient).DownloadFile("https://builds.parsec.app/vdd/parsec-vdd-0.37.0.0.exe", "C:\Users\$env:USERNAME\Downloads\parsec-vdd.exe")
+(New-Object System.Net.WebClient).DownloadFile("https://builds.parsec.app/vdd/parsec-vdd-0.38.0.0.exe", "C:\Users\$env:USERNAME\Downloads\parsec-vdd.exe")
 while (((Get-ChildItem Cert:\LocalMachine\TrustedPublisher) | Where-Object {$_.Subject -like '*Parsec*'}) -eq $NULL) {
     certutil -Enterprise -Addstore "TrustedPublisher" C:\ProgramData\Easy-GPU-P\ParsecPublic.cer
     Start-Sleep -s 5

From 9e31d4f65f10f4f5dd1caac72065d5ce6dade704 Mon Sep 17 00:00:00 2001
From: Emanuele Borghini <manuborg2002@gmail.com>
Date: Wed, 2 Nov 2022 00:12:51 +0100
Subject: [PATCH 46/50] Fix typos in readme

---
 README.md | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/README.md b/README.md
index 77a0580..5bb9f9a 100644
--- a/README.md
+++ b/README.md
@@ -33,8 +33,8 @@ Easy-GPU-PV does the following...
 ### Upgrading GPU Drivers when you update the host GPU Drivers
 It's important to update the VM GPU Drivers after you have updated the Host GPUs drivers. You can do this by...  
 1. Reboot the host after updating GPU Drivers.  
-2. Open Powershell as administrator and change directory (CD) to the path that CopyFilestoVM.ps1 and Update-VMGPUPartitonDriver.ps1 are located. 
-3. Run ```Update-VMGPUPartitonDriver.ps1 -VMName "Name of your VM" -GPUName "Name of your GPU"```    (Windows 10 GPU name must be "AUTO")
+2. Open Powershell as administrator and change directory (CD) to the path that CopyFilesToVM.ps1 and Update-VMGpuPartitionDriver.ps1 are located. 
+3. Run ```Update-VMGpuPartitionDriver.ps1 -VMName "Name of your VM" -GPUName "Name of your GPU"```    (Windows 10 GPU name must be "AUTO")
 
 ### Values
   ```VMName = "GPUP"``` - Name of VM in Hyper-V and the computername / hostname  

From 0e0ef15d659a1f0c88bc3ad61bf27a9648379e72 Mon Sep 17 00:00:00 2001
From: James Stringer <38541878+jamesstringerparsec@users.noreply.github.com>
Date: Tue, 13 Dec 2022 12:16:23 -0800
Subject: [PATCH 47/50] Update ParsecVDDInstall.ps1

---
 VMScripts/ParsecVDDInstall.ps1 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/VMScripts/ParsecVDDInstall.ps1 b/VMScripts/ParsecVDDInstall.ps1
index 0876075..3664fdc 100644
--- a/VMScripts/ParsecVDDInstall.ps1
+++ b/VMScripts/ParsecVDDInstall.ps1
@@ -1,5 +1,5 @@
 if (!(Get-WmiObject Win32_VideoController | Where-Object name -like "Parsec Virtual Display Adapter")) {
-(New-Object System.Net.WebClient).DownloadFile("https://builds.parsec.app/vdd/parsec-vdd-0.38.0.0.exe", "C:\Users\$env:USERNAME\Downloads\parsec-vdd.exe")
+(New-Object System.Net.WebClient).DownloadFile("https://builds.parsec.app/vdd/parsec-vdd-0.41.0.0.exe", "C:\Users\$env:USERNAME\Downloads\parsec-vdd.exe")
 while (((Get-ChildItem Cert:\LocalMachine\TrustedPublisher) | Where-Object {$_.Subject -like '*Parsec*'}) -eq $NULL) {
     certutil -Enterprise -Addstore "TrustedPublisher" C:\ProgramData\Easy-GPU-P\ParsecPublic.cer
     Start-Sleep -s 5

From 61219fb88e973aaaa9ffd3f250613f764e7a11ff Mon Sep 17 00:00:00 2001
From: James Stringer <38541878+jamesstringerparsec@users.noreply.github.com>
Date: Tue, 13 Dec 2022 19:02:37 -0800
Subject: [PATCH 48/50] Fix Team Machine setup

---
 CopyFilesToVM.ps1 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/CopyFilesToVM.ps1 b/CopyFilesToVM.ps1
index b3aab12..8a1447c 100644
--- a/CopyFilesToVM.ps1
+++ b/CopyFilesToVM.ps1
@@ -151,7 +151,7 @@ param(
 
     foreach ($line in $content) {
         if ($line -like "0Parameters="){
-            $line = "0Parameters=-team_id=$Team_ID -team_key=$Key"
+            $line = "0Parameters=$Team_ID $Key"
             $new += $line
             }
         Else {

From 0eb623944182f38c55e3f5b3d1e49582f2ae7db7 Mon Sep 17 00:00:00 2001
From: James Stringer <38541878+jamesstringerparsec@users.noreply.github.com>
Date: Tue, 13 Dec 2022 19:18:09 -0800
Subject: [PATCH 49/50] Fix pre-checks

---
 CopyFilesToVM.ps1 | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/CopyFilesToVM.ps1 b/CopyFilesToVM.ps1
index 8a1447c..378afcf 100644
--- a/CopyFilesToVM.ps1
+++ b/CopyFilesToVM.ps1
@@ -103,8 +103,6 @@ Function Check-Params {
 
 $ExitReason = @()
 
-$ISODriveLetter = Mount-ISOReliable -SourcePath $params.SourcePath
-
 if ((Is-Administrator) -eq $false) {
     $ExitReason += "Script not running as Administrator, please run script as Administrator."
     }
@@ -114,8 +112,12 @@ if (!(Test-Path $params.VHDPath)) {
 if (!(test-path $params.SourcePath)) {
     $ExitReason += "ISO Path Invalid. Please enter a valid ISO Path in the SourcePath section of Params."
     }
-if (!(Test-Path $("$ISODriveLetter"+":\Sources\install.wim"))) {
-    $ExitReason += "This ISO is invalid, please check readme for ISO downloading instructions."
+else {
+    $ISODriveLetter = Mount-ISOReliable -SourcePath $params.SourcePath
+    if (!(Test-Path $("$ISODriveLetter"+":\Sources\install.wim"))) {
+        $ExitReason += "This ISO is invalid, please check readme for ISO downloading instructions."
+        }
+    Dismount-ISO -SourcePath $params.SourcePath 
     }
 if ($params.Username -eq $params.VMName ) {
     $ExitReason += "Username cannot be the same as VMName."
@@ -129,7 +131,6 @@ if (($params.VMName -notmatch "^[a-zA-Z0-9]+$") -or ($params.VMName.Length -gt 1
 if (([Environment]::OSVersion.Version.Build -lt 22000) -and ($params.GPUName -ne "AUTO")) {
     $ExitReason += "GPUName must be set to AUTO on Windows 10."
     }
-    Dismount-ISO -SourcePath $params.SourcePath 
 If ($ExitReason.Count -gt 0) {
     Write-Host "Script failed params check due to the following reasons:" -ForegroundColor DarkYellow
     ForEach ($IndividualReason in $ExitReason) {

From fb295b0119c52cd0d283d6451d83bb80509e32d0 Mon Sep 17 00:00:00 2001
From: James Stringer <38541878+jamesstringerparsec@users.noreply.github.com>
Date: Tue, 13 Dec 2022 19:31:25 -0800
Subject: [PATCH 50/50] Add check for Powershell(x86)

---
 CopyFilesToVM.ps1 | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/CopyFilesToVM.ps1 b/CopyFilesToVM.ps1
index 378afcf..b24df3a 100644
--- a/CopyFilesToVM.ps1
+++ b/CopyFilesToVM.ps1
@@ -103,6 +103,9 @@ Function Check-Params {
 
 $ExitReason = @()
 
+if ([ENVIRONMENT]::Is64BitProcess -eq $false) {
+    $ExitReason += "You are not using the correct version of Powershell, do not use Powershell(x86)."
+    }
 if ((Is-Administrator) -eq $false) {
     $ExitReason += "Script not running as Administrator, please run script as Administrator."
     }