Compare commits

...

2 Commits

Author SHA1 Message Date
theitaliandeveloper
09b00a5f85 Stuff 2025-10-29 13:37:05 +01:00
theitaliandeveloper
3601baea19 bruh 2025-10-29 13:11:13 +01:00
11 changed files with 190 additions and 29 deletions

View File

@@ -21,6 +21,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Perfect11.Inbox.Widgets", "
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Perfect11.Inbox.UninstallEdge", "tweaks\Perfect11.Inbox.UninstallEdge\Perfect11.Inbox.UninstallEdge.csproj", "{A33DF785-C123-48E2-B21E-A229FC8FFB55}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Perfect11.Inbox.UninstallEdge", "tweaks\Perfect11.Inbox.UninstallEdge\Perfect11.Inbox.UninstallEdge.csproj", "{A33DF785-C123-48E2-B21E-A229FC8FFB55}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Perfect11.Inbox.DisableVBS", "tweaks\Perfect11.Inbox.DisableVBS\Perfect11.Inbox.DisableVBS.csproj", "{998241DA-25C9-4CB6-B893-7158A387C030}"
EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU Debug|Any CPU = Debug|Any CPU
@@ -63,6 +65,10 @@ Global
{A33DF785-C123-48E2-B21E-A229FC8FFB55}.Debug|Any CPU.Build.0 = Debug|Any CPU {A33DF785-C123-48E2-B21E-A229FC8FFB55}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A33DF785-C123-48E2-B21E-A229FC8FFB55}.Release|Any CPU.ActiveCfg = Release|Any CPU {A33DF785-C123-48E2-B21E-A229FC8FFB55}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A33DF785-C123-48E2-B21E-A229FC8FFB55}.Release|Any CPU.Build.0 = Release|Any CPU {A33DF785-C123-48E2-B21E-A229FC8FFB55}.Release|Any CPU.Build.0 = Release|Any CPU
{998241DA-25C9-4CB6-B893-7158A387C030}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{998241DA-25C9-4CB6-B893-7158A387C030}.Debug|Any CPU.Build.0 = Debug|Any CPU
{998241DA-25C9-4CB6-B893-7158A387C030}.Release|Any CPU.ActiveCfg = Release|Any CPU
{998241DA-25C9-4CB6-B893-7158A387C030}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE

View File

