diff --git a/src/System.Management.Automation/namespaces/SafeTransactionHandle.cs b/src/System.Management.Automation/namespaces/SafeTransactionHandle.cs index 896ac3a2f..797193cc6 100644 --- a/src/System.Management.Automation/namespaces/SafeTransactionHandle.cs +++ b/src/System.Management.Automation/namespaces/SafeTransactionHandle.cs @@ -44,7 +44,7 @@ namespace Microsoft.PowerShell.Commands.Internal // CommitableTransaction will use DTC APIs under the covers to get KTM transaction manager interface. // KTM is kernel Transaction Manager to handle file, registry etc and MSDTC provides an integration support // with KTM to handle transaction across kernel resources and MSDTC resources like SQL, MSMQ etc. - // We need KTMRM service as well. WinPE doesn?t have these services installed + // We need KTMRM service as well. WinPE doesn’t have these services installed if (Utils.IsWinPEHost() || PsUtils.IsRunningOnProcessorArchitectureARM()) { throw new NotSupportedException(RegistryProviderStrings.NotSupported_KernelTransactions); diff --git a/src/System.Management.Automation/namespaces/TransactedRegistryKey.cs b/src/System.Management.Automation/namespaces/TransactedRegistryKey.cs index 0c8fe9848..11e7de70e 100644 --- a/src/System.Management.Automation/namespaces/TransactedRegistryKey.cs +++ b/src/System.Management.Automation/namespaces/TransactedRegistryKey.cs @@ -191,14 +191,7 @@ namespace Microsoft.PowerShell.Commands.Internal { SafeRegistryHandle nonTxKey = null; SafeRegistryHandle txKey = null; - if (!Platform.HasRegistrySupport()) - { - error = 1; - } - else - { - error = Win32Native.RegOpenKeyEx(hkey, lpSubKey, ulOptions, samDesired, out nonTxKey); - } + error = Win32Native.RegOpenKeyEx(hkey, lpSubKey, ulOptions, samDesired, out nonTxKey); // If we got some error on this open, just ignore it and continue on with the handle // we got on the original RegOpenKeyTransacted. if (Win32Native.ERROR_SUCCESS == error)