summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWither OrNot2025-04-04 00:51:33 +0000
committerWither OrNot2025-04-04 00:51:33 +0000
commit736c722880ef33cc2072f5ff28e6d051fed0c782 (patch)
treef4a705679a797c64973188caf647d2a86bc5d2ab
parent17a7c90245ccd45b6e32d8bbe01a1a3eddeeae4d (diff)
downloadTSforge-736c722880ef33cc2072f5ff28e6d051fed0c782.zip
attempt at arm fix
-rw-r--r--LibTSforge/SPP/SPPUtils.cs33
1 files changed, 16 insertions, 17 deletions
diff --git a/LibTSforge/SPP/SPPUtils.cs b/LibTSforge/SPP/SPPUtils.cs
index 5621305..21db680 100644
--- a/LibTSforge/SPP/SPPUtils.cs
+++ b/LibTSforge/SPP/SPPUtils.cs
@@ -161,14 +161,15 @@ namespace LibTSforge.SPP
default:
return Path.Combine(
Environment.ExpandEnvironmentVariables(
- (string)Registry.GetValue(
- @"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform",
+ (string)RegistryKey.OpenRemoteBaseKey(RegistryHive.LocalMachine, Environment.MachineName)
+ .OpenSubKey("SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\SoftwareProtectionPlatform")
+ .GetValue(
"TokenStore",
string.Empty
- )
- ),
- "data.dat"
- );
+ )
+ ),
+ "data.dat"
+ );
}
}
@@ -189,14 +190,15 @@ namespace LibTSforge.SPP
default:
return Path.Combine(
Environment.ExpandEnvironmentVariables(
- (string)Registry.GetValue(
- @"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform",
+ (string)RegistryKey.OpenRemoteBaseKey(RegistryHive.LocalMachine, Environment.MachineName)
+ .OpenSubKey("SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\SoftwareProtectionPlatform")
+ .GetValue(
"TokenStore",
string.Empty
- )
- ),
- "tokens.dat"
- );
+ )
+ ),
+ "tokens.dat"
+ );
}
}
@@ -204,14 +206,11 @@ namespace LibTSforge.SPP
{
string psPath;
- try
+
{
psPath = GetPSPath(version);
}
- catch
- {
- throw new FileNotFoundException("Failed to get path of physical store.");
- }
+
if (string.IsNullOrEmpty(psPath) || !File.Exists(psPath))
{