summaryrefslogtreecommitdiff
path: root/LibTSforge/Modifiers/RearmReset.cs
diff options
context:
space:
mode:
authorWitherOrNot2025-04-24 16:13:10 +0000
committerGitHub2025-04-24 16:13:10 +0000
commitf81edcb3171d1f80da1c67abdf7193d871b18378 (patch)
tree993d3ea250c9d264c61252dd388fee5e5447e218 /LibTSforge/Modifiers/RearmReset.cs
parent8aa1f9078d786a7b20d2b92bbeefdd77a93dd828 (diff)
parent912f83c11b75c93f38b7966d7b727144eee7f23d (diff)
downloadTSforge-f81edcb3171d1f80da1c67abdf7193d871b18378.zip
Merge pull request #5 from massgravel/longhorn1.1.0
Longhorn
Diffstat (limited to 'LibTSforge/Modifiers/RearmReset.cs')
-rw-r--r--LibTSforge/Modifiers/RearmReset.cs20
1 files changed, 14 insertions, 6 deletions
diff --git a/LibTSforge/Modifiers/RearmReset.cs b/LibTSforge/Modifiers/RearmReset.cs
index be2b174..e909316 100644
--- a/LibTSforge/Modifiers/RearmReset.cs
+++ b/LibTSforge/Modifiers/RearmReset.cs
@@ -1,23 +1,27 @@
namespace LibTSforge.Modifiers
{
- using System;
using System.Collections.Generic;
using System.Linq;
- using LibTSforge.PhysicalStore;
+ using PhysicalStore;
+ using SPP;
public static class RearmReset
{
public static void Reset(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))
{
List<PSBlock> blocks;
- if (version == PSVersion.Win7)
+ if (version == PSVersion.Vista)
+ {
+ blocks = store.FindBlocks("740D70D8-6448-4b2f-9063-4A7A463600C5").ToList();
+ }
+ else if (version == PSVersion.Win7)
{
blocks = store.FindBlocks(0xA0000).ToList();
}
@@ -28,7 +32,11 @@ namespace LibTSforge.Modifiers
foreach (PSBlock block in blocks)
{
- if (version == PSVersion.Win7)
+ if (version == PSVersion.Vista)
+ {
+ store.DeleteBlock(block.KeyAsStr, block.ValueAsStr);
+ }
+ else if (version == PSVersion.Win7)
{
store.SetBlock(block.KeyAsStr, block.ValueAsInt, new byte[8]);
}