Skip to content

Portable Tool for an Ideal Windows Setup

add new page & upd. images (hu)

Greedeksc77f2ad7cca0
diff --git a/.Source/GTweak/Utilities/Controls/PathLocator.cs b/.Source/GTweak/Utilities/Controls/PathLocator.cs
index 16c9bec5..caa0325c 100644
--- a/.Source/GTweak/Utilities/Controls/PathLocator.cs
+++ b/.Source/GTweak/Utilities/Controls/PathLocator.cs
@@ -292,6 +292,10 @@ namespace GTweak.Utilities.Controls
internal static readonly string OneDrive = FindExecutablePath("onedrivesetup.exe");
+ internal static readonly string DisablingWD = Path.Combine(Folders.DefenderBackup, "DisablingWD.exe");
+
+ internal static readonly string NSudo = Path.Combine(Folders.DefenderBackup, "NSudoLC.exe");
+
internal static (string Normal, string Block) UsoClient =>
(
Path.Combine(Environment.SystemDirectory, "usoclient.exe"),
@@ -308,9 +312,23 @@ namespace GTweak.Utilities.Controls
internal static readonly string MpCmdRun = Path.Combine(Folders.SystemDrive, "Program Files", "Windows Defender", "MpCmdRun.exe");
- internal static readonly string DisablingWD = Path.Combine(Folders.DefenderBackup, "DisablingWD.exe");
- internal static readonly string NSudo = Path.Combine(Folders.DefenderBackup, "NSudoLC.exe");
+
+ internal static class Protections
+ {
+ private static (string Normal, string Block) CreatePath(string dir, string normalName, string blockName) => (Path.Combine(dir, normalName), Path.Combine(dir, blockName));
+
+ internal static (string Normal, string Block) MpCmdRun => CreatePath(Folders.WindowsDefender, "MpCmdRun.exe", "BlockMpCmdRun.exe");
+
+ internal static (string Normal, string Block) SmartScreen => CreatePath(Environment.SystemDirectory, "smartscreen.exe", "BlockSS.exe");
+
+ internal static (string Normal, string Block) DefenderEngine => CreatePath(Folders.WindowsDefender, "MsMpEng.exe", "BlockAntimalware.exe");
+
+ internal static (string Normal, string Block) DefenderCore => CreatePath(Folders.WindowsDefender, "MpDefenderCoreService.exe", "BlockAntimalwareCore.exe");
+
+ internal static (string Normal, string Block) HealthAttestation => CreatePath(Path.Combine(Environment.SystemDirectory, "HealthAttestationClient"), "HealthAttestationClientAgent.exe", "BlockHACA.exe");
+
+ }
}
internal static class Files
diff --git a/.Source/GTweak/Utilities/Tweaks/DefenderManager/WindowsDefender.cs b/.Source/GTweak/Utilities/Tweaks/DefenderManager/WindowsDefender.cs
index eb1bd9e8..182226f5 100644
--- a/.Source/GTweak/Utilities/Tweaks/DefenderManager/WindowsDefender.cs
+++ b/.Source/GTweak/Utilities/Tweaks/DefenderManager/WindowsDefender.cs
@@ -81,7 +81,7 @@ namespace GTweak.Utilities.Tweaks.DefenderManager
Set-MpPreference -MAPSReporting 2
Set-MpPreference -PUAProtection Enabled");
- CommandExecutor.RunCommandAsTrustedInstaller($"{PathLocator.Executable.NSudo} -U:T -P:E -M:S -ShowWindowMode:Hide -Wait cmd /c " +
+ CommandExecutor.RunCommandAsTrustedInstaller($"{PathLocator.Executable.NSudo} -U:T -P:E -CreatePath:S -ShowWindowMode:Hide -Wait cmd /c " +
@"reg delete ""HKLM\SOFTWARE\Policies\Microsoft\Windows Defender\Real-Time Protection"" /v LocalSettingOverrideDisableOnAccessProtection /f & " +
@"reg delete ""HKLM\SOFTWARE\Policies\Microsoft\Windows Defender\Real-Time Protection"" /v LocalSettingOverrideRealtimeScanDirection /f & " +
@"reg delete ""HKLM\SOFTWARE\Policies\Microsoft\Windows Defender\Real-Time Protection"" /v LocalSettingOverrideDisableIOAVProtection /f & " +
@@ -104,7 +104,7 @@ namespace GTweak.Utilities.Tweaks.DefenderManager
@"reg delete ""HKLM\SOFTWARE\Policies\Microsoft\Windows Defender\Real-Time Protection"" /v DisablePrivacyMode /f & " +
@"reg delete ""HKLM\SOFTWARE\Policies\Microsoft\Windows Defender\Real-Time Protection"" /v DisableBlockAtFirstSeen /f");
- CommandExecutor.RunCommandAsTrustedInstaller($"{PathLocator.Executable.NSudo} -U:T -P:E -M:S -ShowWindowMode:Hide -Wait cmd /c " +
+ CommandExecutor.RunCommandAsTrustedInstaller($"{PathLocator.Executable.NSudo} -U:T -P:E -CreatePath:S -ShowWindowMode:Hide -Wait cmd /c " +
@"reg delete ""HKCU\Software\Microsoft\Windows\CurrentVersion\AppHost"" /v EnableWebContentEvaluation /t REG_DWORD /d 0 /f & " +
@"reg delete ""HKLM\SOFTWARE\Policies\Microsoft\MicrosoftEdge\PhishingFilter"" /v EnabledV9 /f & " +
@"reg add ""HKLM\SOFTWARE\Microsoft\Windows Defender"" /v PUAProtection /t REG_DWORD /d 2 /f & " +
@@ -172,7 +172,7 @@ namespace GTweak.Utilities.Tweaks.DefenderManager
RegistryHelp.DeleteValue(Registry.LocalMachine, @"SOFTWARE\Microsoft\Windows defender\Windows defender Exploit Guard\Controlled Folder Access", "EnableControlledFolderAccess");
RegistryHelp.DeleteValue(Registry.LocalMachine, @"SOFTWARE\Microsoft\Windows Defender\Windows Defender Exploit Guard\Network Protection", "EnableNetworkProtection");
- CommandExecutor.RunCommandAsTrustedInstaller($@"{PathLocator.Executable.NSudo}-U:T -P:E -M:S -ShowWindowMode:Hide cmd /c " +
+ CommandExecutor.RunCommandAsTrustedInstaller($@"{PathLocator.Executable.NSudo}-U:T -P:E -CreatePath:S -ShowWindowMode:Hide cmd /c " +
@"reg delete HKLM\SYSTEM\CurrentControlSet\Services\WinDefend /v AutorunsDisabled /f & " +
@"reg add HKLM\SYSTEM\CurrentControlSet\Services\wscsvc /v DelayedAutoStart /t REG_DWORD /d 1 /f & " +
@"reg add ""HKLM\SYSTEM\CurrentControlSet\Services\WdFilter\Instances\WdFilter Instance"" /v Altitude /t REG_SZ /d 328010 /f & " +
@@ -192,14 +192,14 @@ namespace GTweak.Utilities.Tweaks.DefenderManager
ManageExclusions(false);
SetTaskState(true, winDefenderTasks);
- CommandExecutor.RunCommandAsTrustedInstaller($@"""{PathLocator.Executable.NSudo}"" -U:T -P:E -M:S -ShowWindowMode:Hide -Wait cmd /c {CommandExecutor.CleanCommand(string.Join(" & ", services.Select(kv => $@"reg add ""HKLM\SYSTEM\CurrentControlSet\Services\{kv.Key}"" /v Start /t REG_DWORD /d {kv.Value} /f")))}""");
+ CommandExecutor.RunCommandAsTrustedInstaller($@"""{PathLocator.Executable.NSudo}"" -U:T -P:E -CreatePath:S -ShowWindowMode:Hide -Wait cmd /c {CommandExecutor.CleanCommand(string.Join(" & ", services.Select(kv => $@"reg add ""HKLM\SYSTEM\CurrentControlSet\Services\{kv.Key}"" /v Start /t REG_DWORD /d {kv.Value} /f")))}""");
foreach (var (path, normal, block) in fileMappings)
{
string sourcePath = Path.Combine(path, block);
string targetPath = Path.Combine(path, normal);
- CommandExecutor.RunCommandAsTrustedInstaller($@"""{PathLocator.Executable.NSudo}"" -U:T -P:E -M:S -ShowWindowMode:Hide -Wait cmd /c ""{CommandExecutor.CleanCommand(string.Join(" && ", new[] {
+ CommandExecutor.RunCommandAsTrustedInstaller($@"""{PathLocator.Executable.NSudo}"" -U:T -P:E -CreatePath:S -ShowWindowMode:Hide -Wait cmd /c ""{CommandExecutor.CleanCommand(string.Join(" && ", new[] {
$@"takeown /f ""{sourcePath}"" /a",
$@"rename ""{sourcePath}"" ""{normal}""",
$@"icacls ""{targetPath}"" /setowner *S-1-5-80-956008885-3418522649-1831038044-1853292631-2271478464",
@@ -227,12 +227,12 @@ namespace GTweak.Utilities.Tweaks.DefenderManager
foreach (var (path, normal, block) in fileMappings)
{
- CommandExecutor.RunCommandAsTrustedInstaller($@"""{PathLocator.Executable.NSudo}"" -U:T -P:E -M:S -ShowWindowMode:Hide -Wait cmd /c ""rename ""{Path.Combine(path, normal)}"" ""{block}""""");
+ CommandExecutor.RunCommandAsTrustedInstaller($@"""{PathLocator.Executable.NSudo}"" -U:T -P:E -CreatePath:S -ShowWindowMode:Hide -Wait cmd /c ""rename ""{Path.Combine(path, normal)}"" ""{block}""""");
}
- CommandExecutor.RunCommandAsTrustedInstaller($@"""{PathLocator.Executable.NSudo}"" -U:T -P:E -M:S -ShowWindowMode:Hide -Wait cmd /c {CommandExecutor.CleanCommand(string.Join(" & ", services.Select(kv => $@"reg add ""HKLM\SYSTEM\CurrentControlSet\Services\{kv.Key}"" /v Start /t REG_DWORD /d 4 /f")))}""");
+ CommandExecutor.RunCommandAsTrustedInstaller($@"""{PathLocator.Executable.NSudo}"" -U:T -P:E -CreatePath:S -ShowWindowMode:Hide -Wait cmd /c {CommandExecutor.CleanCommand(string.Join(" & ", services.Select(kv => $@"reg add ""HKLM\SYSTEM\CurrentControlSet\Services\{kv.Key}"" /v Start /t REG_DWORD /d 4 /f")))}""");
- CommandExecutor.RunCommandAsTrustedInstaller($@"""{PathLocator.Executable.NSudo}"" -U:T -P:E -M:S -ShowWindowMode:Hide -Wait cmd /c " +
+ CommandExecutor.RunCommandAsTrustedInstaller($@"""{PathLocator.Executable.NSudo}"" -U:T -P:E -CreatePath:S -ShowWindowMode:Hide -Wait cmd /c " +
$"for /d %D in (\"{Path.Combine(PathLocator.Folders.SystemDrive, @"ProgramData\\Microsoft\\Windows Defender\\Platform\\*")}\") do if exist \"%D\\MsMpEng.exe\" ren \"%D\\MsMpEng.exe\" BlockAntimalware.exe & " +
$"for /d %D in (\"{Path.Combine(PathLocator.Folders.SystemDrive, @"ProgramData\\Microsoft\\Windows Defender\\Platform\\*")}\") do if exist \"%D\\MpDefenderCoreService.exe\" ren \"%D\\MpDefenderCoreService.exe\" BlockAntimalwareCore.exe & " +
@"reg add HKLM\SYSTEM\CurrentControlSet\Services\WinDefend /v AutorunsDisabled /t REG_DWORD /d 3 /f & " +
@@ -266,7 +266,7 @@ namespace GTweak.Utilities.Tweaks.DefenderManager
Set-MpPreference -MAPSReporting 0
Set-MpPreference -PUAProtection Disabled");
- CommandExecutor.RunCommandAsTrustedInstaller($@"""{PathLocator.Executable.NSudo}"" -U:T -P:E -M:S -ShowWindowMode:Hide -Wait cmd /c " +
+ CommandExecutor.RunCommandAsTrustedInstaller($@"""{PathLocator.Executable.NSudo}"" -U:T -P:E -CreatePath:S -ShowWindowMode:Hide -Wait cmd /c " +
@"reg add ""HKLM\SOFTWARE\Policies\Microsoft\Windows Defender\Real-Time Protection"" /v LocalSettingOverrideDisableOnAccessProtection /t REG_DWORD /d 0 /f & " +
@"reg add ""HKLM\SOFTWARE\Policies\Microsoft\Windows Defender\Real-Time Protection"" /v LocalSettingOverrideRealtimeScanDirection /t REG_DWORD /d 0 /f & " +
@"reg add ""HKLM\SOFTWARE\Policies\Microsoft\Windows Defender\Real-Time Protection"" /v LocalSettingOverrideDisableIOAVProtection /t REG_DWORD /d 0 /f & " +
@@ -328,7 +328,7 @@ namespace GTweak.Utilities.Tweaks.DefenderManager
RegistryHelp.Write(Registry.LocalMachine, @"SOFTWARE\Policies\Microsoft\Microsoft Antimalware\SpyNet", "SpyNetReporting", 0, RegistryValueKind.DWord);
RegistryHelp.Write(Registry.LocalMachine, @"SOFTWARE\Policies\Microsoft\Microsoft Antimalware\SpyNet", "LocalSettingOverrideSpyNetReporting", 0, RegistryValueKind.DWord);
- CommandExecutor.RunCommandAsTrustedInstaller($@"""{PathLocator.Executable.NSudo}"" -U:T -P:E -M:S -ShowWindowMode:Hide -Wait cmd /c " +
+ CommandExecutor.RunCommandAsTrustedInstaller($@"""{PathLocator.Executable.NSudo}"" -U:T -P:E -CreatePath:S -ShowWindowMode:Hide -Wait cmd /c " +
@"reg add ""HKLM\Software\Policies\Microsoft\Windows Defender\SpyNet"" /v DisableBlockAtFirstSeen /t REG_DWORD /d 1 /f & " +
@"reg add ""HKLM\Software\Policies\Microsoft\Windows Defender\SpyNet"" /v SpynetReporting /t REG_DWORD /d 0 /f & " +
@"reg add ""HKLM\Software\Policies\Microsoft\Windows Defender\SpyNet"" /v SubmitSamplesConsent /t REG_DWORD /d 2 /f & " +
@@ -398,7 +398,7 @@ namespace GTweak.Utilities.Tweaks.DefenderManager
RegistryHelp.DeleteValue(Registry.CurrentUser, @"SOFTWARE\Microsoft\Windows\CurrentVersion\Run", "Windows Defender");
RegistryHelp.DeleteValue(Registry.LocalMachine, @"SOFTWARE\Microsoft\Windows\CurrentVersion\Run", "SecurityHealth");
- CommandExecutor.RunCommandAsTrustedInstaller($@"""{PathLocator.Executable.NSudo}"" -U:T -P:E -M:S -ShowWindowMode:Hide -Wait cmd /c " +
+ CommandExecutor.RunCommandAsTrustedInstaller($@"""{PathLocator.Executable.NSudo}"" -U:T -P:E -CreatePath:S -ShowWindowMode:Hide -Wait cmd /c " +
@"reg add ""HKCU\Software\Microsoft\Windows\CurrentVersion\AppHost"" /v EnableWebContentEvaluation /t REG_DWORD /d 0 /f & " +
@"reg add ""HKLM\SOFTWARE\Policies\Microsoft\MicrosoftEdge\PhishingFilter"" /v EnabledV9 /t REG_DWORD /d 0 /f & " +
@"reg add ""HKLM\SOFTWARE\Microsoft\Windows Defender"" /v PUAProtection /t REG_DWORD /d 0 /f & " +
@@ -433,7 +433,7 @@ namespace GTweak.Utilities.Tweaks.DefenderManager
foreach (var filePath in Directory.EnumerateFiles(directory, "*", SearchOption.TopDirectoryOnly))
{
- CommandExecutor.RunCommandAsTrustedInstaller($@"{PathLocator.Executable.NSudo} -U:T -P:E -M:S -ShowWindowMode:Hide -Wait cmd /c ""takeown /f \""{filePath}\"" /r /d y && icacls \""{filePath}\"" /inheritance:r /remove *S-1-5-32-544 *S-1-5-11 *S-1-5-32-545 *S-1-5-18 && icacls \""{filePath}\"" /grant {Environment.UserName}:F /t && del /q \""{filePath}\""""");
+ CommandExecutor.RunCommandAsTrustedInstaller($@"{PathLocator.Executable.NSudo} -U:T -P:E -CreatePath:S -ShowWindowMode:Hide -Wait cmd /c ""takeown /f \""{filePath}\"" /r /d y && icacls \""{filePath}\"" /inheritance:r /remove *S-1-5-32-544 *S-1-5-11 *S-1-5-32-545 *S-1-5-18 && icacls \""{filePath}\"" /grant {Environment.UserName}:F /t && del /q \""{filePath}\""""");
for (int i = 0; Directory.Exists(filePath) && i < 10; i++)
{
@@ -441,7 +441,7 @@ namespace GTweak.Utilities.Tweaks.DefenderManager
catch (Exception ex) { ErrorLogging.LogDebug(ex); }
TakingOwnership.GrantAdministratorsAccess(filePath, TakingOwnership.SE_OBJECT_TYPE.SE_FILE_OBJECT);
- CommandExecutor.RunCommandAsTrustedInstaller($@"{PathLocator.Executable.NSudo} -U:T -P:E -M:S -ShowWindowMode:Hide -Wait cmd /c ""del /q ""{filePath}""""");
+ CommandExecutor.RunCommandAsTrustedInstaller($@"{PathLocator.Executable.NSudo} -U:T -P:E -CreatePath:S -ShowWindowMode:Hide -Wait cmd /c ""del /q ""{filePath}""""");
Thread.Sleep(500);
}
@@ -486,7 +486,7 @@ namespace GTweak.Utilities.Tweaks.DefenderManager
string[] processes = { "smartscreen", "mpdefendercoreservice", "msmpeng", "securityhealthservice", "securityhealthsystray", "securityhealthui", "wuauserv", "searchui", "sechealthui", "configsecuritypolicy", "runtimebroker", "msedge", "ssoncom", "usocoreworker", "defenderbootstrapper", "sensedlpprocessor", "sensetracer",
"dlpuseragent", "lsass", "mpam-d", "mpam-fe", "mpam-fe_bd", "mpas-d", "mpas-fe", "mpas-fe_bd", "mpav-d", "mpav-fe", "mpav-fe_bd", "mpcmdrun", "mpcopyaccelerator", "mpdlpcmd", "mpdlpservice", "mpextms", "mpsigstub", "mrt", "msmpengcp", "mssense", "nissrv", "offlinescannershell", "securekernel", "usocoreworker", "securityhealthhost",
"senseap", "senseaptoast", "sensecm", "sensegpparser", "senseidentity", "senseimdscollector", "senseir", "sensendr", "sensesampleuploader", "sensetvm", "sgrmbroker", "healthattestationclientagent", "wdnissvc", "wdboot", "msseccore", "mssecflt", "mssecwfp", "mdcoresvc", "sensece", "senseui", "sensepp", "wdshield", "mipdlp" };
- CommandExecutor.RunCommandAsTrustedInstaller($@"""{PathLocator.Executable.NSudo}"" -U:T -P:E -M:S -ShowWindowMode:Hide -Wait cmd /c taskkill /f " + string.Join(" ", processes.Select(p => $"/im {p}.exe")));
+ CommandExecutor.RunCommandAsTrustedInstaller($@"""{PathLocator.Executable.NSudo}"" -U:T -P:E -CreatePath:S -ShowWindowMode:Hide -Wait cmd /c taskkill /f " + string.Join(" ", processes.Select(p => $"/im {p}.exe")));
}
private static void InvokePowerShell(string command)
diff --git a/.github/screenshots/hu/Addons.png b/.github/screenshots/hu/Addons.png
index c1ad1c3b..f3b514a2 100644
Binary files a/.github/screenshots/hu/Addons.png and b/.github/screenshots/hu/Addons.png differ
diff --git a/.github/screenshots/hu/Applications.png b/.github/screenshots/hu/Applications.png
index 2580a8db..23ccb2d6 100644
Binary files a/.github/screenshots/hu/Applications.png and b/.github/screenshots/hu/Applications.png differ
diff --git a/.github/screenshots/hu/Confidentiality.png b/.github/screenshots/hu/Confidentiality.png
index 4d50db2e..3b762da5 100644
Binary files a/.github/screenshots/hu/Confidentiality.png and b/.github/screenshots/hu/Confidentiality.png differ
diff --git a/.github/screenshots/hu/Interface.png b/.github/screenshots/hu/Interface.png
index d69c839b..f41ef78d 100644
Binary files a/.github/screenshots/hu/Interface.png and b/.github/screenshots/hu/Interface.png differ
diff --git a/.github/screenshots/hu/Services.png b/.github/screenshots/hu/Services.png
index 16cf6ac8..d6b3106b 100644
Binary files a/.github/screenshots/hu/Services.png and b/.github/screenshots/hu/Services.png differ
diff --git a/.github/screenshots/hu/System.png b/.github/screenshots/hu/System.png
index 85ce145e..db0c45b8 100644
Binary files a/.github/screenshots/hu/System.png and b/.github/screenshots/hu/System.png differ
diff --git a/.github/screenshots/hu/Toolset.png b/.github/screenshots/hu/Toolset.png
new file mode 100644
index 00000000..a7cfb115
Binary files /dev/null and b/.github/screenshots/hu/Toolset.png differ
diff --git a/.github/screenshots/hu/Utils.png b/.github/screenshots/hu/Utils.png
index 88ed1481..bb302d61 100644
Binary files a/.github/screenshots/hu/Utils.png and b/.github/screenshots/hu/Utils.png differ
diff --git a/README-hu.md b/README-hu.md
index 6d6430c9..ba73d1c4 100644
--- a/README-hu.md
+++ b/README-hu.md
@@ -88,6 +88,10 @@
<summary> Bővítmények </summary>
<img src="https://github.com/Greedeks/GTweak/blob/main/.github/screenshots/hu/Addons.png"/>
</details>
+<details>
+ <summary> Eszközkészlet </summary>
+ <img src="https://github.com/Greedeks/GTweak/blob/main/.github/screenshots/hu/Toolset.png"/>
+</details>
<h2> Rendszerkövetelmények</h2>