Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update broken paths of virtual display drivers #105

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 7 additions & 9 deletions PostInstall/PostInstall.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ function cloudprovider {

$paperspace = $(
Try {
(Invoke-WebRequest -uri http://metadata.paperspace.com/meta-data/machine -TimeoutSec 5)
(Invoke-WebRequest -uri http://169.254.169.254/meta-data/machine -TimeoutSec 5)
}
catch {
}
Expand Down Expand Up @@ -800,7 +800,7 @@ Function Server2019Controller {
(New-Object System.Net.WebClient).DownloadFile("http://www.download.windowsupdate.com/msdownload/update/v3-19990518/cabpool/2060_8edb3031ef495d4e4247e51dcb11bef24d2c4da7.cab", "C:\ParsecTemp\Drivers\Xbox360_64Eng.cab")
if((Test-Path -Path C:\ParsecTemp\Drivers\Xbox360_64Eng) -eq $true) {} Else {New-Item -Path C:\ParsecTemp\Drivers\Xbox360_64Eng -ItemType directory | Out-Null}
cmd.exe /c "C:\Windows\System32\expand.exe C:\ParsecTemp\Drivers\Xbox360_64Eng.cab -F:* C:\ParsecTemp\Drivers\Xbox360_64Eng" | Out-Null
cmd.exe /c '"C:\Program Files\Parsec\vigem\10\x64\devcon.exe" dp_add "C:\ParsecTemp\Drivers\Xbox360_64Eng\xusb21.inf"' | Out-Null
cmd.exe /c '"C:\Program Files\Parsec\vdd\devcon.exe" dp_add "C:\ParsecTemp\Drivers\Xbox360_64Eng\xusb21.inf"' | Out-Null
}
}

Expand Down Expand Up @@ -840,14 +840,14 @@ function Install-Gaming-Apps {
#Disable Devices
function disable-devices {
ProgressWriter -Status "Disabling Microsoft Basic Display Adapter, Generic Non PNP Monitor and other devices" -PercentComplete $PercentComplete
Start-Process -FilePath "C:\Program Files\Parsec\vigem\10\x64\devcon.exe" -ArgumentList '/r disable "HDAUDIO\FUNC_01&VEN_10DE&DEV_0083&SUBSYS_10DE11A3*"'
Start-Process -FilePath "C:\Program Files\Parsec\vdd\devcon.exe" -ArgumentList '/r disable "HDAUDIO\FUNC_01&VEN_10DE&DEV_0083&SUBSYS_10DE11A3*"'
Get-PnpDevice | where {$_.friendlyname -like "Generic Non-PNP Monitor" -and $_.status -eq "OK"} | Disable-PnpDevice -confirm:$false
Get-PnpDevice | where {$_.friendlyname -like "Microsoft Basic Display Adapter" -and $_.status -eq "OK"} | Disable-PnpDevice -confirm:$false
Get-PnpDevice | where {$_.friendlyname -like "Google Graphics Array (GGA)" -and $_.status -eq "OK"} | Disable-PnpDevice -confirm:$false
Get-PnpDevice | where {$_.friendlyname -like "Microsoft Hyper-V Video" -and $_.status -eq "OK"} | Disable-PnpDevice -confirm:$false
Start-Process -FilePath "C:\Program Files\Parsec\vigem\10\x64\devcon.exe" -ArgumentList '/r disable "PCI\VEN_1013&DEV_00B8*"'
Start-Process -FilePath "C:\Program Files\Parsec\vigem\10\x64\devcon.exe" -ArgumentList '/r disable "PCI\VEN_1D0F&DEV_1111*"'
Start-Process -FilePath "C:\Program Files\Parsec\vigem\10\x64\devcon.exe" -ArgumentList '/r disable "PCI\VEN_1AE0&DEV_A002*"'
Start-Process -FilePath "C:\Program Files\Parsec\vdd\devcon.exe" -ArgumentList '/r disable "PCI\VEN_1013&DEV_00B8*"'
Start-Process -FilePath "C:\Program Files\Parsec\vdd\devcon.exe" -ArgumentList '/r disable "PCI\VEN_1D0F&DEV_1111*"'
Start-Process -FilePath "C:\Program Files\Parsec\vdd\devcon.exe" -ArgumentList '/r disable "PCI\VEN_1AE0&DEV_A002*"'
}

#Cleanup
Expand Down Expand Up @@ -963,7 +963,7 @@ foreach ($func in $ScripttaskList) {
& $func $PercentComplete
}

StartGPUUpdate -DontPromptPasswordUpdateGPU:$DontPromptPasswordUpdateGPU
#StartGPUUpdate -DontPromptPasswordUpdateGPU:$DontPromptPasswordUpdateGPU
Start-ScheduledTask -TaskName "Setup Team Machine"
ProgressWriter -status "Done" -percentcomplete 100
Write-Host "1. Open Parsec and sign in (Team machines should have automatically signed in if userdata was correct)" -ForegroundColor black -BackgroundColor Green
Expand All @@ -973,5 +973,3 @@ Write-Host "You may want to change your Windows password to something simpler if
Write-host "DONE!" -ForegroundColor black -BackgroundColor Green
if ($DontPromptPasswordUpdateGPU) {}
Else {pause}


2 changes: 1 addition & 1 deletion PreInstall/TeamMachineSetup.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ function fetchUserData {
catch {
}
Try {
(Invoke-WebRequest -uri http://metadata.paperspace.com/meta-data/machine -TimeoutSec 5)
(Invoke-WebRequest -uri http://169.254.169.254/meta-data/machine -TimeoutSec 5)
$stream = "bytes"
}
catch {
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ Do not select "Turn on Display Device" when setting up the instance, this will c
### START HERE! Copy this code into Powershell (you may need to press enter at the end):
```
[Net.ServicePointManager]::SecurityProtocol = "tls12, tls11, tls"
$ScriptWebArchive = "https://github.com/parsec-cloud/Parsec-Cloud-Preparation-Tool/archive/master.zip"
$ScriptWebArchive = "https://github.com/kaktus42/Parsec-Cloud-Preparation-Tool/archive/master.zip"
$LocalArchivePath = "$ENV:UserProfile\Downloads\Parsec-Cloud-Preparation-Tool"
(New-Object System.Net.WebClient).DownloadFile($ScriptWebArchive, "$LocalArchivePath.zip")
Expand-Archive "$LocalArchivePath.zip" -DestinationPath $LocalArchivePath -Force
Expand Down Expand Up @@ -123,7 +123,7 @@ Q. I want to run this script automatically without user interraction.
A. It's possible to do so but you will need to figure out how to install the GPU Driver on your own. The below code will do everything but install the GPU Driver.
```
[Net.ServicePointManager]::SecurityProtocol = "tls12, tls11, tls"
$ScriptWebArchive = "https://github.com/parsec-cloud/Parsec-Cloud-Preparation-Tool/archive/master.zip"
$ScriptWebArchive = "https://github.com/kaktus42/Parsec-Cloud-Preparation-Tool/archive/master.zip"
$LocalArchivePath = "$ENV:UserProfile\Downloads\Parsec-Cloud-Preparation-Tool"
(New-Object System.Net.WebClient).DownloadFile($ScriptWebArchive, "$LocalArchivePath.zip")
Expand-Archive "$LocalArchivePath.zip" -DestinationPath $LocalArchivePath -Force
Expand Down