summaryrefslogtreecommitdiff
path: root/LibTSforge/Modifiers/TamperedFlagsDelete.cs
diff options
context:
space:
mode:
Diffstat (limited to 'LibTSforge/Modifiers/TamperedFlagsDelete.cs')
-rw-r--r--LibTSforge/Modifiers/TamperedFlagsDelete.cs25
1 files changed, 14 insertions, 11 deletions
diff --git a/LibTSforge/Modifiers/TamperedFlagsDelete.cs b/LibTSforge/Modifiers/TamperedFlagsDelete.cs
index 8ffb370..a9edc55 100644
--- a/LibTSforge/Modifiers/TamperedFlagsDelete.cs
+++ b/LibTSforge/Modifiers/TamperedFlagsDelete.cs
@@ -1,34 +1,37 @@
namespace LibTSforge.Modifiers
{
- using System;
using System.Linq;
- using LibTSforge.PhysicalStore;
+ using PhysicalStore;
+ using SPP;
public static class TamperedFlagsDelete
{
public static void DeleteTamperFlags(PSVersion version, bool production)
{
- Utils.KillSPP();
+ SPPUtils.KillSPP(version);
Logger.WriteLine("Writing TrustedStore data...");
- using (IPhysicalStore store = Utils.GetStore(version, production))
+ using (IPhysicalStore store = SPPUtils.GetStore(version, production))
{
- if (version != PSVersion.Win7)
+ if (version == PSVersion.Vista)
{
- string recreatedFlag = "__##USERSEP-RESERVED##__$$RECREATED-FLAG$$";
- string recoveredFlag = "__##USERSEP-RESERVED##__$$RECOVERED-FLAG$$";
-
- DeleteFlag(store, recreatedFlag);
- DeleteFlag(store, recoveredFlag);
+ DeleteFlag(store, "6BE8425B-E3CF-4e86-A6AF-5863E3DCB606");
}
- else
+ else if (version == PSVersion.Win7)
{
SetFlag(store, 0xA0001);
}
+ else
+ {
+ DeleteFlag(store, "__##USERSEP-RESERVED##__$$RECREATED-FLAG$$");
+ DeleteFlag(store, "__##USERSEP-RESERVED##__$$RECOVERED-FLAG$$");
+ }
Logger.WriteLine("Successfully cleared the tamper state.");
}
+
+ SPPUtils.RestartSPP(version);
}
private static void DeleteFlag(IPhysicalStore store, string flag)