From ed6b41a49904ec6784cfb53801a8f84f757f2bb3 Mon Sep 17 00:00:00 2001
From: Plutoaurus <108938674+Plutoaurus@users.noreply.github.com>
Date: Sat, 22 Nov 2025 19:39:20 +0000
Subject: [PATCH 1/6] Updated packages
---
FastGPU-P/FastGPU-P.csproj | 8 ++++----
FastGPU-P/Form1.Designer.cs | 8 +++-----
FastGPU-P/Form1.cs | 14 ++++++++++++--
3 files changed, 19 insertions(+), 11 deletions(-)
diff --git a/FastGPU-P/FastGPU-P.csproj b/FastGPU-P/FastGPU-P.csproj
index 1dc6c9f..49b6159 100644
--- a/FastGPU-P/FastGPU-P.csproj
+++ b/FastGPU-P/FastGPU-P.csproj
@@ -2,7 +2,7 @@
WinExe
- net6.0-windows
+ net10.0-windows
FastGPU_P
enable
true
@@ -11,9 +11,9 @@
-
-
-
+
+
+
\ No newline at end of file
diff --git a/FastGPU-P/Form1.Designer.cs b/FastGPU-P/Form1.Designer.cs
index eebf6d1..2461fc9 100644
--- a/FastGPU-P/Form1.Designer.cs
+++ b/FastGPU-P/Form1.Designer.cs
@@ -34,7 +34,7 @@ private void InitializeComponent()
label2 = new Label();
addButton = new Button();
AllocationLabel = new Label();
- allocationBar = new MetroFramework.Controls.MetroTrackBar();
+ allocationBar = new TrackBar();
allocLabel = new Label();
installDriverBtn = new Button();
RemoveButton = new Button();
@@ -99,13 +99,11 @@ private void InitializeComponent()
//
// allocationBar
//
- allocationBar.BackColor = Color.Transparent;
allocationBar.Location = new Point(24, 184);
allocationBar.Margin = new Padding(3, 2, 3, 2);
allocationBar.Name = "allocationBar";
- allocationBar.Size = new Size(223, 22);
+ allocationBar.Size = new Size(223, 45);
allocationBar.TabIndex = 7;
- allocationBar.Text = "null";
allocationBar.Scroll += allocationBar_Scroll;
//
// allocLabel
@@ -180,7 +178,7 @@ private void InitializeComponent()
private Label label2;
private Button addButton;
private Label AllocationLabel;
- private MetroFramework.Controls.MetroTrackBar allocationBar;
+ private TrackBar allocationBar;
private Label allocLabel;
private Button installDriverBtn;
private Button RemoveButton;
diff --git a/FastGPU-P/Form1.cs b/FastGPU-P/Form1.cs
index c4e777b..f341413 100644
--- a/FastGPU-P/Form1.cs
+++ b/FastGPU-P/Form1.cs
@@ -1,4 +1,5 @@
-using MetroFramework.Forms;
+using MaterialSkin.Controls;
+using MaterialSkin;
using System.Management.Automation;
using System.Diagnostics;
using System.Collections.ObjectModel;
@@ -6,11 +7,20 @@
namespace FastGPU_P
{
- public partial class Form1 : MetroForm
+ public partial class Form1 : MaterialForm
{
public Form1()
{
InitializeComponent();
+ // MaterialSkin manager setup
+ var materialSkinManager = MaterialSkinManager.Instance;
+ materialSkinManager.AddFormToManage(this);
+ materialSkinManager.Theme = MaterialSkinManager.Themes.LIGHT;
+ materialSkinManager.ColorScheme = new ColorScheme(
+ Primary.Blue600, Primary.Blue700,
+ Primary.Blue200, Accent.LightBlue200,
+ TextShade.WHITE
+ );
Shown += Form1_Shown;
}
From c5a2d0968c1c333d26178e998a2e67ec7795bfe8 Mon Sep 17 00:00:00 2001
From: Plutoaurus <108938674+Plutoaurus@users.noreply.github.com>
Date: Sat, 22 Nov 2025 19:45:31 +0000
Subject: [PATCH 2/6] fix allocationBar.Scroll expects an EventHandler and
error handling
---
FastGPU-P/Form1.cs | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/FastGPU-P/Form1.cs b/FastGPU-P/Form1.cs
index f341413..ad3f446 100644
--- a/FastGPU-P/Form1.cs
+++ b/FastGPU-P/Form1.cs
@@ -24,7 +24,7 @@ public Form1()
Shown += Form1_Shown;
}
- private void Form1_Shown(Object sender, EventArgs e)
+ private void Form1_Shown(object? sender, EventArgs e)
{
int i = 0;
@@ -55,7 +55,7 @@ private void Form1_Shown(Object sender, EventArgs e)
}
- private void allocationBar_Scroll(object sender, ScrollEventArgs e)
+ private void allocationBar_Scroll(object sender, EventArgs e)
{
this.allocLabel.Text = allocationBar.Value.ToString() + "%";
}
From 0d4e1bbcac2e2a0d10b58902ce65079ec65dcbdd Mon Sep 17 00:00:00 2001
From: Plutoaurus <108938674+Plutoaurus@users.noreply.github.com>
Date: Sat, 22 Nov 2025 19:49:04 +0000
Subject: [PATCH 3/6] restore execution policy after running
---
FastGPU-P/Form1.cs | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/FastGPU-P/Form1.cs b/FastGPU-P/Form1.cs
index ad3f446..53c6fe5 100644
--- a/FastGPU-P/Form1.cs
+++ b/FastGPU-P/Form1.cs
@@ -95,7 +95,8 @@ private void addButton_Click(object sender, EventArgs e)
}
string _scr = (@"
- Set-ExecutionPolicy -ExecutionPolicy Unrestricted
+ $oldPolicy = Get-ExecutionPolicy
+ Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Scope Process
$VMName = " + "\"" + vmBox.GetItemText(vmBox.Text) + "\"" + @"
$instance = " + "\"" + getGPUInstance(gpuBox.Text) + "\"" + @"
[decimal]$GPUResourceAllocationPercentage = " + allocationBar.Value.ToString() + @"
@@ -108,6 +109,7 @@ private void addButton_Click(object sender, EventArgs e)
Set-VM -GuestControlledCacheTypes $true -VMName $VMName
Set-VM -LowMemoryMappedIoSpace 1Gb -VMName $VMName
Set-VM -HighMemoryMappedIoSpace 32GB -VMName $VMName
+ Set-ExecutionPolicy -ExecutionPolicy $oldPolicy -Scope Process
");
var _ps = PowerShell.Create();
_ps.AddScript(_scr);
@@ -126,7 +128,8 @@ private void installDriver()
{
//
string _scr = @"
-Set-ExecutionPolicy -ExecutionPolicy Unrestricted
+$oldPolicy = Get-ExecutionPolicy
+Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Scope Process
Import-Module Storage
Function Add-VMGpuPartitionAdapterFiles {
param(
@@ -239,6 +242,9 @@ Function Add-VMGpuPartitionAdapterFiles {
""Previous State was running so starting VM...""
Start-VM $VMName
}
+";
+ _scr += @"
+Set-ExecutionPolicy -ExecutionPolicy $oldPolicy -Scope Process
";
var _ps = PowerShell.Create();
_ps.AddScript(_scr);
@@ -251,7 +257,6 @@ Function Add-VMGpuPartitionAdapterFiles {
{
MessageBox.Show("GPU driver updated successfully!");
}
- //
}
private void RemoveButton_Click(object sender, EventArgs e)
From 840ba837932b8911924024afdc46b0aa2d111334 Mon Sep 17 00:00:00 2001
From: Plutoaurus <108938674+Plutoaurus@users.noreply.github.com>
Date: Sat, 22 Nov 2025 20:03:33 +0000
Subject: [PATCH 4/6] correct allocation slider range
---
FastGPU-P/Form1.Designer.cs | 2 ++
1 file changed, 2 insertions(+)
diff --git a/FastGPU-P/Form1.Designer.cs b/FastGPU-P/Form1.Designer.cs
index 2461fc9..6fb2013 100644
--- a/FastGPU-P/Form1.Designer.cs
+++ b/FastGPU-P/Form1.Designer.cs
@@ -35,6 +35,8 @@ private void InitializeComponent()
addButton = new Button();
AllocationLabel = new Label();
allocationBar = new TrackBar();
+ allocationBar.Minimum = 0;
+ allocationBar.Maximum = 100;
allocLabel = new Label();
installDriverBtn = new Button();
RemoveButton = new Button();
From 58b415943d40be022cb624276e43b994ce3ff307 Mon Sep 17 00:00:00 2001
From: Plutoaurus <108938674+Plutoaurus@users.noreply.github.com>
Date: Sat, 22 Nov 2025 20:05:36 +0000
Subject: [PATCH 5/6] make slider match default value
---
FastGPU-P/Form1.Designer.cs | 1 +
1 file changed, 1 insertion(+)
diff --git a/FastGPU-P/Form1.Designer.cs b/FastGPU-P/Form1.Designer.cs
index 6fb2013..1a57894 100644
--- a/FastGPU-P/Form1.Designer.cs
+++ b/FastGPU-P/Form1.Designer.cs
@@ -37,6 +37,7 @@ private void InitializeComponent()
allocationBar = new TrackBar();
allocationBar.Minimum = 0;
allocationBar.Maximum = 100;
+ allocationBar.Value = 50;
allocLabel = new Label();
installDriverBtn = new Button();
RemoveButton = new Button();
From 701ee094375b0121b4441a45432e98bbedc93de7 Mon Sep 17 00:00:00 2001
From: Plutoaurus <108938674+Plutoaurus@users.noreply.github.com>
Date: Sat, 22 Nov 2025 20:26:11 +0000
Subject: [PATCH 6/6] update readme
---
README.md | 24 ++++++++++++++++++++++--
1 file changed, 22 insertions(+), 2 deletions(-)
diff --git a/README.md b/README.md
index 7732d07..2f9a5b1 100644
--- a/README.md
+++ b/README.md
@@ -3,8 +3,28 @@ A WIP GUI app to make GPU-P way easier!
Based on : https://github.com/jamesstringerparsec/Easy-GPU-PV

# Usage
-The usage is simple, choose VM, choose GPU, slide the percentage you want to allocate of it and then press Add.
-For drivers, choose VM, and then click install/update driver. It will mount the VM's VHD, copy the driver files, and unmount the VHD.
+Requires Visual Studio Code (exe can be provided but dont trust anything from the internet so use the code)
+
+ - Download all files and extract the zip
+ - Open visual Studio Code as Administrator (right click, run as administrator)
+ - File -> open folder and open the extracted folder
+ - Trust the files on the popup (as youve read through the code on github and happy its safe of course)
+ - Install c# dev kit and .net 10, it should popup when you open the folder asking you to do this
+
+ - In the terminal enter
+ dotnet build FastGPU-P/FastGPU-P.csproj
+ and press enter
+ - In the terminal enter
+ dotnet run --project FastGPU-P/FastGPU-P.csproj
+ and press enter
+
+ The GUI will now load
+
+- Choose VM,
+- Choose GPU,
+- Slide the percentage you want to allocate of it and then press Add.
+- Click install/update driver. It will mount the VM's VHD, copy the driver files, and unmount the VHD.
+
# Troubleshooting
If you get an error related to Execution Policy you should execute:
"Set-ExecutionPolicy -ExecutionPolicy Unrestricted" on PowerShell