'Command to run an ".exe" file with NVIDIA Graphics card

I have created an installer which contains an executable (".exe" file), which I want to run using the NVIDIA Graphics Processor ( Which is not the default option ). On my laptop I am able to achieve it by right clicking on the executable and selecting "Run with Graphics Processor" and then choose "High-Performance NVIDIA Processor". I am creating this installer using "Advanced Installer" and the executable is obtained from a "Qt Creator" C++ Application. Goal is to create an installer which will run the executable by default with "High-Performance NVIDIA Processor" always.



Solution 1:[1]

You can go to Nvidia control panel and look for manage 3D settings in 3D settings then program settings then select add then look up to your .exe file then choose to run it with high performance Nvidia processor then click apply and by that each time you are going to run your .exe file the file will run automatically using Nvidia GPU.


Steps

  1. Navigate to: Nvidia Control Panel > 3D Settings > Manage 3D Settings > Program Settings > Add

  2. Look up your .exe file and choose to run it with high performance Nvidia processor

  3. Click Apply

Solution 2:[2]

If you run cmd.exe with the graphics card anything from there will use that graphics card.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Community
Solution 2 ayunami2000