Fixed test mode detection
Added web link
This commit is contained in:
parent
77cdf3028d
commit
3bc1107b0f
@ -60,9 +60,9 @@
|
||||
<Label Grid.Row="5" Grid.Column="2" Content="{Binding Path=OsUpgradeStatus}"
|
||||
ToolTip="Determines if the system has been in-place upgraded from an older version of Windows." />
|
||||
|
||||
<Label Grid.Row="6" Grid.Column="0">Code Integrity state:</Label>
|
||||
<Label Grid.Row="6" Grid.Column="2" Content="{Binding Path=CodeIntegrityStatus}"
|
||||
ToolTip="Allows loading of test/self-signed drivers if disabled." />
|
||||
<Label Grid.Row="6" Grid.Column="0">Test Signing state:</Label>
|
||||
<Label Grid.Row="6" Grid.Column="2" Content="{Binding Path=TestSigningStatus}"
|
||||
ToolTip="Allows loading of test/self-signed drivers if enabled." />
|
||||
|
||||
</Grid>
|
||||
</TabItem>
|
||||
@ -74,7 +74,20 @@
|
||||
|
||||
<!-- About -->
|
||||
<TabItem Header="About">
|
||||
<Label>Made by Benjamin Höglinger-Stelzer</Label>
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Label Grid.Row="0">Made by Benjamin Höglinger-Stelzer</Label>
|
||||
<DockPanel Grid.Row="1">
|
||||
<Label>Web:</Label>
|
||||
<Label><Hyperlink
|
||||
RequestNavigate="Web_OnRequestNavigate"
|
||||
NavigateUri="https://vigem.org">https://vigem.org</Hyperlink></Label>
|
||||
</DockPanel>
|
||||
</Grid>
|
||||
</TabItem>
|
||||
</TabControl>
|
||||
|
||||
|
@ -1,7 +1,9 @@
|
||||
using System.IO;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
using System.Text;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Navigation;
|
||||
using System.Xaml;
|
||||
using DerpingDrivers.Util;
|
||||
using MahApps.Metro.Controls;
|
||||
@ -56,7 +58,7 @@ namespace DerpingDrivers
|
||||
public string OsUpgradeStatus =>
|
||||
OsUpgradeDetection.IsGrandfathered ? "In-place upgraded" : "Clean installation";
|
||||
|
||||
public string CodeIntegrityStatus => CodeIntegrityHelper.IsSystemCodeIntegrityEnabled ? "Enabled" : "Disabled";
|
||||
public string TestSigningStatus => CodeIntegrityHelper.IsTestSignEnabled ? "Enabled" : "Disabled";
|
||||
|
||||
public string SummaryText =>
|
||||
"Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.";
|
||||
@ -88,6 +90,11 @@ namespace DerpingDrivers
|
||||
.UseSupportedExtensions()
|
||||
.Build();
|
||||
}
|
||||
|
||||
private void Web_OnRequestNavigate(object sender, RequestNavigateEventArgs e)
|
||||
{
|
||||
Process.Start(e.Uri.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
internal class MyXamlSchemaContext : XamlSchemaContext
|
||||
|
@ -20,7 +20,7 @@ namespace DerpingDrivers.Util
|
||||
public UInt32 CodeIntegrityOptions;
|
||||
};
|
||||
|
||||
public static bool IsSystemCodeIntegrityEnabled
|
||||
public static bool IsTestSignEnabled
|
||||
{
|
||||
get
|
||||
{
|
||||
@ -38,7 +38,6 @@ namespace DerpingDrivers.Util
|
||||
integrity.Length = (uint)Marshal.SizeOf<SYSTEM_CODEINTEGRITY_INFORMATION>();
|
||||
integrity.CodeIntegrityOptions = 0;
|
||||
|
||||
|
||||
Marshal.StructureToPtr(integrity, pIntegrity, false);
|
||||
|
||||
var status = ntQuerySystemInformation(
|
||||
@ -50,7 +49,7 @@ namespace DerpingDrivers.Util
|
||||
|
||||
integrity = Marshal.PtrToStructure<SYSTEM_CODEINTEGRITY_INFORMATION>(pIntegrity);
|
||||
|
||||
return (status == 0) && ((integrity.CodeIntegrityOptions & 1) == 1);
|
||||
return ((integrity.CodeIntegrityOptions & /* CODEINTEGRITY_OPTION_TESTSIGN */ 0x02) != 0);
|
||||
}
|
||||
finally
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user