summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWither OrNot2025-04-04 09:24:33 +0000
committerWither OrNot2025-04-04 09:24:33 +0000
commit3a1b9c481df88e96515a89083034e17a90a26e86 (patch)
tree628e8fd5f96efe418e81f9d732e2b4c12f78a477
parent93b29d3acc9c40dc820d93f856f731a125df4277 (diff)
downloadTSforge-3a1b9c481df88e96515a89083034e17a90a26e86.zip
slightly improve arm64 fix
-rw-r--r--LibTSforge/SPP/SPPUtils.cs16
1 files changed, 11 insertions, 5 deletions
diff --git a/LibTSforge/SPP/SPPUtils.cs b/LibTSforge/SPP/SPPUtils.cs
index ad3840d..187d4f3 100644
--- a/LibTSforge/SPP/SPPUtils.cs
+++ b/LibTSforge/SPP/SPPUtils.cs
@@ -164,7 +164,10 @@ namespace LibTSforge.SPP
(string)Registry.GetValue(
@"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform",
"TokenStore",
- @"C:\Windows\System32\spp\store\2.0"
+ Path.Combine(
+ Environment.GetFolderPath(Environment.SpecialFolder.System),
+ @"spp\store\2.0"
+ )
)
),
"data.dat"
@@ -192,7 +195,10 @@ namespace LibTSforge.SPP
(string)Registry.GetValue(
@"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform",
"TokenStore",
- @"C:\Windows\System32\spp\store\2.0"
+ Path.Combine(
+ Environment.GetFolderPath(Environment.SpecialFolder.System),
+ @"spp\store\2.0"
+ )
)
),
"tokens.dat"
@@ -204,13 +210,13 @@ namespace LibTSforge.SPP
{
string psPath;
- try
+ //try
{
psPath = GetPSPath(version);
}
- catch
+ //catch
{
- throw new FileNotFoundException("Failed to get path of physical store.");
+ //throw new FileNotFoundException("Failed to get path of physical store.");
}
if (string.IsNullOrEmpty(psPath) || !File.Exists(psPath))