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

Start-Process : This command cannot be run due to the error: The system cannot find the file specified. #102

Open
oloflarsson opened this issue Jan 1, 2023 · 9 comments

Comments

@oloflarsson
Copy link

Screenshot 2023-01-01 at 11 24 25

Start-Process : This command cannot be run due to the error: The system cannot find the file specified.
At C:\Users\oloflarsson1989\Desktop\parsectemp\PostInstall\PostInstall.ps1:843 char:5
+     Start-Process -FilePath "C:\Program Files\Parsec\vigem\10\x64\dev ...
+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [Start-Process], InvalidOperationException
    + FullyQualifiedErrorId : InvalidOperationException,Microsoft.PowerShell.Commands.StartProcessCommand

Start-Process : This command cannot be run due to the error: The system cannot find the file specified.
At C:\Users\oloflarsson1989\Desktop\parsectemp\PostInstall\PostInstall.ps1:848 char:5
+     Start-Process -FilePath "C:\Program Files\Parsec\vigem\10\x64\dev ...
+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [Start-Process], InvalidOperationException
    + FullyQualifiedErrorId : InvalidOperationException,Microsoft.PowerShell.Commands.StartProcessCommand

Start-Process : This command cannot be run due to the error: The system cannot find the file specified.
At C:\Users\oloflarsson1989\Desktop\parsectemp\PostInstall\PostInstall.ps1:849 char:5
+     Start-Process -FilePath "C:\Program Files\Parsec\vigem\10\x64\dev ...
+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [Start-Process], InvalidOperationException
    + FullyQualifiedErrorId : InvalidOperationException,Microsoft.PowerShell.Commands.StartProcessCommand

Start-Process : This command cannot be run due to the error: The system cannot find the file specified.
At C:\Users\oloflarsson1989\Desktop\parsectemp\PostInstall\PostInstall.ps1:850 char:5
+     Start-Process -FilePath "C:\Program Files\Parsec\vigem\10\x64\dev ...
+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [Start-Process], InvalidOperationException
    + FullyQualifiedErrorId : InvalidOperationException,Microsoft.PowerShell.Commands.StartProcessCommand

The system cannot find the path specified.
@emilvel
Copy link

emilvel commented Jan 12, 2023

I can confirm this issue also - it appears to be due to a change in the Parsec setup and the layout of the directory structure under C:\Program Files\Parsec, which no longer has the vigem subdirectory.
Wonder if updating the script to use devcon.exe from the vdd subdirectory will produce a functionally identical result?...

@samqbush
Copy link

Can confirm this works as a fix. Edit C:\Users\Administrator\Downloads\Parsec-Cloud-Preparation-Tool\Parsec-Cloud-Preparation-Tool-master\PostInstall\PostInstall.ps1 and change the -FilePath location on line 843 under the Disable Devices section to the following
Start-Process -FilePath "C:\Program Files\Parsec\vdd\devcon.exe"

@wannabewayno
Copy link

wannabewayno commented Apr 25, 2023

Can confirm that this is an active issue following Parsec's own guide, metadata on the webpage puts this at only being a couple of months old.

I can also confirm that the fix by adjusting *\vigem\10\x64* to *\vdd\* in the PostInstall.ps1 script also works when trying this out on a g4dn.xlarge EC2 instance.

For anyone who comes across this in the future

  • I had to edit 4 lines of code (not 1) and run the script again.