@@ -4,7 +4,7 @@ namespace Perfect11.Library
{ {
public class PowerShell public class PowerShell
{ {
public string Execute(string command) public static string Execute(string command)
{ {
ProcessStartInfo psi = new ProcessStartInfo ProcessStartInfo psi = new ProcessStartInfo
{ {

View File

@@ -20,14 +20,14 @@ namespace Perfect11.Library
} }
public class Utilities public class Utilities
{ {
public bool IsWindows11() public static bool IsWindows11()
{ {
string buildNumber = (string)Registry.GetValue( string buildNumber = (string)Registry.GetValue(
@"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion", @"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion",
"CurrentBuildNumber", null); "CurrentBuildNumber", null);
return int.TryParse(buildNumber, out int build) && build >= 22000; return int.TryParse(buildNumber, out int build) && build >= 22000;
} }
public Dictionary<string, List<IPlugin>> LoadTweaks(string path) public static Dictionary<string, List<IPlugin>> LoadTweaks(string path)
{ {
var categorizedPlugins = new Dictionary<string, List<IPlugin>>(StringComparer.OrdinalIgnoreCase); var categorizedPlugins = new Dictionary<string, List<IPlugin>>(StringComparer.OrdinalIgnoreCase);
@@ -58,37 +58,30 @@ namespace Perfect11.Library
return categorizedPlugins; return categorizedPlugins;
} }
public bool IsAppsDarkMode() public static bool IsAppsDarkMode()
{ {
RegistryKey rk = Registry.CurrentUser.OpenSubKey("Software\\Microsoft\\Windows\\CurrentVersion\\Themes\\Personalize"); RegistryKey rk = Registry.CurrentUser.OpenSubKey("Software\\Microsoft\\Windows\\CurrentVersion\\Themes\\Personalize");
int value = (int)rk.GetValue("AppsUseLightTheme"); int value = (int)rk.GetValue("AppsUseLightTheme");
rk.Close(); rk.Close();
return value == 0; return value == 0;
} }
public string EolApp(string app) public static string EolApp(string app)
{ {
try try
{ {
// Use your PowerShell.Execute helper
string packageFullName = PowerShell.Execute( string packageFullName = PowerShell.Execute(
"Get-AppxPackage -AllUsers | Where-Object { $_.PackageFullName -like '*" + app +"*' } | Select-Object -ExpandProperty PackageFullName" "Get-AppxPackage -AllUsers | Where-Object { $_.PackageFullName -like '*" + app +"*' } | Select-Object -ExpandProperty PackageFullName"
); );
if (string.IsNullOrWhiteSpace(packageFullName)) if (string.IsNullOrWhiteSpace(packageFullName))
{ {
return "Sticky Notes package not found."; return "Sticky Notes package not found.";
} }
Console.WriteLine($"Found package: {packageFullName}"); Console.WriteLine($"Found package: {packageFullName}");
// Get current user SID
string userSid = WindowsIdentity.GetCurrent().User?.Value; string userSid = WindowsIdentity.GetCurrent().User?.Value;
if (string.IsNullOrEmpty(userSid)) if (string.IsNullOrEmpty(userSid))
{ {
return "Unable to get current user SID."; return "Unable to get current user SID.";
} }
// Registry base path
string basePath = @"SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore"; string basePath = @"SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore";
string[] subKeys = string[] subKeys =
{ {
@@ -96,7 +89,6 @@ namespace Perfect11.Library
$@"EndOfLife\S-1-5-18\{packageFullName}", $@"EndOfLife\S-1-5-18\{packageFullName}",
$@"Deprovisioned\{packageFullName}" $@"Deprovisioned\{packageFullName}"
}; };
foreach (var subKey in subKeys) foreach (var subKey in subKeys)
{ {
try try
@@ -115,12 +107,12 @@ namespace Perfect11.Library
return $"Error: {ex.Message}"; return $"Error: {ex.Message}";
} }
} }
public string GetLanguageCode() public static string GetLanguageCode()
{ {
string languageCode = CultureInfo.CurrentUICulture.Name; string languageCode = CultureInfo.CurrentUICulture.Name;
return languageCode.ToLower(); return languageCode.ToLower();
} }
public List<AppInfo> LoadApps(string resourceName) public static List<AppInfo> LoadApps(string resourceName)
{ {
var assembly = Assembly.GetExecutingAssembly(); var assembly = Assembly.GetExecutingAssembly();
@@ -148,7 +140,7 @@ namespace Perfect11.Library
} }
} }
} }
public string GetSystemArchitecture() public static string GetSystemArchitecture()
{ {
string arch = Environment.GetEnvironmentVariable("PROCESSOR_ARCHITECTURE"); string arch = Environment.GetEnvironmentVariable("PROCESSOR_ARCHITECTURE");
string archWow64 = Environment.GetEnvironmentVariable("PROCESSOR_ARCHITEW6432"); string archWow64 = Environment.GetEnvironmentVariable("PROCESSOR_ARCHITEW6432");

View File

@@ -58,7 +58,8 @@
<ApplicationIcon>Simpleicons-Team-Simple-Windows-11.ico</ApplicationIcon> <ApplicationIcon>Simpleicons-Team-Simple-Windows-11.ico</ApplicationIcon>
</PropertyGroup> </PropertyGroup>
<PropertyGroup> <PropertyGroup>
<StartupObject /> <StartupObject>
</StartupObject>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="Microsoft.VisualBasic" /> <Reference Include="Microsoft.VisualBasic" />

View File

@@ -10,7 +10,7 @@ namespace Perfect11
/// The main entry point for the application. /// The main entry point for the application.
/// </summary> /// </summary>
[STAThread] [STAThread]
void Main() static void Main()
{ {
Application.EnableVisualStyles(); Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false); Application.SetCompatibleTextRenderingDefault(false);

View File

@@ -24,9 +24,9 @@ namespace Perfect11.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources { internal class Resources {
private global::System.Resources.ResourceManager resourceMan; private static global::System.Resources.ResourceManager resourceMan;
private global::System.Globalization.CultureInfo resourceCulture; private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources() { internal Resources() {
@@ -36,7 +36,7 @@ namespace Perfect11.Properties {
/// Returns the cached ResourceManager instance used by this class. /// Returns the cached ResourceManager instance used by this class.
/// </summary> /// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal global::System.Resources.ResourceManager ResourceManager { internal static global::System.Resources.ResourceManager ResourceManager {
get { get {
if (object.ReferenceEquals(resourceMan, null)) { if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Perfect11.Properties.Resources", typeof(Resources).Assembly); global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Perfect11.Properties.Resources", typeof(Resources).Assembly);
@@ -51,7 +51,7 @@ namespace Perfect11.Properties {
/// resource lookups using this strongly typed resource class. /// resource lookups using this strongly typed resource class.
/// </summary> /// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal global::System.Globalization.CultureInfo Culture { internal static global::System.Globalization.CultureInfo Culture {
get { get {
return resourceCulture; return resourceCulture;
} }
@@ -66,7 +66,7 @@ namespace Perfect11.Properties {
///[VL] ///[VL]
///0. ///0.
/// </summary> /// </summary>
internal string EI_CFG { internal static string EI_CFG {
get { get {
return ResourceManager.GetString("EI_CFG", resourceCulture); return ResourceManager.GetString("EI_CFG", resourceCulture);
} }
@@ -81,7 +81,7 @@ namespace Perfect11.Properties {
/// &lt;HideEULAPage&gt;true&lt;/HideEULAPage&gt; /// &lt;HideEULAPage&gt;true&lt;/HideEULAPage&gt;
/// &lt;HideOEMRegistrat [rest of string was truncated]&quot;;. /// &lt;HideOEMRegistrat [rest of string was truncated]&quot;;.
/// </summary> /// </summary>
internal string unattend_OOBEAutomate { internal static string unattend_OOBEAutomate {
get { get {
return ResourceManager.GetString("unattend_OOBEAutomate", resourceCulture); return ResourceManager.GetString("unattend_OOBEAutomate", resourceCulture);
} }
@@ -108,7 +108,7 @@ namespace Perfect11.Properties {
///Microsoft.Services.Store.Engagement ///Microsoft.Services.Store.Engagement
///Microsoft.V [rest of string was truncated]&quot;;. ///Microsoft.V [rest of string was truncated]&quot;;.
/// </summary> /// </summary>
internal string UWPSystemAppList { internal static string UWPSystemAppList {
get { get {
return ResourceManager.GetString("UWPSystemAppList", resourceCulture); return ResourceManager.GetString("UWPSystemAppList", resourceCulture);
} }
@@ -117,7 +117,7 @@ namespace Perfect11.Properties {
/// <summary> /// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap. /// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary> /// </summary>
internal System.Drawing.Bitmap win11logo { internal static System.Drawing.Bitmap win11logo {
get { get {
object obj = ResourceManager.GetObject("win11logo", resourceCulture); object obj = ResourceManager.GetObject("win11logo", resourceCulture);
return ((System.Drawing.Bitmap)(obj)); return ((System.Drawing.Bitmap)(obj));
@@ -127,7 +127,7 @@ namespace Perfect11.Properties {
/// <summary> /// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap. /// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary> /// </summary>
internal System.Drawing.Bitmap win11wallpaperdark { internal static System.Drawing.Bitmap win11wallpaperdark {
get { get {
object obj = ResourceManager.GetObject("win11wallpaperdark", resourceCulture); object obj = ResourceManager.GetObject("win11wallpaperdark", resourceCulture);
return ((System.Drawing.Bitmap)(obj)); return ((System.Drawing.Bitmap)(obj));
@@ -137,7 +137,7 @@ namespace Perfect11.Properties {
/// <summary> /// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap. /// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary> /// </summary>
internal System.Drawing.Bitmap win11wallpaperlight { internal static System.Drawing.Bitmap win11wallpaperlight {
get { get {
object obj = ResourceManager.GetObject("win11wallpaperlight", resourceCulture); object obj = ResourceManager.GetObject("win11wallpaperlight", resourceCulture);
return ((System.Drawing.Bitmap)(obj)); return ((System.Drawing.Bitmap)(obj));

View File

@@ -120,12 +120,15 @@
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /> <assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="EI_CFG" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="EI_CFG" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\EI.CFG.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value> <value>..\Resources\EI.CFG.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
<comment>EI.CFG for Windows</comment>
</data> </data>
<data name="unattend_OOBEAutomate" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="unattend_OOBEAutomate" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\unattend-OOBEAutomate.xml;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value> <value>..\Resources\unattend-OOBEAutomate.xml;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
<comment>Unattend.xml for OOBE automation</comment>
</data> </data>
<data name="UWPSystemAppList" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="UWPSystemAppList" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\UWPSystemAppList.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8</value> <value>..\Resources\UWPSystemAppList.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8</value>
<comment>List of UWP System Apps</comment>
</data> </data>
<data name="win11logo" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="win11logo" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Images\win11logo.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> <value>..\Resources\Images\win11logo.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>

View File

@@ -0,0 +1,55 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{998241DA-25C9-4CB6-B893-7158A387C030}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Perfect11.Inbox.DisableVBS</RootNamespace>
<AssemblyName>Perfect11.Inbox.DisableVBS</AssemblyName>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>none</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Tweak.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\Perfect11.TweaksInterface\Perfect11.TweaksInterface.csproj">
<Project>{b3f8761a-b4b2-4378-9fe8-06bbfc39fce6}</Project>
<Name>Perfect11.TweaksInterface</Name>
<Private>False</Private>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

View File

@@ -0,0 +1,33 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Perfect11 Inbox Tweaks")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Vichingo455")]
[assembly: AssemblyProduct("Perfect11")]
[assembly: AssemblyCopyright("Copyright © 2025 Vichingo455")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("998241da-25c9-4cb6-b893-7158a387c030")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

View File

@@ -0,0 +1,70 @@
using Microsoft.Win32;
using Perfect11.TweaksInterface;
using System;
using System.Diagnostics;
using System.IO;
namespace Perfect11.Inbox.DisableVBS
{
public class Tweak : IPlugin
{
public string Name => "Disable VBS";
public string Description => "Disables Virtualization Based Security and Credential Guard (requires additional steps)";
public string Category => "Annoyances";
public string Execute()
{
void RunCommand(string command)
{
var psi = new ProcessStartInfo("cmd.exe", "/c " + command)
{
RedirectStandardOutput = true,
RedirectStandardError = true,
UseShellExecute = false,
CreateNoWindow = true,
//Verb = "runas"
};
using (var process = Process.Start(psi))
{
process.WaitForExit();
if (process.ExitCode != 0)
{
throw new InvalidOperationException($"Comando fallito: {command}");
}
}
}
try
{
Registry.SetValue(
@"HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa",
"LsaCfgFlags",
0,
RegistryValueKind.DWord
);
Registry.SetValue(
@"HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\DeviceGuard",
"LsaCfgFlags",
0,
RegistryValueKind.DWord
);
RunCommand("mountvol X: /s");
string windowsDir = Environment.GetFolderPath(Environment.SpecialFolder.Windows);
string source = Path.Combine(windowsDir, @"System32\SecConfig.efi");
string dest = @"X:\EFI\Microsoft\Boot\SecConfig.efi";
Directory.CreateDirectory(Path.GetDirectoryName(dest));
File.Copy(source, dest, true);
RunCommand(@"bcdedit /create {0cb3b571-2f2e-4343-a879-d86a476d7215} /d ""DebugTool"" /application osloader");
RunCommand(@"bcdedit /set {0cb3b571-2f2e-4343-a879-d86a476d7215} path ""\EFI\Microsoft\Boot\SecConfig.efi""");
RunCommand(@"bcdedit /set {bootmgr} bootsequence {0cb3b571-2f2e-4343-a879-d86a476d7215}");
RunCommand(@"bcdedit /set {0cb3b571-2f2e-4343-a879-d86a476d7215} loadoptions DISABLE-LSA-ISO,DISABLE-VBS");
RunCommand(@"bcdedit /set {0cb3b571-2f2e-4343-a879-d86a476d7215} device partition=X:");
RunCommand("mountvol X: /d");
return "Disabling Credential Guard is almost done!\r\nNow, restart your system and when asked, press F3 or the Windows key to disable both credential guard and virtualization based security.\r\nAfter reboot, you might need to set up your PIN again.";
}
catch (Exception ex)
{
throw new Exception("Error: " + ex.Message);
}
}
}
}

View File

@@ -1,4 +1,5 @@
using Perfect11.TweaksInterface; using Perfect11.TweaksInterface;
using System;
using System.Diagnostics; using System.Diagnostics;
using System.Windows.Forms; using System.Windows.Forms;
@@ -37,7 +38,7 @@ namespace Perfect11.Inbox.RemoveWindowsAI
} }
else else
{ {
return "Operation aborted by user."; throw new Exception("Operation aborted by user.");
} }
} }
} }