Revert unnecessary changes
This commit is contained in:
parent
69ce0e7107
commit
047525aa9d
|
@ -44,7 +44,7 @@ namespace Microsoft.PowerShell.Commands.Internal
|
||||||
// CommitableTransaction will use DTC APIs under the covers to get KTM transaction manager interface.
|
// 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
|
// 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.
|
// 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())
|
if (Utils.IsWinPEHost() || PsUtils.IsRunningOnProcessorArchitectureARM())
|
||||||
{
|
{
|
||||||
throw new NotSupportedException(RegistryProviderStrings.NotSupported_KernelTransactions);
|
throw new NotSupportedException(RegistryProviderStrings.NotSupported_KernelTransactions);
|
||||||
|
|
|
@ -191,14 +191,7 @@ namespace Microsoft.PowerShell.Commands.Internal
|
||||||
{
|
{
|
||||||
SafeRegistryHandle nonTxKey = null;
|
SafeRegistryHandle nonTxKey = null;
|
||||||
SafeRegistryHandle txKey = null;
|
SafeRegistryHandle txKey = null;
|
||||||
if (!Platform.HasRegistrySupport())
|
error = Win32Native.RegOpenKeyEx(hkey, lpSubKey, ulOptions, samDesired, out nonTxKey);
|
||||||
{
|
|
||||||
error = 1;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
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
|
// If we got some error on this open, just ignore it and continue on with the handle
|
||||||
// we got on the original RegOpenKeyTransacted.
|
// we got on the original RegOpenKeyTransacted.
|
||||||
if (Win32Native.ERROR_SUCCESS == error)
|
if (Win32Native.ERROR_SUCCESS == error)
|
||||||
|
|
Loading…
Reference in a new issue