From dec82b41f2bb2848f11a978374efc02fc40e288d Mon Sep 17 00:00:00 2001 From: Dimitrij Date: Mon, 10 Jun 2024 21:14:52 +0100 Subject: [PATCH] lib update --- .../PowerShell/Connection.Protocol.PowerShell.cs | 13 +++++-------- mRemoteNG/Properties/AssemblyInfo.cs | 6 +++--- mRemoteNG/mRemoteNG.csproj | 4 ++-- mRemoteNGSpecs/mRemoteNGSpecs.csproj | 2 +- 4 files changed, 11 insertions(+), 14 deletions(-) diff --git a/mRemoteNG/Connection/Protocol/PowerShell/Connection.Protocol.PowerShell.cs b/mRemoteNG/Connection/Protocol/PowerShell/Connection.Protocol.PowerShell.cs index 9cc822e95..368f04c0b 100644 --- a/mRemoteNG/Connection/Protocol/PowerShell/Connection.Protocol.PowerShell.cs +++ b/mRemoteNG/Connection/Protocol/PowerShell/Connection.Protocol.PowerShell.cs @@ -9,19 +9,14 @@ using mRemoteNG.Resources.Language; namespace mRemoteNG.Connection.Protocol.PowerShell { [SupportedOSPlatform("windows")] - public class ProtocolPowerShell : ProtocolBase + public class ProtocolPowerShell(ConnectionInfo connectionInfo) : ProtocolBase { #region Private Fields private IntPtr _handle; - private readonly ConnectionInfo _connectionInfo; + private readonly ConnectionInfo _connectionInfo = connectionInfo; private ConsoleControl.ConsoleControl _consoleControl; - public ProtocolPowerShell(ConnectionInfo connectionInfo) - { - _connectionInfo = connectionInfo; - } - #endregion #region Public Methods @@ -45,7 +40,9 @@ namespace mRemoteNG.Connection.Protocol.PowerShell * Prepair powershell script parameter and create script */ // Path to the Windows PowerShell executable; can be configured through options. - string psExe = @"C:\Windows\system32\WindowsPowerShell\v1.0\PowerShell.exe"; + //string psExe = @"C:\Windows\system32\WindowsPowerShell\v1.0\PowerShell.exe"; //old ps + string psExe = @"C:\Program Files\PowerShell\7\pwsh.exe"; //new ps + //string psExe = @"%LocalAppData%\Microsoft\WindowsApps\wt.exe"; //test for terminal // Maximum number of login attempts; can be configured through options. int psLoginAttempts = 3; diff --git a/mRemoteNG/Properties/AssemblyInfo.cs b/mRemoteNG/Properties/AssemblyInfo.cs index 47c81ac64..8ab286835 100644 --- a/mRemoteNG/Properties/AssemblyInfo.cs +++ b/mRemoteNG/Properties/AssemblyInfo.cs @@ -18,10 +18,10 @@ using System.Resources; [assembly: AssemblyCulture("")] // Version information -[assembly: AssemblyVersion("1.77.3.1749")] -[assembly: AssemblyFileVersion("1.77.3.1749")] +[assembly: AssemblyVersion("1.77.3.1764")] +[assembly: AssemblyFileVersion("1.77.3.1764")] [assembly: NeutralResourcesLanguageAttribute("en-US")] -[assembly: AssemblyInformationalVersion("1.77.3 (Nightly Build 1749)")] +[assembly: AssemblyInformationalVersion("1.77.3 (Nightly Build 1764)")] // Logging [assembly: log4net.Config.XmlConfigurator(ConfigFile = "log4net.config")] diff --git a/mRemoteNG/mRemoteNG.csproj b/mRemoteNG/mRemoteNG.csproj index b9a241f66..03154c243 100644 --- a/mRemoteNG/mRemoteNG.csproj +++ b/mRemoteNG/mRemoteNG.csproj @@ -86,7 +86,7 @@ - + @@ -105,7 +105,7 @@ - + diff --git a/mRemoteNGSpecs/mRemoteNGSpecs.csproj b/mRemoteNGSpecs/mRemoteNGSpecs.csproj index 4f7f0c9b3..3490578a6 100644 --- a/mRemoteNGSpecs/mRemoteNGSpecs.csproj +++ b/mRemoteNGSpecs/mRemoteNGSpecs.csproj @@ -17,7 +17,7 @@ - +