summaryrefslogtreecommitdiff
path: root/LibTSforge/Modifiers/UniqueIdDelete.cs
diff options
context:
space:
mode:
authorWitherOrNot2025-03-01 07:01:39 +0000
committerWitherOrNot2025-03-01 07:06:21 +0000
commit6d759899d85939c95f2b97c8e041d7b4865208f9 (patch)
tree08e174f929f4ddbbaa687207cf47784b29595f4b /LibTSforge/Modifiers/UniqueIdDelete.cs
parent8aa1f9078d786a7b20d2b92bbeefdd77a93dd828 (diff)
downloadTSforge-6d759899d85939c95f2b97c8e041d7b4865208f9.zip
Add partial support (zcid, rtmr, non-functional kms4k) for vista
Co-authored-by: InvoxiPlayGames <[email protected]>
Diffstat (limited to 'LibTSforge/Modifiers/UniqueIdDelete.cs')
-rw-r--r--LibTSforge/Modifiers/UniqueIdDelete.cs8
1 files changed, 5 insertions, 3 deletions
diff --git a/LibTSforge/Modifiers/UniqueIdDelete.cs b/LibTSforge/Modifiers/UniqueIdDelete.cs
index b83d328..d1851c4 100644
--- a/LibTSforge/Modifiers/UniqueIdDelete.cs
+++ b/LibTSforge/Modifiers/UniqueIdDelete.cs
@@ -8,6 +8,8 @@ namespace LibTSforge.Modifiers
{
public static void DeleteUniqueId(PSVersion version, bool production, Guid actId)
{
+ if (version == PSVersion.Vista) throw new NotSupportedException("This feature is not supported on Windows Vista/Server 2008.");
+
Guid appId;
if (actId == Guid.Empty)
@@ -28,11 +30,11 @@ namespace LibTSforge.Modifiers
string instId = SLApi.GetInstallationID(actId);
Guid pkeyId = SLApi.GetInstalledPkeyID(actId);
- Utils.KillSPP();
+ SPPUtils.KillSPP(version);
Logger.WriteLine("Writing TrustedStore data...");
- using (IPhysicalStore store = Utils.GetStore(version, production))
+ using (IPhysicalStore store = SPPUtils.GetStore(version, production))
{
string key = string.Format("SPPSVC\\{0}\\{1}", appId, actId);
PSBlock keyBlock = store.GetBlock(key, pkeyId.ToString());
@@ -42,7 +44,7 @@ namespace LibTSforge.Modifiers
throw new Exception("No product key found.");
}
- VariableBag pkb = new VariableBag(keyBlock.Data);
+ VariableBag pkb = new VariableBag(keyBlock.Data, version);
pkb.DeleteBlock("SppPkeyUniqueIdToken");