To avoid other errors, I also...

  • Did this on a clean install (i.e. I haven't tried editing the script after failure and re-running it)
  • Split the "one-touch" install steps up into a few different steps and I managed to get this working.
  • Manually installed the required gaming drivers (I've also posted how todo this below)

The full work-around is below, which is a shame as the 'out-of-the-box' experience is lost, but it get's the job done.
Make sure you're connected to the Instance via RDP for the rest of these instructions. Everything here happens on the instance.

  1. Install Gaming drivers
    Before you do ANYTHING, make sure that you're EC2 instance's IAM Role has the AWS's managed policy AmazonS3ReadOnlyAccess attached to it.
    Unfortunately I won't cover this here, but I assure you it's simple enough.

    1. Create a Powershell script to get the gaming driver installer.

      1. Copy and paste the code below in a file called NVIDIA-Gaming-Drivers.ps1 and save it to the desktop.
        $Bucket = "nvidia-gaming"
        $KeyPrefix = "windows/latest"
        $LocalPath = "$home\Desktop\NVIDIA"
        $Objects = Get-S3Object -BucketName $Bucket -KeyPrefix $KeyPrefix -Region us-east-1
        foreach ($Object in $Objects) {
            $LocalFileName = $Object.Key
            if ($LocalFileName -ne '' -and $Object.Size -ne 0) {
                $LocalFilePath = Join-Path $LocalPath $LocalFileName
                Copy-S3Object -BucketName $Bucket -Key $Object.Key -LocalFile $LocalFilePath -Region us-east-1
            }
        }
        
      2. Right click on NVIDIA-Gaming-Drivers.ps1 that you just created and click run with powershell. It is worth noting that it will look like nothing is happening, be patient as it is indeed working.
    2. Install the game drivers.
      The Above script would have dumped a folder on the desktop called "NVIDIA", Open the folder and traverse the directory tree until you get to the driver installation program, Run it.

    3. Reboot the instance.
      You can do this by either...

      • Clicking restart from the power menu
      • From the AWS Console; EC2 > Instances > checkbox the instance > Actions > Restart Instance
    4. Reconnect to the instance via RDP

    5. Run this in powershell

      New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\nvlddmkm\Global" -Name "vGamingMarketplace" -PropertyType "DWord" -Value "2"
      
    6. Followed by This

      Invoke-WebRequest -Uri "https://nvidia-gaming.s3.amazonaws.com/GridSwCert-Archive/GridSwCertWindows_2021_10_2.cert" -OutFile "$Env:PUBLIC\Documents\GridSwCert.txt"
      
    7. Reboot the instance again.

    8. Verify this worked.
      Run this in PowerShell

      C:\Windows\System32\DriverStore\FileRepository\nvgrid*\\nvidia-smi.exe -q
      

      You should see a big ass output and about half way down see something like this

      vGPU Software Licensed Product
          Product Name    : NVIDIA Cloud Gaming
          License Status  : Licensed (Expiry: N/A)
      
  2. Install Parsec without the driver update.

    1. Download Parsec's Cloud prep tool

      [Net.ServicePointManager]::SecurityProtocol = "tls12, tls11, tls" 
      $ScriptWebArchive = "https://github.com/parsec-cloud/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  
      
    2. Find the PostInstall script and unfortunately edit it...
      Raised in this GH issue you'll need to navigate to this folder in file explorer --> C:\Users\Administrator\Downloads\Parsec-Cloud-Preparation-Tool\Parsec-Cloud-Preparation-Tool-master\PostInstall

      1. Right click the PostInstall.ps1 script and click edit to launch the PowerShell ISE.
      2. use crtl + H to open "find and replace"
      3. Find What: vigem\10\x64, Replace with: vdd
      4. Save the file crtl + s
    3. Run the script.

      • Open PowerShell and run this command to cd into the PostInstall dir

        cd C:\Users\Administrator\Downloads\Parsec-Cloud-Preparation-Tool\Parsec-Cloud-Preparation-Tool-master\PostInstall
        
      • Run the script

        .\PostInstall.ps1 -DontPromptPasswordUpdateGPU
        

      It is worth noting that:

      • At this point I felt that after a while things had "hung"; I went to crtl + c and try running this again that had somehow triggered the next set of commands.
      • I saw a tonne of errors pop up relating to moving/creating files that don't exist, but it still successfully installed... I didn't document this as I was already quite fed up with troubleshooting.
  3. Find the Parsec app in the windows search bar and run it for the fist time! It should work!

If Anyone wants further help, I've configured a few CloudFormation templates and bash scripts that automate most of this (or at least I'm doing that now) So let if someone else needs help, hit me up, I've gone through a lot of failed attempts at setting up a g4dn instance.

@smshapiro85
Copy link

@wannabewayno can't thank you enough for these instructions, I was practically pulling out my hair with this until I started from scratch and followed your instructions. THANK YOU! Maybe submit a PR, despite the errors at the end, it worked perfectly.

@wannabewayno
Copy link

@smshapiro85 Hey mate no worries! I was pulling my hair out too! Since I wrote that fix, I've completely re-worked the script and deleted about 1/3 of it. There's a startup script that runs on boot that overrides your parsec login with a non-existent "team id" login which should also be disabled.

Point is, I've made a heap of changes that is probably outside the scope of a PR and it looks like this repo isn't being maintained anymore. The Original Author of this issue has made 2 PR's and that hasn't been looked at.

I've found a lot of dead-ends and unhelpful people regarding cloud gaming so I'm honestly just happy to help out.
If you're running your hardware on AWS then I have a a complete plug and play solution for you if you want, just let me know the best way to contact you outside of an issue thread!

@samqbush
Copy link

samqbush commented Jun 3, 2023

@wannabewayno , why not just fork this repo, make the updates, and then share with the world? That's the core concept of github and forking.

@say8425
Copy link

say8425 commented Jun 27, 2023

I did not try yet, but can we also skip installing the driver updating?
https://aws.amazon.com/marketplace/pp/prodview-xrrke4dwueqv6?sr=0-1&ref_=beagle&applicationId=AWSMPContessa

ning-y added a commit to ning-y/Parsec-Cloud-Preparation-Tool that referenced this issue Nov 9, 2023
@jigglu
Copy link

jigglu commented Mar 17, 2024

Hello, just here to tell that this still works like a charm in 2024. Thanks to @wannabewayno for this fix

@duc-ph
Copy link

duc-ph commented Sep 14, 2024

Thank you so much @wannabewayno, this worked nicely! I'd love to see your out of the box solution as well, could you please email to [email protected]?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants