mirror of
https://github.com/VirtualDrivers/Virtual-Display-Driver.git
synced 2026-10-20 05:40:03 -05:00
Compare commits
29
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5c2de5c5af | ||
|
|
39ae925267 | ||
|
|
a342f5f261 | ||
|
|
6fbe4d0345 | ||
|
|
ddab6332d0 | ||
|
|
96cd8d9242 | ||
|
|
a34825ea76 | ||
|
|
2048024073 | ||
|
|
6684040dc7 | ||
|
|
fe8091828f | ||
|
|
074413ce23 | ||
|
|
ac6a93486a | ||
|
|
321781bdb0 | ||
|
|
ce92f44f69 | ||
|
|
6144b56d27 | ||
|
|
c4e01ba39e | ||
|
|
be3f0a6288 | ||
|
|
c44b310a55 | ||
|
|
6058ce0b6e | ||
|
|
9d9d8d3e4e | ||
|
|
929d970f20 | ||
|
|
d4833be7f4 | ||
|
|
3778c78bf6 | ||
|
|
227c69bb69 | ||
|
|
3600ea4f93 | ||
|
|
2a7a4cfe30 | ||
|
|
c9bff80b23 | ||
|
|
4a1649b197 | ||
|
|
2ac6924bc2 |
No files matched your search
@@ -0,0 +1,3 @@
|
||||
# These are supported funding model platforms
|
||||
|
||||
github: [itsmikethetech, zjoasan, bud3699]
|
||||
+4
-2
@@ -1,7 +1,7 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.7.34031.279
|
||||
# Visual Studio Version 16
|
||||
VisualStudioVersion = 16.0.31129.286
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "IddSampleDriver", "IddSampleDriver\IddSampleDriver.vcxproj", "{2D54CB75-8B17-4F11-97DC-847B0244CD46}"
|
||||
EndProject
|
||||
@@ -25,6 +25,7 @@ Global
|
||||
{2D54CB75-8B17-4F11-97DC-847B0244CD46}.Debug|ARM64.Deploy.0 = Debug|ARM64
|
||||
{2D54CB75-8B17-4F11-97DC-847B0244CD46}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{2D54CB75-8B17-4F11-97DC-847B0244CD46}.Debug|x64.Build.0 = Debug|x64
|
||||
{2D54CB75-8B17-4F11-97DC-847B0244CD46}.Debug|x64.Deploy.0 = Debug|x64
|
||||
{2D54CB75-8B17-4F11-97DC-847B0244CD46}.Debug|x86.ActiveCfg = Debug|Win32
|
||||
{2D54CB75-8B17-4F11-97DC-847B0244CD46}.Debug|x86.Build.0 = Debug|Win32
|
||||
{2D54CB75-8B17-4F11-97DC-847B0244CD46}.Debug|x86.Deploy.0 = Debug|Win32
|
||||
@@ -36,6 +37,7 @@ Global
|
||||
{2D54CB75-8B17-4F11-97DC-847B0244CD46}.Release|ARM64.Deploy.0 = Release|ARM64
|
||||
{2D54CB75-8B17-4F11-97DC-847B0244CD46}.Release|x64.ActiveCfg = Release|x64
|
||||
{2D54CB75-8B17-4F11-97DC-847B0244CD46}.Release|x64.Build.0 = Release|x64
|
||||
{2D54CB75-8B17-4F11-97DC-847B0244CD46}.Release|x64.Deploy.0 = Release|x64
|
||||
{2D54CB75-8B17-4F11-97DC-847B0244CD46}.Release|x86.ActiveCfg = Release|Win32
|
||||
{2D54CB75-8B17-4F11-97DC-847B0244CD46}.Release|x86.Build.0 = Release|Win32
|
||||
{2D54CB75-8B17-4F11-97DC-847B0244CD46}.Release|x86.Deploy.0 = Release|Win32
|
||||
|
||||
+671
-444
File diff suppressed because it is too large.
Load diff
Binary file not shown.
@@ -1,7 +1,7 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 16
|
||||
VisualStudioVersion = 16.0.31129.286
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.9.34622.214
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "IddSampleDriver", "IddSampleDriver.vcxproj", "{2D54CB75-8B17-4F11-97DC-847B0244CD46}"
|
||||
EndProject
|
||||
@@ -37,7 +37,6 @@ Global
|
||||
{2D54CB75-8B17-4F11-97DC-847B0244CD46}.Release|ARM64.Deploy.0 = Release|ARM64
|
||||
{2D54CB75-8B17-4F11-97DC-847B0244CD46}.Release|x64.ActiveCfg = Release|x64
|
||||
{2D54CB75-8B17-4F11-97DC-847B0244CD46}.Release|x64.Build.0 = Release|x64
|
||||
{2D54CB75-8B17-4F11-97DC-847B0244CD46}.Release|x64.Deploy.0 = Release|x64
|
||||
{2D54CB75-8B17-4F11-97DC-847B0244CD46}.Release|x86.ActiveCfg = Release|Win32
|
||||
{2D54CB75-8B17-4F11-97DC-847B0244CD46}.Release|x86.Build.0 = Release|Win32
|
||||
{2D54CB75-8B17-4F11-97DC-847B0244CD46}.Release|x86.Deploy.0 = Release|Win32
|
||||
|
||||
@@ -38,6 +38,9 @@
|
||||
<ClCompile Include="Driver.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\..\..\..\Downloads\wudfwdm.h">
|
||||
<DeploymentContent>true</DeploymentContent>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Driver.h" />
|
||||
<ClInclude Include="Trace.h" />
|
||||
</ItemGroup>
|
||||
@@ -116,8 +119,9 @@
|
||||
<UMDF_VERSION_MAJOR>2</UMDF_VERSION_MAJOR>
|
||||
<IndirectDisplayDriver>true</IndirectDisplayDriver>
|
||||
<IDDCX_VERSION_MAJOR>1</IDDCX_VERSION_MAJOR>
|
||||
<IDDCX_VERSION_MINOR>0</IDDCX_VERSION_MINOR>
|
||||
<IDDCX_VERSION_MINOR>10</IDDCX_VERSION_MINOR>
|
||||
<Driver_SpectreMitigation>Spectre</Driver_SpectreMitigation>
|
||||
<UMDF_VERSION_MINOR>25</UMDF_VERSION_MINOR>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<TargetVersion>Windows10</TargetVersion>
|
||||
@@ -125,7 +129,9 @@
|
||||
<UMDF_VERSION_MAJOR>2</UMDF_VERSION_MAJOR>
|
||||
<IndirectDisplayDriver>true</IndirectDisplayDriver>
|
||||
<IDDCX_VERSION_MAJOR>1</IDDCX_VERSION_MAJOR>
|
||||
<IDDCX_VERSION_MINOR>0</IDDCX_VERSION_MINOR>
|
||||
<IDDCX_VERSION_MINOR>10</IDDCX_VERSION_MINOR>
|
||||
<Driver_SpectreMitigation>Spectre</Driver_SpectreMitigation>
|
||||
<UMDF_VERSION_MINOR>25</UMDF_VERSION_MINOR>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'" Label="Configuration">
|
||||
<TargetVersion>Windows10</TargetVersion>
|
||||
@@ -178,6 +184,7 @@
|
||||
<DebuggerFlavor>DbgengRemoteDebugger</DebuggerFlavor>
|
||||
<RunCodeAnalysis>true</RunCodeAnalysis>
|
||||
<Inf2CatUseLocalTime>true</Inf2CatUseLocalTime>
|
||||
<TimeStampServer />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<DebuggerFlavor>DbgengRemoteDebugger</DebuggerFlavor>
|
||||
@@ -231,12 +238,13 @@
|
||||
<WppScanConfigurationData Condition="'%(ClCompile.ScanConfigurationData)' == ''">trace.h</WppScanConfigurationData>
|
||||
<ExceptionHandling>Async</ExceptionHandling>
|
||||
<EnablePREfast>true</EnablePREfast>
|
||||
<AdditionalOptions>/D_ATL_NO_WIN_SUPPORT /DUMDF_DRIVER /DIDDCX_VERSION_MAJOR=1 /DIDDCX_VERSION_MINOR=4 /DIDDCX_MINIMUM_VERSION_REQUIRED=4 %(AdditionalOptions)</AdditionalOptions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>%(AdditionalDependencies);OneCoreUAP.lib;avrt.lib</AdditionalDependencies>
|
||||
</Link>
|
||||
<DriverSign>
|
||||
<FileDigestAlgorithm>SHA256</FileDigestAlgorithm>
|
||||
<FileDigestAlgorithm>SHA1</FileDigestAlgorithm>
|
||||
</DriverSign>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
@@ -246,6 +254,7 @@
|
||||
<WppScanConfigurationData Condition="'%(ClCompile.ScanConfigurationData)' == ''">trace.h</WppScanConfigurationData>
|
||||
<ExceptionHandling>Async</ExceptionHandling>
|
||||
<EnablePREfast>true</EnablePREfast>
|
||||
<AdditionalOptions>/D_ATL_NO_WIN_SUPPORT /DUMDF_DRIVER /DIDDCX_VERSION_MAJOR=1 /DIDDCX_VERSION_MINOR=10 /DIDDCX_MINIMUM_VERSION_REQUIRED=3 %(AdditionalOptions)</AdditionalOptions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>%(AdditionalDependencies);OneCoreUAP.lib;avrt.lib</AdditionalDependencies>
|
||||
|
||||
@@ -30,6 +30,9 @@
|
||||
<ClInclude Include="Trace.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\..\Downloads\wudfwdm.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="Driver.cpp">
|
||||
|
||||
@@ -1 +1,14 @@
|
||||
# Get 5 virtual monitors for the price of zero!
|
||||
|
||||
# Steps (for experienced pros only!!!)
|
||||
1. Download the latest release as a zip file.
|
||||
|
||||
2. As an administrator, Run the *.bat file to add the driver certificate as a trusted root certificate.
|
||||
|
||||
3. Don't install the inf. Open device manager, click on any device, then click on the "Action" menu and click "Add Legacy Hardware"
|
||||
|
||||
4. Select "Add hardware from a list (Advanced)" and then select Display adapters
|
||||
|
||||
5. Click "Have Disk..." and click the "Browse..." button. Navigate to the extracted files and select the inf file.
|
||||
|
||||
6. You are done! Go to display settings to customize the resolution of the additional displays. These displays show up in Oculus and should be able to be streamed from.
|
||||
@@ -5,6 +5,11 @@ Supports emulating resolutions from **640 x 480** to **7680 x 4320 (8K)**, and r
|
||||
|
||||
This project uses the official Windows Indirect Display Driver combined with the IddCx class extension driver.
|
||||
|
||||
## Download
|
||||
|
||||
- [Windows 10 and 11 (no HDR)](https://github.com/itsmikethetech/Virtual-Display-Driver/releases/tag/23.10.20.2)
|
||||
- [Windows 11 22H2+ (HDR)](https://github.com/itsmikethetech/Virtual-Display-Driver/releases/tag/23.12.2HDR)
|
||||
|
||||
## Installation
|
||||
|
||||
1. Download the latest version from the releases page, and extract the contents to a folder.
|
||||
@@ -16,6 +21,24 @@ This project uses the official Windows Indirect Display Driver combined with the
|
||||
7. You are done! Go to display settings to customize the resolution of the additional displays. These displays show up in Sunshine, your Oculus or VR settings, and should be able to be streamed from.
|
||||
8. You can enable/disable the display adapter to toggle the monitors.
|
||||
|
||||
Ps. Make sure that options.txt is accesible for the system at `C:\IddSampleDriver\option.txt` or the installation will fail.
|
||||
|
||||
## Uninstalling
|
||||
|
||||
1. Open device manager
|
||||
2. Locate Display Adapters
|
||||
3. Right click on IddSampleDriver, choose "Uninstall device"
|
||||
4. There is a new popup window, in there click Attempt to remove driver for this device.
|
||||
|
||||
Next instructions are for those cases where the device is removed from the system, but driver stil remains. This happens when there is a connection to the device while trying to remove the drivers. To
|
||||
remedy this, there is a a few tricks built into windows. So here goes:
|
||||
|
||||
5. Open up a powershell terminal and input this:
|
||||
6. ```pnputil /enum-drivers```
|
||||
6. Locate iddsampledriver.inf, there might be multiple pages of text. Make a note of the "published name", it's often unique for your system, but might look like "oem139.inf"
|
||||
7. ```pnputil /delete-driver oem139.inf```
|
||||
|
||||
## HDR Support Now Available for Windows 11 22H2+
|
||||
|
||||
### Resolutions:
|
||||
|
||||
@@ -96,9 +119,11 @@ This project uses the official Windows Indirect Display Driver combined with the
|
||||
480Hz
|
||||
500Hz
|
||||
|
||||
### Video
|
||||
### Videos
|
||||
|
||||
[](https://youtu.be/byfBWDnToYk "How to install a virtual display")
|
||||
[](https://youtu.be/nNWpbRUPkn4 "How to install a virtual display")
|
||||
|
||||
[Previous Video: How to install a virtual display](https://youtu.be/byfBWDnToYk "How to install a virtual display")
|
||||
|
||||
### Screenshots:
|
||||
|
||||
@@ -138,13 +163,20 @@ This software is provided "AS IS" with NO IMPLICIT OR EXPLICIT warranty. It's wo
|
||||
|
||||
## Acknowledgements
|
||||
|
||||
Shoutout to Roshkins for the original repo:
|
||||
Shoutout to **Roshkins** for the original repo:
|
||||
https://github.com/roshkins/IddSampleDriver
|
||||
|
||||
Microsoft Indirect Display Driver/Sample (Driver code):
|
||||
Shoutout to **Baloukj** for the 8-bit / 10-bit support. (Also, first to push the new Microsoft Driver public!)
|
||||
https://github.com/baloukj/IddSampleDriver
|
||||
|
||||
Shoutout to **Anakngtokwa** for assisting with finding driver sources.
|
||||
|
||||
**Microsoft** Indirect Display Driver/Sample (Driver code):
|
||||
https://github.com/microsoft/Windows-driver-samples/tree/master/video/IndirectDisplay
|
||||
|
||||
Thanks to https://github.com/akatrevorjay/edid-generator for the hi-res EDID.
|
||||
Thanks to **AKATrevorJay** https://github.com/akatrevorjay/edid-generator for the hi-res EDID.
|
||||
|
||||
Shoutout to **zjoasan** and **Bud** for the helper scripts and build support!
|
||||
|
||||
## Star History
|
||||
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.7.34031.279
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VDDInstaller", "VDDInstaller\VDDInstaller.csproj", "{E8075462-A258-4E08-B264-C19E73346A65}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{E8075462-A258-4E08-B264-C19E73346A65}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{E8075462-A258-4E08-B264-C19E73346A65}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{E8075462-A258-4E08-B264-C19E73346A65}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{E8075462-A258-4E08-B264-C19E73346A65}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {343958A1-D703-4337-B5C3-F5F34AD62980}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
-144
@@ -1,144 +0,0 @@
|
||||
namespace VDDInstaller
|
||||
{
|
||||
partial class Form1
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
button1 = new Button();
|
||||
button2 = new Button();
|
||||
label1 = new Label();
|
||||
label2 = new Label();
|
||||
label3 = new Label();
|
||||
comboBox1 = new ComboBox();
|
||||
label4 = new Label();
|
||||
SuspendLayout();
|
||||
//
|
||||
// button1
|
||||
//
|
||||
button1.Location = new Point(149, 91);
|
||||
button1.Name = "button1";
|
||||
button1.Size = new Size(129, 23);
|
||||
button1.TabIndex = 0;
|
||||
button1.Text = "Install Certificate";
|
||||
button1.UseVisualStyleBackColor = true;
|
||||
button1.Click += button1_Click;
|
||||
//
|
||||
// button2
|
||||
//
|
||||
button2.Location = new Point(149, 149);
|
||||
button2.Name = "button2";
|
||||
button2.Size = new Size(129, 23);
|
||||
button2.TabIndex = 1;
|
||||
button2.Text = "Install Driver";
|
||||
button2.UseVisualStyleBackColor = true;
|
||||
button2.Click += button2_Click;
|
||||
//
|
||||
// label1
|
||||
//
|
||||
label1.AutoSize = true;
|
||||
label1.ForeColor = SystemColors.ButtonHighlight;
|
||||
label1.Location = new Point(101, 95);
|
||||
label1.Name = "label1";
|
||||
label1.Size = new Size(42, 15);
|
||||
label1.TabIndex = 2;
|
||||
label1.Text = "Step 1:";
|
||||
label1.TextAlign = ContentAlignment.MiddleRight;
|
||||
//
|
||||
// label2
|
||||
//
|
||||
label2.AutoSize = true;
|
||||
label2.ForeColor = SystemColors.Control;
|
||||
label2.Location = new Point(101, 124);
|
||||
label2.Name = "label2";
|
||||
label2.Size = new Size(42, 15);
|
||||
label2.TabIndex = 3;
|
||||
label2.Text = "Step 2:";
|
||||
label2.TextAlign = ContentAlignment.MiddleRight;
|
||||
//
|
||||
// label3
|
||||
//
|
||||
label3.AutoSize = true;
|
||||
label3.ForeColor = SystemColors.Control;
|
||||
label3.Location = new Point(101, 153);
|
||||
label3.Name = "label3";
|
||||
label3.Size = new Size(42, 15);
|
||||
label3.TabIndex = 5;
|
||||
label3.Text = "Step 3:";
|
||||
label3.TextAlign = ContentAlignment.MiddleRight;
|
||||
//
|
||||
// comboBox1
|
||||
//
|
||||
comboBox1.FlatStyle = FlatStyle.Popup;
|
||||
comboBox1.FormattingEnabled = true;
|
||||
comboBox1.Items.AddRange(new object[] { "1 Virtual Display", "2 Virtual Displays", "3 Virtual Displays", "4 Virtual Displays", "5 Virtual Displays" });
|
||||
comboBox1.Location = new Point(149, 121);
|
||||
comboBox1.Name = "comboBox1";
|
||||
comboBox1.RightToLeft = RightToLeft.No;
|
||||
comboBox1.Size = new Size(129, 23);
|
||||
comboBox1.TabIndex = 6;
|
||||
comboBox1.SelectedIndexChanged += comboBox1_SelectedIndexChanged;
|
||||
//
|
||||
// label4
|
||||
//
|
||||
label4.AutoSize = true;
|
||||
label4.Location = new Point(96, 24);
|
||||
label4.Name = "label4";
|
||||
label4.Size = new Size(38, 15);
|
||||
label4.TabIndex = 7;
|
||||
label4.Text = "label4";
|
||||
label4.Click += label4_Click;
|
||||
//
|
||||
// Form1
|
||||
//
|
||||
AutoScaleDimensions = new SizeF(7F, 15F);
|
||||
AutoScaleMode = AutoScaleMode.Font;
|
||||
BackColor = Color.FromArgb(40, 40, 40);
|
||||
ClientSize = new Size(290, 184);
|
||||
Controls.Add(label4);
|
||||
Controls.Add(comboBox1);
|
||||
Controls.Add(label3);
|
||||
Controls.Add(label2);
|
||||
Controls.Add(label1);
|
||||
Controls.Add(button2);
|
||||
Controls.Add(button1);
|
||||
Name = "Form1";
|
||||
Text = "VDD Assisted Installer";
|
||||
ResumeLayout(false);
|
||||
PerformLayout();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private Button button1;
|
||||
private Button button2;
|
||||
private Label label1;
|
||||
private Label label2;
|
||||
private Label label3;
|
||||
private ComboBox comboBox1;
|
||||
private Label label4;
|
||||
}
|
||||
}
|
||||
@@ -1,64 +0,0 @@
|
||||
using System.Diagnostics;
|
||||
|
||||
namespace VDDInstaller
|
||||
{
|
||||
public partial class Form1 : Form
|
||||
{
|
||||
public Form1()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void button2_Click(object sender, EventArgs e)
|
||||
{
|
||||
var proc = new ProcessStartInfo();
|
||||
proc.UseShellExecute = true;
|
||||
proc.WorkingDirectory = @"C:\Windows\System32";
|
||||
proc.FileName = @"C:\Windows\System32\hdwwiz.exe";
|
||||
proc.Verb = "runas";
|
||||
try
|
||||
{
|
||||
Process.Start(proc);
|
||||
Console.WriteLine("Successfully elevated!");
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
Console.WriteLine("Failed to elevate.");
|
||||
}
|
||||
}
|
||||
|
||||
private void button1_Click(object sender, EventArgs e)
|
||||
{
|
||||
String command = @"C:\IddSampleDriver\installCert.bat";
|
||||
var proc = new ProcessStartInfo();
|
||||
proc.UseShellExecute = true;
|
||||
proc.WorkingDirectory = @"C:\Windows\System32";
|
||||
proc.FileName = @"cmd.exe";
|
||||
proc.Verb = "runas";
|
||||
proc.Arguments = "/c " + command;
|
||||
|
||||
|
||||
try
|
||||
{
|
||||
Process.Start(proc);
|
||||
Console.WriteLine("Successfully elevated!");
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
Console.WriteLine("Failed to elevate.");
|
||||
}
|
||||
}
|
||||
|
||||
private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
label4.Text = comboBox1.Text;
|
||||
|
||||
}
|
||||
|
||||
private void label4_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,120 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
@@ -1,17 +0,0 @@
|
||||
namespace VDDInstaller
|
||||
{
|
||||
internal static class Program
|
||||
{
|
||||
/// <summary>
|
||||
/// The main entry point for the application.
|
||||
/// </summary>
|
||||
[STAThread]
|
||||
static void Main()
|
||||
{
|
||||
// To customize application configuration such as set high DPI settings or default font,
|
||||
// see https://aka.ms/applicationconfiguration.
|
||||
ApplicationConfiguration.Initialize();
|
||||
Application.Run(new Form1());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<TargetFramework>net6.0-windows</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<UseWindowsForms>true</UseWindowsForms>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
</PropertyGroup>
|
||||
|
||||
</Project>
|
||||
@@ -0,0 +1,20 @@
|
||||
# Self-elevate the script if required
|
||||
if (-Not ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] 'Administrator')) {
|
||||
if ([int](Get-CimInstance -Class Win32_OperatingSystem | Select-Object -ExpandProperty BuildNumber) -ge 6000) {
|
||||
$CommandLine = "-File `"" + $MyInvocation.MyCommand.Path + "`" " + $MyInvocation.UnboundArguments
|
||||
Start-Process -FilePath PowerShell.exe -Verb Runas -ArgumentList $CommandLine
|
||||
Exit
|
||||
}
|
||||
}
|
||||
|
||||
$device = get-pnpdevice -class Display -FriendlyName 'IddSampleDriver Device HDR' -ErrorAction SilentlyContinue
|
||||
|
||||
if ($device) {
|
||||
if ($device.Status -eq 'OK') {
|
||||
Write-Host "Disabling device"; $device | disable-pnpdevice -Confirm:$false
|
||||
} else {
|
||||
Write-Host "Enabling device"; $device | enable-pnpdevice -Confirm:$false
|
||||
}
|
||||
} else {
|
||||
Write-Warning "Device not found"
|
||||
}
|
||||
Reference in new issue
Block a user