Initial commit

Co-authored-by: neko <109633131+nekoppai@users.noreply.github.com>
Co-authored-by: Lyssa <75037904+thecatontheceiling@users.noreply.github.com>
Co-authored-by: abbodi1406 <33669284+abbodi1406@users.noreply.github.com>
This commit is contained in:
2025-02-13 09:49:35 -05:00
commit 0d59561bee
36 changed files with 5712 additions and 0 deletions

View File

@ -0,0 +1,29 @@
namespace LibTSforge.Modifiers
{
using System;
using System.Collections.Generic;
using System.Linq;
using LibTSforge.PhysicalStore;
public static class GracePeriodReset
{
public static void Reset(PSVersion version, bool production)
{
Utils.KillSPP();
Logger.WriteLine("Writing TrustedStore data...");
using (IPhysicalStore store = Utils.GetStore(version, production))
{
string value = "msft:sl/timer";
List<PSBlock> blocks = store.FindBlocks(value).ToList();
foreach (PSBlock block in blocks)
{
store.DeleteBlock(block.KeyAsStr, block.ValueAsStr);
}
}
Logger.WriteLine("Successfully reset all grace and evaluation period timers.");
}
}
}