mirror of
https://github.com/jamesstringerparsec/Easy-GPU-PV.git
synced 2024-08-30 18:22:17 +00:00
Improvements
This commit is contained in:
parent
7e86eea6ca
commit
6c202a7312
@ -5,8 +5,8 @@ param(
|
||||
[string]$DriveLetter
|
||||
)
|
||||
|
||||
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\Windows\system32\GroupPolicy\User\Scripts\Logon) -eq $true) {} Else {New-Item -Path $DriveLetter\Windows\system32\GroupPolicy\User\Scripts\Logon -ItemType directory | Out-Null}
|
||||
if((Test-Path -Path $DriveLetter\Windows\system32\GroupPolicy\User\Scripts\Logoff) -eq $true) {} Else {New-Item -Path $DriveLetter\Windows\system32\GroupPolicy\User\Scripts\Logoff -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\gpt.ini -Destination $DriveLetter\Windows\system32\GroupPolicy
|
||||
Copy-Item -Path $psscriptroot\psscripts.ini -Destination $DriveLetter\Windows\system32\GroupPolicy\User\Scripts
|
||||
@ -876,7 +876,7 @@ You can use the fields below to configure the VHD or VHDX that you want to creat
|
||||
[ValidateNotNullOrEmpty()]
|
||||
$text
|
||||
)
|
||||
Write-Host "ERROR : $($text)" -ForegroundColor (Get-Host).PrivateData.ErrorForegroundColor
|
||||
Write-Host "ERROR : $($text)"
|
||||
}
|
||||
|
||||
##########################################################################################
|
||||
|
43
Install.ps1
43
Install.ps1
@ -8,7 +8,24 @@ if (Test-Path HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninst
|
||||
(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")
|
||||
Start-Process "C:\Users\$env:USERNAME\Downloads\parsec-windows.exe" -ArgumentList "/silent", "/shared" -wait
|
||||
Import-Certificate -CertStoreLocation Cert:\LocalMachine\TrustedPublisher -FilePath "C:\ProgramData\Easy-GPU-P\parsecpublic.cer" | Out-Null
|
||||
$Success = $false
|
||||
[int]$Retries = 0
|
||||
do {
|
||||
try {
|
||||
Import-Certificate -CertStoreLocation Cert:\LocalMachine\TrustedPublisher -FilePath "C:\ProgramData\Easy-GPU-P\parsecpublic.cer"
|
||||
$Success = $true
|
||||
}
|
||||
catch {
|
||||
if ($Retries -gt 4){
|
||||
$Success = $true
|
||||
}
|
||||
else {
|
||||
Start-Sleep -Seconds 5
|
||||
$Retries++
|
||||
}
|
||||
}
|
||||
}
|
||||
While ($Success -eq $false)
|
||||
Start-Process "C:\Users\$env:USERNAME\Downloads\parsec-vdd.exe" -ArgumentList "/silent" -wait
|
||||
$configfile = Get-Content C:\ProgramData\Parsec\config.txt
|
||||
$configfile += "host_virtual_monitors = 1"
|
||||
@ -17,3 +34,27 @@ if (Test-Path HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninst
|
||||
Stop-Process Parsec -Force
|
||||
}
|
||||
|
||||
$Stoploop = $false
|
||||
[int]$Retrycount = "0"
|
||||
|
||||
|
||||
|
||||
do {
|
||||
try {
|
||||
|
||||
Write-Host "Job completed"
|
||||
$Stoploop = $true
|
||||
}
|
||||
catch {
|
||||
if ($Retrycount -gt 3){
|
||||
Write-Host "Could not send Information after 3 retrys."
|
||||
$Stoploop = $true
|
||||
}
|
||||
else {
|
||||
Write-Host "Could not send Information retrying in 30 seconds..."
|
||||
Start-Sleep -Seconds 30
|
||||
$Retrycount = $Retrycount + 1
|
||||
}
|
||||
}
|
||||
}
|
||||
While ($Stoploop -eq $false)
|
@ -182,13 +182,13 @@ Notes: Enter your comments here...
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<Description>Allow Scripts</Description>
|
||||
<Order>2</Order>
|
||||
<CommandLine>reg add HKLM\Software\Policies\Microsoft\Windows\Powershell /v ExecutionPolicy /t REG_MULTI_SZ /d Unrestricted</commandline>
|
||||
<CommandLine>reg add HKLM\Software\Policies\Microsoft\Windows\Powershell /v Unrestricted /t REG_SZ ExecutionPolicy</CommandLine>
|
||||
<RequiresUserInput>false</RequiresUserInput>
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<Description>Allow Scripts</Description>
|
||||
<Order>3</Order>
|
||||
<CommandLine>reg add HKLM\Software\Policies\Microsoft\Windows\Powershell /v EnableScripts /t REG_DWORD /d 1</commandline>
|
||||
<CommandLine>reg add HKLM\Software\Policies\Microsoft\Windows\Powershell /v 1 /t REG_DWORD EnableScripts</CommandLine>
|
||||
<RequiresUserInput>false</RequiresUserInput>
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
|
Loading…
Reference in New Issue
Block a user