mirror of
https://github.com/mRemoteNG/mRemoteNG.git
synced 2026-02-17 22:11:48 +08:00
Merge pull request #1848 from johnwc/feature/RemoteDesktopServices
Feature/remote desktop services
This commit is contained in:
@@ -5,6 +5,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||
|
||||
## [Unreleased]
|
||||
### Added
|
||||
- #327: Added Alternative Shell for RDP settings
|
||||
- #1476: Configurable backups. Can now edit/set backup frequency, backup path, and max number of backup files.
|
||||
- #1427: Fix RDP local desktop scale not taking effect on remote
|
||||
- #1770: Added missing RDP performance settings
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
namespace mRemoteNG.App.Info
|
||||
using System;
|
||||
|
||||
namespace mRemoteNG.App.Info
|
||||
{
|
||||
public static class ConnectionsFileInfo
|
||||
{
|
||||
public static readonly string DefaultConnectionsPath = SettingsFileInfo.SettingsPath;
|
||||
public static readonly string DefaultConnectionsFile = "confCons.xml";
|
||||
public static readonly string DefaultConnectionsFileNew = "confConsNew.xml";
|
||||
public static readonly double ConnectionFileVersion = 2.8;
|
||||
public static readonly Version ConnectionFileVersion = new Version(2, 9);
|
||||
}
|
||||
}
|
||||
@@ -140,9 +140,9 @@ namespace mRemoteNG.Config.Connections
|
||||
{
|
||||
dbQuery =
|
||||
databaseConnector.DbCommand(
|
||||
"INSERT INTO tblRoot (Name, Export, Protected, ConfVersion) VALUES(\'" +
|
||||
MiscTools.PrepareValueForDB(rootTreeNode.Name) + "\', 0, \'" + strProtected + "\'," +
|
||||
ConnectionsFileInfo.ConnectionFileVersion.ToString(CultureInfo.InvariantCulture) + ")");
|
||||
"INSERT INTO tblRoot (Name, Export, Protected, ConfVersion) VALUES('" +
|
||||
MiscTools.PrepareValueForDB(rootTreeNode.Name) + "', 0, '" + strProtected + "','" +
|
||||
ConnectionsFileInfo.ConnectionFileVersion.ToString() + "')");
|
||||
dbQuery.ExecuteNonQuery();
|
||||
}
|
||||
else
|
||||
@@ -172,7 +172,7 @@ namespace mRemoteNG.Config.Connections
|
||||
{
|
||||
var dbQuery = databaseConnector.DbCommand("DELETE FROM tblUpdate");
|
||||
dbQuery.ExecuteNonQuery();
|
||||
dbQuery = databaseConnector.DbCommand("INSERT INTO tblUpdate (LastUpdate) VALUES(\'" + MiscTools.DBDate(DateTime.Now) + "\')");
|
||||
dbQuery = databaseConnector.DbCommand("INSERT INTO tblUpdate (LastUpdate) VALUES('" + MiscTools.DBDate(DateTime.Now) + "')");
|
||||
dbQuery.ExecuteNonQuery();
|
||||
}
|
||||
|
||||
|
||||
@@ -190,6 +190,14 @@ namespace mRemoteNG.Config.Serializers.ConnectionSerializers.Csv
|
||||
? connectionCsv[headers.IndexOf("RDGatewayHostname")]
|
||||
: "";
|
||||
|
||||
connectionRecord.StartProgram = headers.Contains("StartProgram")
|
||||
? connectionCsv[headers.IndexOf("StartProgram")]
|
||||
: "";
|
||||
|
||||
connectionRecord.StartProgramWorkDir = headers.Contains("StartProgramWorkDir")
|
||||
? connectionCsv[headers.IndexOf("StartProgramWorkDir")]
|
||||
: "";
|
||||
|
||||
if (headers.Contains("Protocol"))
|
||||
{
|
||||
if (Enum.TryParse(connectionCsv[headers.IndexOf("Protocol")], out ProtocolType protocolType))
|
||||
|
||||
@@ -1,257 +1,259 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using mRemoteNG.Connection;
|
||||
using mRemoteNG.Container;
|
||||
using mRemoteNG.Credential;
|
||||
using mRemoteNG.Security;
|
||||
using mRemoteNG.Tools;
|
||||
using mRemoteNG.Tree;
|
||||
using mRemoteNG.Tree.Root;
|
||||
|
||||
namespace mRemoteNG.Config.Serializers.ConnectionSerializers.Csv
|
||||
{
|
||||
public class CsvConnectionsSerializerMremotengFormat : ISerializer<ConnectionInfo, string>
|
||||
{
|
||||
private readonly SaveFilter _saveFilter;
|
||||
private readonly ICredentialRepositoryList _credentialRepositoryList;
|
||||
|
||||
public Version Version { get; } = new Version(2, 7);
|
||||
|
||||
public CsvConnectionsSerializerMremotengFormat(SaveFilter saveFilter,
|
||||
ICredentialRepositoryList credentialRepositoryList)
|
||||
{
|
||||
saveFilter.ThrowIfNull(nameof(saveFilter));
|
||||
credentialRepositoryList.ThrowIfNull(nameof(credentialRepositoryList));
|
||||
|
||||
_saveFilter = saveFilter;
|
||||
_credentialRepositoryList = credentialRepositoryList;
|
||||
}
|
||||
|
||||
public string Serialize(ConnectionTreeModel connectionTreeModel)
|
||||
{
|
||||
connectionTreeModel.ThrowIfNull(nameof(connectionTreeModel));
|
||||
|
||||
var rootNode = connectionTreeModel.RootNodes.First(node => node is RootNodeInfo);
|
||||
return Serialize(rootNode);
|
||||
}
|
||||
|
||||
public string Serialize(ConnectionInfo serializationTarget)
|
||||
{
|
||||
serializationTarget.ThrowIfNull(nameof(serializationTarget));
|
||||
var sb = new StringBuilder();
|
||||
|
||||
WriteCsvHeader(sb);
|
||||
SerializeNodesRecursive(serializationTarget, sb);
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
private void WriteCsvHeader(StringBuilder sb)
|
||||
{
|
||||
sb.Append("Name;Id;Parent;NodeType;Description;Icon;Panel;");
|
||||
if (_saveFilter.SaveUsername)
|
||||
sb.Append("Username;");
|
||||
if (_saveFilter.SavePassword)
|
||||
sb.Append("Password;");
|
||||
if (_saveFilter.SaveDomain)
|
||||
sb.Append("Domain;");
|
||||
|
||||
sb.Append("Hostname;Port;VmId;Protocol;SSHTunnelConnectionName;OpeningCommand;SSHOptions;PuttySession;ConnectToConsole;UseCredSsp;UseVmId;UseEnhancedMode;RenderingEngine;RDPAuthenticationLevel;" +
|
||||
"LoadBalanceInfo;Colors;Resolution;AutomaticResize;DisplayWallpaper;DisplayThemes;EnableFontSmoothing;EnableDesktopComposition;DisableFullWindowDrag;DisableMenuAnimations;DisableCursorShadow;DisableCursorBlinking;" +
|
||||
"CacheBitmaps;RedirectDiskDrives;RedirectPorts;RedirectPrinters;RedirectClipboard;RedirectSmartCards;RedirectSound;RedirectKeys;" +
|
||||
"PreExtApp;PostExtApp;MacAddress;UserField;ExtApp;Favorite;VNCCompression;VNCEncoding;VNCAuthMode;VNCProxyType;VNCProxyIP;" +
|
||||
"VNCProxyPort;VNCProxyUsername;VNCProxyPassword;VNCColors;VNCSmartSizeMode;VNCViewOnly;RDGatewayUsageMethod;RDGatewayHostname;" +
|
||||
"RDGatewayUseConnectionCredentials;RDGatewayUsername;RDGatewayPassword;RDGatewayDomain;RedirectAudioCapture;RdpVersion;");
|
||||
|
||||
if (_saveFilter.SaveInheritance)
|
||||
sb.Append("InheritCacheBitmaps;InheritColors;InheritDescription;InheritDisplayThemes;InheritDisplayWallpaper;" +
|
||||
"InheritEnableFontSmoothing;InheritEnableDesktopComposition;InheritDisableFullWindowDrag;InheritDisableMenuAnimations;InheritDisableCursorShadow;InheritDisableCursorBlinking;InheritDomain;InheritIcon;InheritPanel;InheritPassword;InheritPort;" +
|
||||
"InheritProtocol;InheritSSHTunnelConnectionName;InheritSSHOptions;InheritPuttySession;InheritRedirectDiskDrives;InheritRedirectKeys;InheritRedirectPorts;InheritRedirectPrinters;" +
|
||||
"InheritRedirectClipboard;InheritRedirectSmartCards;InheritRedirectSound;InheritResolution;InheritAutomaticResize;" +
|
||||
"InheritUseConsoleSession;InheritUseCredSsp;InheritUseVmId;InheritUseEnhancedMode;InheritVmId;InheritRenderingEngine;InheritUsername;" +
|
||||
"InheritRDPAuthenticationLevel;InheritLoadBalanceInfo;InheritPreExtApp;InheritPostExtApp;InheritMacAddress;InheritUserField;" +
|
||||
"InheritFavorite;InheritExtApp;InheritVNCCompression;InheritVNCEncoding;InheritVNCAuthMode;InheritVNCProxyType;InheritVNCProxyIP;" +
|
||||
"InheritVNCProxyPort;InheritVNCProxyUsername;InheritVNCProxyPassword;InheritVNCColors;InheritVNCSmartSizeMode;InheritVNCViewOnly;" +
|
||||
"InheritRDGatewayUsageMethod;InheritRDGatewayHostname;InheritRDGatewayUseConnectionCredentials;InheritRDGatewayUsername;" +
|
||||
"InheritRDGatewayPassword;InheritRDGatewayDomain;InheritRDPAlertIdleTimeout;InheritRDPMinutesToIdleTimeout;InheritSoundQuality;" +
|
||||
"InheritRedirectAudioCapture;InheritRdpVersion");
|
||||
}
|
||||
|
||||
private void SerializeNodesRecursive(ConnectionInfo node, StringBuilder sb)
|
||||
{
|
||||
var nodeAsContainer = node as ContainerInfo;
|
||||
if (nodeAsContainer != null)
|
||||
{
|
||||
foreach (var child in nodeAsContainer.Children)
|
||||
{
|
||||
SerializeNodesRecursive(child, sb);
|
||||
}
|
||||
}
|
||||
|
||||
// dont serialize the root node
|
||||
if (node is RootNodeInfo)
|
||||
return;
|
||||
|
||||
SerializeConnectionInfo(node, sb);
|
||||
}
|
||||
|
||||
private void SerializeConnectionInfo(ConnectionInfo con, StringBuilder sb)
|
||||
{
|
||||
sb.AppendLine();
|
||||
sb.Append(FormatForCsv(con.Name))
|
||||
.Append(FormatForCsv(con.ConstantID))
|
||||
.Append(FormatForCsv(con.Parent?.ConstantID ?? ""))
|
||||
.Append(FormatForCsv(con.GetTreeNodeType()))
|
||||
.Append(FormatForCsv(con.Description))
|
||||
.Append(FormatForCsv(con.Icon))
|
||||
.Append(FormatForCsv(con.Panel));
|
||||
|
||||
if (_saveFilter.SaveUsername)
|
||||
sb.Append(FormatForCsv(con.Username));
|
||||
|
||||
if (_saveFilter.SavePassword)
|
||||
sb.Append(FormatForCsv(con.Password));
|
||||
|
||||
if (_saveFilter.SaveDomain)
|
||||
sb.Append(FormatForCsv(con.Domain));
|
||||
|
||||
sb.Append(FormatForCsv(con.Hostname))
|
||||
.Append(FormatForCsv(con.Port))
|
||||
.Append(FormatForCsv(con.VmId))
|
||||
.Append(FormatForCsv(con.Protocol))
|
||||
.Append(FormatForCsv(con.SSHTunnelConnectionName))
|
||||
.Append(FormatForCsv(con.OpeningCommand))
|
||||
.Append(FormatForCsv(con.SSHOptions))
|
||||
.Append(FormatForCsv(con.PuttySession))
|
||||
.Append(FormatForCsv(con.UseConsoleSession))
|
||||
.Append(FormatForCsv(con.UseCredSsp))
|
||||
.Append(FormatForCsv(con.UseVmId))
|
||||
.Append(FormatForCsv(con.UseEnhancedMode))
|
||||
.Append(FormatForCsv(con.RenderingEngine))
|
||||
.Append(FormatForCsv(con.RDPAuthenticationLevel))
|
||||
.Append(FormatForCsv(con.LoadBalanceInfo))
|
||||
.Append(FormatForCsv(con.Colors))
|
||||
.Append(FormatForCsv(con.Resolution))
|
||||
.Append(FormatForCsv(con.AutomaticResize))
|
||||
.Append(FormatForCsv(con.DisplayWallpaper))
|
||||
.Append(FormatForCsv(con.DisplayThemes))
|
||||
.Append(FormatForCsv(con.EnableFontSmoothing))
|
||||
.Append(FormatForCsv(con.EnableDesktopComposition))
|
||||
.Append(FormatForCsv(con.DisableFullWindowDrag))
|
||||
.Append(FormatForCsv(con.DisableMenuAnimations))
|
||||
.Append(FormatForCsv(con.DisableCursorShadow))
|
||||
.Append(FormatForCsv(con.DisableCursorBlinking))
|
||||
.Append(FormatForCsv(con.CacheBitmaps))
|
||||
.Append(FormatForCsv(con.RedirectDiskDrives))
|
||||
.Append(FormatForCsv(con.RedirectPorts))
|
||||
.Append(FormatForCsv(con.RedirectPrinters))
|
||||
.Append(FormatForCsv(con.RedirectClipboard))
|
||||
.Append(FormatForCsv(con.RedirectSmartCards))
|
||||
.Append(FormatForCsv(con.RedirectSound))
|
||||
.Append(FormatForCsv(con.RedirectKeys))
|
||||
.Append(FormatForCsv(con.PreExtApp))
|
||||
.Append(FormatForCsv(con.PostExtApp))
|
||||
.Append(FormatForCsv(con.MacAddress))
|
||||
.Append(FormatForCsv(con.UserField))
|
||||
.Append(FormatForCsv(con.ExtApp))
|
||||
.Append(FormatForCsv(con.Favorite))
|
||||
.Append(FormatForCsv(con.VNCCompression))
|
||||
.Append(FormatForCsv(con.VNCEncoding))
|
||||
.Append(FormatForCsv(con.VNCAuthMode))
|
||||
.Append(FormatForCsv(con.VNCProxyType))
|
||||
.Append(FormatForCsv(con.VNCProxyIP))
|
||||
.Append(FormatForCsv(con.VNCProxyPort))
|
||||
.Append(FormatForCsv(con.VNCProxyUsername))
|
||||
.Append(FormatForCsv(con.VNCProxyPassword))
|
||||
.Append(FormatForCsv(con.VNCColors))
|
||||
.Append(FormatForCsv(con.VNCSmartSizeMode))
|
||||
.Append(FormatForCsv(con.VNCViewOnly))
|
||||
.Append(FormatForCsv(con.RDGatewayUsageMethod))
|
||||
.Append(FormatForCsv(con.RDGatewayHostname))
|
||||
.Append(FormatForCsv(con.RDGatewayUseConnectionCredentials))
|
||||
.Append(FormatForCsv(con.RDGatewayUsername))
|
||||
.Append(FormatForCsv(con.RDGatewayPassword))
|
||||
.Append(FormatForCsv(con.RDGatewayDomain))
|
||||
.Append(FormatForCsv(con.RedirectAudioCapture))
|
||||
.Append(FormatForCsv(con.RdpVersion));
|
||||
|
||||
|
||||
if (!_saveFilter.SaveInheritance)
|
||||
return;
|
||||
|
||||
sb.Append(FormatForCsv(con.Inheritance.CacheBitmaps))
|
||||
.Append(FormatForCsv(con.Inheritance.Colors))
|
||||
.Append(FormatForCsv(con.Inheritance.Description))
|
||||
.Append(FormatForCsv(con.Inheritance.DisplayThemes))
|
||||
.Append(FormatForCsv(con.Inheritance.DisplayWallpaper))
|
||||
.Append(FormatForCsv(con.Inheritance.EnableFontSmoothing))
|
||||
.Append(FormatForCsv(con.Inheritance.EnableDesktopComposition))
|
||||
.Append(FormatForCsv(con.Inheritance.DisableFullWindowDrag))
|
||||
.Append(FormatForCsv(con.Inheritance.DisableMenuAnimations))
|
||||
.Append(FormatForCsv(con.Inheritance.DisableCursorShadow))
|
||||
.Append(FormatForCsv(con.Inheritance.DisableCursorBlinking))
|
||||
.Append(FormatForCsv(con.Inheritance.Domain))
|
||||
.Append(FormatForCsv(con.Inheritance.Icon))
|
||||
.Append(FormatForCsv(con.Inheritance.Panel))
|
||||
.Append(FormatForCsv(con.Inheritance.Password))
|
||||
.Append(FormatForCsv(con.Inheritance.Port))
|
||||
.Append(FormatForCsv(con.Inheritance.Protocol))
|
||||
.Append(FormatForCsv(con.Inheritance.SSHTunnelConnectionName))
|
||||
.Append(FormatForCsv(con.Inheritance.OpeningCommand))
|
||||
.Append(FormatForCsv(con.Inheritance.SSHOptions))
|
||||
.Append(FormatForCsv(con.Inheritance.PuttySession))
|
||||
.Append(FormatForCsv(con.Inheritance.RedirectDiskDrives))
|
||||
.Append(FormatForCsv(con.Inheritance.RedirectKeys))
|
||||
.Append(FormatForCsv(con.Inheritance.RedirectPorts))
|
||||
.Append(FormatForCsv(con.Inheritance.RedirectPrinters))
|
||||
.Append(FormatForCsv(con.Inheritance.RedirectClipboard))
|
||||
.Append(FormatForCsv(con.Inheritance.RedirectSmartCards))
|
||||
.Append(FormatForCsv(con.Inheritance.RedirectSound))
|
||||
.Append(FormatForCsv(con.Inheritance.Resolution))
|
||||
.Append(FormatForCsv(con.Inheritance.AutomaticResize))
|
||||
.Append(FormatForCsv(con.Inheritance.UseConsoleSession))
|
||||
.Append(FormatForCsv(con.Inheritance.UseCredSsp))
|
||||
.Append(FormatForCsv(con.Inheritance.UseVmId))
|
||||
.Append(FormatForCsv(con.Inheritance.UseEnhancedMode))
|
||||
.Append(FormatForCsv(con.Inheritance.VmId))
|
||||
.Append(FormatForCsv(con.Inheritance.RenderingEngine))
|
||||
.Append(FormatForCsv(con.Inheritance.Username))
|
||||
.Append(FormatForCsv(con.Inheritance.RDPAuthenticationLevel))
|
||||
.Append(FormatForCsv(con.Inheritance.LoadBalanceInfo))
|
||||
.Append(FormatForCsv(con.Inheritance.PreExtApp))
|
||||
.Append(FormatForCsv(con.Inheritance.PostExtApp))
|
||||
.Append(FormatForCsv(con.Inheritance.MacAddress))
|
||||
.Append(FormatForCsv(con.Inheritance.UserField))
|
||||
.Append(FormatForCsv(con.Inheritance.Favorite))
|
||||
.Append(FormatForCsv(con.Inheritance.ExtApp))
|
||||
.Append(FormatForCsv(con.Inheritance.VNCCompression))
|
||||
.Append(FormatForCsv(con.Inheritance.VNCEncoding))
|
||||
.Append(FormatForCsv(con.Inheritance.VNCAuthMode))
|
||||
.Append(FormatForCsv(con.Inheritance.VNCProxyType))
|
||||
.Append(FormatForCsv(con.Inheritance.VNCProxyIP))
|
||||
.Append(FormatForCsv(con.Inheritance.VNCProxyPort))
|
||||
.Append(FormatForCsv(con.Inheritance.VNCProxyUsername))
|
||||
.Append(FormatForCsv(con.Inheritance.VNCProxyPassword))
|
||||
.Append(FormatForCsv(con.Inheritance.VNCColors))
|
||||
.Append(FormatForCsv(con.Inheritance.VNCSmartSizeMode))
|
||||
.Append(FormatForCsv(con.Inheritance.VNCViewOnly))
|
||||
.Append(FormatForCsv(con.Inheritance.RDGatewayUsageMethod))
|
||||
.Append(FormatForCsv(con.Inheritance.RDGatewayHostname))
|
||||
.Append(FormatForCsv(con.Inheritance.RDGatewayUseConnectionCredentials))
|
||||
.Append(FormatForCsv(con.Inheritance.RDGatewayUsername))
|
||||
.Append(FormatForCsv(con.Inheritance.RDGatewayPassword))
|
||||
.Append(FormatForCsv(con.Inheritance.RDGatewayDomain))
|
||||
.Append(FormatForCsv(con.Inheritance.RDPAlertIdleTimeout))
|
||||
.Append(FormatForCsv(con.Inheritance.RDPMinutesToIdleTimeout))
|
||||
.Append(FormatForCsv(con.Inheritance.SoundQuality))
|
||||
.Append(FormatForCsv(con.Inheritance.RedirectAudioCapture))
|
||||
.Append(FormatForCsv(con.Inheritance.RdpVersion));
|
||||
}
|
||||
|
||||
private string FormatForCsv(object value)
|
||||
{
|
||||
var cleanedString = value.ToString().Replace(";", "");
|
||||
return cleanedString + ";";
|
||||
}
|
||||
}
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using mRemoteNG.Connection;
|
||||
using mRemoteNG.Container;
|
||||
using mRemoteNG.Credential;
|
||||
using mRemoteNG.Security;
|
||||
using mRemoteNG.Tools;
|
||||
using mRemoteNG.Tree;
|
||||
using mRemoteNG.Tree.Root;
|
||||
|
||||
namespace mRemoteNG.Config.Serializers.ConnectionSerializers.Csv
|
||||
{
|
||||
public class CsvConnectionsSerializerMremotengFormat : ISerializer<ConnectionInfo, string>
|
||||
{
|
||||
private readonly SaveFilter _saveFilter;
|
||||
private readonly ICredentialRepositoryList _credentialRepositoryList;
|
||||
|
||||
public Version Version { get; } = new Version(2, 7);
|
||||
|
||||
public CsvConnectionsSerializerMremotengFormat(SaveFilter saveFilter,
|
||||
ICredentialRepositoryList credentialRepositoryList)
|
||||
{
|
||||
saveFilter.ThrowIfNull(nameof(saveFilter));
|
||||
credentialRepositoryList.ThrowIfNull(nameof(credentialRepositoryList));
|
||||
|
||||
_saveFilter = saveFilter;
|
||||
_credentialRepositoryList = credentialRepositoryList;
|
||||
}
|
||||
|
||||
public string Serialize(ConnectionTreeModel connectionTreeModel)
|
||||
{
|
||||
connectionTreeModel.ThrowIfNull(nameof(connectionTreeModel));
|
||||
|
||||
var rootNode = connectionTreeModel.RootNodes.First(node => node is RootNodeInfo);
|
||||
return Serialize(rootNode);
|
||||
}
|
||||
|
||||
public string Serialize(ConnectionInfo serializationTarget)
|
||||
{
|
||||
serializationTarget.ThrowIfNull(nameof(serializationTarget));
|
||||
var sb = new StringBuilder();
|
||||
|
||||
WriteCsvHeader(sb);
|
||||
SerializeNodesRecursive(serializationTarget, sb);
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
private void WriteCsvHeader(StringBuilder sb)
|
||||
{
|
||||
sb.Append("Name;Id;Parent;NodeType;Description;Icon;Panel;");
|
||||
if (_saveFilter.SaveUsername)
|
||||
sb.Append("Username;");
|
||||
if (_saveFilter.SavePassword)
|
||||
sb.Append("Password;");
|
||||
if (_saveFilter.SaveDomain)
|
||||
sb.Append("Domain;");
|
||||
|
||||
sb.Append("Hostname;Port;VmId;Protocol;SSHTunnelConnectionName;OpeningCommand;SSHOptions;PuttySession;ConnectToConsole;UseCredSsp;UseVmId;UseEnhancedMode;RenderingEngine;RDPAuthenticationLevel;" +
|
||||
"LoadBalanceInfo;Colors;Resolution;AutomaticResize;DisplayWallpaper;DisplayThemes;EnableFontSmoothing;EnableDesktopComposition;DisableFullWindowDrag;DisableMenuAnimations;DisableCursorShadow;DisableCursorBlinking;" +
|
||||
"CacheBitmaps;RedirectDiskDrives;RedirectPorts;RedirectPrinters;RedirectClipboard;RedirectSmartCards;RedirectSound;RedirectKeys;" +
|
||||
"PreExtApp;PostExtApp;MacAddress;UserField;ExtApp;Favorite;VNCCompression;VNCEncoding;VNCAuthMode;VNCProxyType;VNCProxyIP;" +
|
||||
"VNCProxyPort;VNCProxyUsername;VNCProxyPassword;VNCColors;VNCSmartSizeMode;VNCViewOnly;RDGatewayUsageMethod;RDGatewayHostname;" +
|
||||
"RDGatewayUseConnectionCredentials;RDGatewayUsername;RDGatewayPassword;RDGatewayDomain;RedirectAudioCapture;RdpVersion;StartProgram;StartProgramWorkDir;");
|
||||
|
||||
if (_saveFilter.SaveInheritance)
|
||||
sb.Append("InheritCacheBitmaps;InheritColors;InheritDescription;InheritDisplayThemes;InheritDisplayWallpaper;" +
|
||||
"InheritEnableFontSmoothing;InheritEnableDesktopComposition;InheritDisableFullWindowDrag;InheritDisableMenuAnimations;InheritDisableCursorShadow;InheritDisableCursorBlinking;InheritDomain;InheritIcon;InheritPanel;InheritPassword;InheritPort;" +
|
||||
"InheritProtocol;InheritSSHTunnelConnectionName;InheritSSHOptions;InheritPuttySession;InheritRedirectDiskDrives;InheritRedirectKeys;InheritRedirectPorts;InheritRedirectPrinters;" +
|
||||
"InheritRedirectClipboard;InheritRedirectSmartCards;InheritRedirectSound;InheritResolution;InheritAutomaticResize;" +
|
||||
"InheritUseConsoleSession;InheritUseCredSsp;InheritUseVmId;InheritUseEnhancedMode;InheritVmId;InheritRenderingEngine;InheritUsername;" +
|
||||
"InheritRDPAuthenticationLevel;InheritLoadBalanceInfo;InheritPreExtApp;InheritPostExtApp;InheritMacAddress;InheritUserField;" +
|
||||
"InheritFavorite;InheritExtApp;InheritVNCCompression;InheritVNCEncoding;InheritVNCAuthMode;InheritVNCProxyType;InheritVNCProxyIP;" +
|
||||
"InheritVNCProxyPort;InheritVNCProxyUsername;InheritVNCProxyPassword;InheritVNCColors;InheritVNCSmartSizeMode;InheritVNCViewOnly;" +
|
||||
"InheritRDGatewayUsageMethod;InheritRDGatewayHostname;InheritRDGatewayUseConnectionCredentials;InheritRDGatewayUsername;" +
|
||||
"InheritRDGatewayPassword;InheritRDGatewayDomain;InheritRDPAlertIdleTimeout;InheritRDPMinutesToIdleTimeout;InheritSoundQuality;" +
|
||||
"InheritRedirectAudioCapture;InheritRdpVersion");
|
||||
}
|
||||
|
||||
private void SerializeNodesRecursive(ConnectionInfo node, StringBuilder sb)
|
||||
{
|
||||
var nodeAsContainer = node as ContainerInfo;
|
||||
if (nodeAsContainer != null)
|
||||
{
|
||||
foreach (var child in nodeAsContainer.Children)
|
||||
{
|
||||
SerializeNodesRecursive(child, sb);
|
||||
}
|
||||
}
|
||||
|
||||
// dont serialize the root node
|
||||
if (node is RootNodeInfo)
|
||||
return;
|
||||
|
||||
SerializeConnectionInfo(node, sb);
|
||||
}
|
||||
|
||||
private void SerializeConnectionInfo(ConnectionInfo con, StringBuilder sb)
|
||||
{
|
||||
sb.AppendLine();
|
||||
sb.Append(FormatForCsv(con.Name))
|
||||
.Append(FormatForCsv(con.ConstantID))
|
||||
.Append(FormatForCsv(con.Parent?.ConstantID ?? ""))
|
||||
.Append(FormatForCsv(con.GetTreeNodeType()))
|
||||
.Append(FormatForCsv(con.Description))
|
||||
.Append(FormatForCsv(con.Icon))
|
||||
.Append(FormatForCsv(con.Panel));
|
||||
|
||||
if (_saveFilter.SaveUsername)
|
||||
sb.Append(FormatForCsv(con.Username));
|
||||
|
||||
if (_saveFilter.SavePassword)
|
||||
sb.Append(FormatForCsv(con.Password));
|
||||
|
||||
if (_saveFilter.SaveDomain)
|
||||
sb.Append(FormatForCsv(con.Domain));
|
||||
|
||||
sb.Append(FormatForCsv(con.Hostname))
|
||||
.Append(FormatForCsv(con.Port))
|
||||
.Append(FormatForCsv(con.VmId))
|
||||
.Append(FormatForCsv(con.Protocol))
|
||||
.Append(FormatForCsv(con.SSHTunnelConnectionName))
|
||||
.Append(FormatForCsv(con.OpeningCommand))
|
||||
.Append(FormatForCsv(con.SSHOptions))
|
||||
.Append(FormatForCsv(con.PuttySession))
|
||||
.Append(FormatForCsv(con.UseConsoleSession))
|
||||
.Append(FormatForCsv(con.UseCredSsp))
|
||||
.Append(FormatForCsv(con.UseVmId))
|
||||
.Append(FormatForCsv(con.UseEnhancedMode))
|
||||
.Append(FormatForCsv(con.RenderingEngine))
|
||||
.Append(FormatForCsv(con.RDPAuthenticationLevel))
|
||||
.Append(FormatForCsv(con.LoadBalanceInfo))
|
||||
.Append(FormatForCsv(con.Colors))
|
||||
.Append(FormatForCsv(con.Resolution))
|
||||
.Append(FormatForCsv(con.AutomaticResize))
|
||||
.Append(FormatForCsv(con.DisplayWallpaper))
|
||||
.Append(FormatForCsv(con.DisplayThemes))
|
||||
.Append(FormatForCsv(con.EnableFontSmoothing))
|
||||
.Append(FormatForCsv(con.EnableDesktopComposition))
|
||||
.Append(FormatForCsv(con.DisableFullWindowDrag))
|
||||
.Append(FormatForCsv(con.DisableMenuAnimations))
|
||||
.Append(FormatForCsv(con.DisableCursorShadow))
|
||||
.Append(FormatForCsv(con.DisableCursorBlinking))
|
||||
.Append(FormatForCsv(con.CacheBitmaps))
|
||||
.Append(FormatForCsv(con.RedirectDiskDrives))
|
||||
.Append(FormatForCsv(con.RedirectPorts))
|
||||
.Append(FormatForCsv(con.RedirectPrinters))
|
||||
.Append(FormatForCsv(con.RedirectClipboard))
|
||||
.Append(FormatForCsv(con.RedirectSmartCards))
|
||||
.Append(FormatForCsv(con.RedirectSound))
|
||||
.Append(FormatForCsv(con.RedirectKeys))
|
||||
.Append(FormatForCsv(con.PreExtApp))
|
||||
.Append(FormatForCsv(con.PostExtApp))
|
||||
.Append(FormatForCsv(con.MacAddress))
|
||||
.Append(FormatForCsv(con.UserField))
|
||||
.Append(FormatForCsv(con.ExtApp))
|
||||
.Append(FormatForCsv(con.Favorite))
|
||||
.Append(FormatForCsv(con.VNCCompression))
|
||||
.Append(FormatForCsv(con.VNCEncoding))
|
||||
.Append(FormatForCsv(con.VNCAuthMode))
|
||||
.Append(FormatForCsv(con.VNCProxyType))
|
||||
.Append(FormatForCsv(con.VNCProxyIP))
|
||||
.Append(FormatForCsv(con.VNCProxyPort))
|
||||
.Append(FormatForCsv(con.VNCProxyUsername))
|
||||
.Append(FormatForCsv(con.VNCProxyPassword))
|
||||
.Append(FormatForCsv(con.VNCColors))
|
||||
.Append(FormatForCsv(con.VNCSmartSizeMode))
|
||||
.Append(FormatForCsv(con.VNCViewOnly))
|
||||
.Append(FormatForCsv(con.RDGatewayUsageMethod))
|
||||
.Append(FormatForCsv(con.RDGatewayHostname))
|
||||
.Append(FormatForCsv(con.RDGatewayUseConnectionCredentials))
|
||||
.Append(FormatForCsv(con.RDGatewayUsername))
|
||||
.Append(FormatForCsv(con.RDGatewayPassword))
|
||||
.Append(FormatForCsv(con.RDGatewayDomain))
|
||||
.Append(FormatForCsv(con.RedirectAudioCapture))
|
||||
.Append(FormatForCsv(con.RdpVersion))
|
||||
.Append(FormatForCsv(con.StartProgram))
|
||||
.Append(FormatForCsv(con.StartProgramWorkDir));
|
||||
|
||||
|
||||
if (!_saveFilter.SaveInheritance)
|
||||
return;
|
||||
|
||||
sb.Append(FormatForCsv(con.Inheritance.CacheBitmaps))
|
||||
.Append(FormatForCsv(con.Inheritance.Colors))
|
||||
.Append(FormatForCsv(con.Inheritance.Description))
|
||||
.Append(FormatForCsv(con.Inheritance.DisplayThemes))
|
||||
.Append(FormatForCsv(con.Inheritance.DisplayWallpaper))
|
||||
.Append(FormatForCsv(con.Inheritance.EnableFontSmoothing))
|
||||
.Append(FormatForCsv(con.Inheritance.EnableDesktopComposition))
|
||||
.Append(FormatForCsv(con.Inheritance.DisableFullWindowDrag))
|
||||
.Append(FormatForCsv(con.Inheritance.DisableMenuAnimations))
|
||||
.Append(FormatForCsv(con.Inheritance.DisableCursorShadow))
|
||||
.Append(FormatForCsv(con.Inheritance.DisableCursorBlinking))
|
||||
.Append(FormatForCsv(con.Inheritance.Domain))
|
||||
.Append(FormatForCsv(con.Inheritance.Icon))
|
||||
.Append(FormatForCsv(con.Inheritance.Panel))
|
||||
.Append(FormatForCsv(con.Inheritance.Password))
|
||||
.Append(FormatForCsv(con.Inheritance.Port))
|
||||
.Append(FormatForCsv(con.Inheritance.Protocol))
|
||||
.Append(FormatForCsv(con.Inheritance.SSHTunnelConnectionName))
|
||||
.Append(FormatForCsv(con.Inheritance.OpeningCommand))
|
||||
.Append(FormatForCsv(con.Inheritance.SSHOptions))
|
||||
.Append(FormatForCsv(con.Inheritance.PuttySession))
|
||||
.Append(FormatForCsv(con.Inheritance.RedirectDiskDrives))
|
||||
.Append(FormatForCsv(con.Inheritance.RedirectKeys))
|
||||
.Append(FormatForCsv(con.Inheritance.RedirectPorts))
|
||||
.Append(FormatForCsv(con.Inheritance.RedirectPrinters))
|
||||
.Append(FormatForCsv(con.Inheritance.RedirectClipboard))
|
||||
.Append(FormatForCsv(con.Inheritance.RedirectSmartCards))
|
||||
.Append(FormatForCsv(con.Inheritance.RedirectSound))
|
||||
.Append(FormatForCsv(con.Inheritance.Resolution))
|
||||
.Append(FormatForCsv(con.Inheritance.AutomaticResize))
|
||||
.Append(FormatForCsv(con.Inheritance.UseConsoleSession))
|
||||
.Append(FormatForCsv(con.Inheritance.UseCredSsp))
|
||||
.Append(FormatForCsv(con.Inheritance.UseVmId))
|
||||
.Append(FormatForCsv(con.Inheritance.UseEnhancedMode))
|
||||
.Append(FormatForCsv(con.Inheritance.VmId))
|
||||
.Append(FormatForCsv(con.Inheritance.RenderingEngine))
|
||||
.Append(FormatForCsv(con.Inheritance.Username))
|
||||
.Append(FormatForCsv(con.Inheritance.RDPAuthenticationLevel))
|
||||
.Append(FormatForCsv(con.Inheritance.LoadBalanceInfo))
|
||||
.Append(FormatForCsv(con.Inheritance.PreExtApp))
|
||||
.Append(FormatForCsv(con.Inheritance.PostExtApp))
|
||||
.Append(FormatForCsv(con.Inheritance.MacAddress))
|
||||
.Append(FormatForCsv(con.Inheritance.UserField))
|
||||
.Append(FormatForCsv(con.Inheritance.Favorite))
|
||||
.Append(FormatForCsv(con.Inheritance.ExtApp))
|
||||
.Append(FormatForCsv(con.Inheritance.VNCCompression))
|
||||
.Append(FormatForCsv(con.Inheritance.VNCEncoding))
|
||||
.Append(FormatForCsv(con.Inheritance.VNCAuthMode))
|
||||
.Append(FormatForCsv(con.Inheritance.VNCProxyType))
|
||||
.Append(FormatForCsv(con.Inheritance.VNCProxyIP))
|
||||
.Append(FormatForCsv(con.Inheritance.VNCProxyPort))
|
||||
.Append(FormatForCsv(con.Inheritance.VNCProxyUsername))
|
||||
.Append(FormatForCsv(con.Inheritance.VNCProxyPassword))
|
||||
.Append(FormatForCsv(con.Inheritance.VNCColors))
|
||||
.Append(FormatForCsv(con.Inheritance.VNCSmartSizeMode))
|
||||
.Append(FormatForCsv(con.Inheritance.VNCViewOnly))
|
||||
.Append(FormatForCsv(con.Inheritance.RDGatewayUsageMethod))
|
||||
.Append(FormatForCsv(con.Inheritance.RDGatewayHostname))
|
||||
.Append(FormatForCsv(con.Inheritance.RDGatewayUseConnectionCredentials))
|
||||
.Append(FormatForCsv(con.Inheritance.RDGatewayUsername))
|
||||
.Append(FormatForCsv(con.Inheritance.RDGatewayPassword))
|
||||
.Append(FormatForCsv(con.Inheritance.RDGatewayDomain))
|
||||
.Append(FormatForCsv(con.Inheritance.RDPAlertIdleTimeout))
|
||||
.Append(FormatForCsv(con.Inheritance.RDPMinutesToIdleTimeout))
|
||||
.Append(FormatForCsv(con.Inheritance.SoundQuality))
|
||||
.Append(FormatForCsv(con.Inheritance.RedirectAudioCapture))
|
||||
.Append(FormatForCsv(con.Inheritance.RdpVersion));
|
||||
}
|
||||
|
||||
private string FormatForCsv(object value)
|
||||
{
|
||||
var cleanedString = value.ToString().Replace(";", "");
|
||||
return cleanedString + ";";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,261 +1,263 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using System.Security;
|
||||
using mRemoteNG.App;
|
||||
using mRemoteNG.Connection;
|
||||
using mRemoteNG.Connection.Protocol;
|
||||
using mRemoteNG.Connection.Protocol.Http;
|
||||
using mRemoteNG.Connection.Protocol.RDP;
|
||||
using mRemoteNG.Connection.Protocol.VNC;
|
||||
using mRemoteNG.Container;
|
||||
using mRemoteNG.Security;
|
||||
using mRemoteNG.Tools;
|
||||
using mRemoteNG.Tree;
|
||||
using mRemoteNG.Tree.Root;
|
||||
|
||||
namespace mRemoteNG.Config.Serializers.ConnectionSerializers.MsSql
|
||||
{
|
||||
public class DataTableDeserializer : IDeserializer<DataTable, ConnectionTreeModel>
|
||||
{
|
||||
private readonly ICryptographyProvider _cryptographyProvider;
|
||||
private readonly SecureString _decryptionKey;
|
||||
|
||||
public DataTableDeserializer(ICryptographyProvider cryptographyProvider, SecureString decryptionKey)
|
||||
{
|
||||
_cryptographyProvider = cryptographyProvider.ThrowIfNull(nameof(cryptographyProvider));
|
||||
_decryptionKey = decryptionKey.ThrowIfNull(nameof(decryptionKey));
|
||||
}
|
||||
|
||||
public ConnectionTreeModel Deserialize(DataTable table)
|
||||
{
|
||||
var connectionList = CreateNodesFromTable(table);
|
||||
var connectionTreeModel = CreateNodeHierarchy(connectionList, table);
|
||||
Runtime.ConnectionsService.IsConnectionsFileLoaded = true;
|
||||
return connectionTreeModel;
|
||||
}
|
||||
|
||||
private List<ConnectionInfo> CreateNodesFromTable(DataTable table)
|
||||
{
|
||||
var nodeList = new List<ConnectionInfo>();
|
||||
foreach (DataRow row in table.Rows)
|
||||
{
|
||||
// ReSharper disable once SwitchStatementMissingSomeCases
|
||||
switch ((string)row["Type"])
|
||||
{
|
||||
case "Connection":
|
||||
nodeList.Add(DeserializeConnectionInfo(row));
|
||||
break;
|
||||
case "Container":
|
||||
nodeList.Add(DeserializeContainerInfo(row));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return nodeList;
|
||||
}
|
||||
|
||||
private ConnectionInfo DeserializeConnectionInfo(DataRow row)
|
||||
{
|
||||
var connectionId = row["ConstantID"] as string ?? Guid.NewGuid().ToString();
|
||||
var connectionInfo = new ConnectionInfo(connectionId);
|
||||
PopulateConnectionInfoFromDatarow(row, connectionInfo);
|
||||
return connectionInfo;
|
||||
}
|
||||
|
||||
private ContainerInfo DeserializeContainerInfo(DataRow row)
|
||||
{
|
||||
var containerId = row["ConstantID"] as string ?? Guid.NewGuid().ToString();
|
||||
var containerInfo = new ContainerInfo(containerId);
|
||||
PopulateConnectionInfoFromDatarow(row, containerInfo);
|
||||
return containerInfo;
|
||||
}
|
||||
|
||||
private void PopulateConnectionInfoFromDatarow(DataRow dataRow, ConnectionInfo connectionInfo)
|
||||
{
|
||||
connectionInfo.Name = (string)dataRow["Name"];
|
||||
|
||||
// This throws a NPE - Parent is a connectionInfo object which will be null at this point.
|
||||
// The Parent object is linked properly later in CreateNodeHierarchy()
|
||||
//connectionInfo.Parent.ConstantID = (string)dataRow["ParentID"];
|
||||
|
||||
connectionInfo.Description = (string)dataRow["Description"];
|
||||
connectionInfo.Icon = (string)dataRow["Icon"];
|
||||
connectionInfo.Panel = (string)dataRow["Panel"];
|
||||
connectionInfo.Username = (string)dataRow["Username"];
|
||||
connectionInfo.Domain = (string)dataRow["Domain"];
|
||||
connectionInfo.Password = DecryptValue((string)dataRow["Password"]);
|
||||
connectionInfo.Hostname = (string)dataRow["Hostname"];
|
||||
connectionInfo.VmId = (string)dataRow["VmId"];
|
||||
connectionInfo.UseEnhancedMode = (bool)dataRow["UseEnhancedMode"];
|
||||
connectionInfo.Protocol = (ProtocolType)Enum.Parse(typeof(ProtocolType), (string)dataRow["Protocol"]);
|
||||
connectionInfo.SSHTunnelConnectionName = (string)dataRow["SSHTunnelConnectionName"];
|
||||
connectionInfo.OpeningCommand = (string)dataRow["OpeningCommand"];
|
||||
connectionInfo.SSHOptions = (string)dataRow["SSHOptions"];
|
||||
connectionInfo.PuttySession = (string)dataRow["PuttySession"];
|
||||
connectionInfo.Port = (int)dataRow["Port"];
|
||||
connectionInfo.UseConsoleSession = (bool)dataRow["ConnectToConsole"];
|
||||
connectionInfo.UseCredSsp = (bool)dataRow["UseCredSsp"];
|
||||
connectionInfo.UseVmId = (bool)dataRow["UseVmId"];
|
||||
connectionInfo.RenderingEngine = (HTTPBase.RenderingEngine)Enum.Parse(typeof(HTTPBase.RenderingEngine), (string)dataRow["RenderingEngine"]);
|
||||
connectionInfo.RDPAuthenticationLevel = (AuthenticationLevel)Enum.Parse(typeof(AuthenticationLevel), (string)dataRow["RDPAuthenticationLevel"]);
|
||||
connectionInfo.RDPMinutesToIdleTimeout = (int)dataRow["RDPMinutesToIdleTimeout"];
|
||||
connectionInfo.RDPAlertIdleTimeout = (bool)dataRow["RDPAlertIdleTimeout"];
|
||||
connectionInfo.LoadBalanceInfo = (string)dataRow["LoadBalanceInfo"];
|
||||
connectionInfo.Colors = (RDPColors)Enum.Parse(typeof(RDPColors), (string)dataRow["Colors"]);
|
||||
connectionInfo.Resolution = (RDPResolutions)Enum.Parse(typeof(RDPResolutions), (string)dataRow["Resolution"]);
|
||||
connectionInfo.AutomaticResize = (bool)dataRow["AutomaticResize"];
|
||||
connectionInfo.DisplayWallpaper = (bool)dataRow["DisplayWallpaper"];
|
||||
connectionInfo.DisplayThemes = (bool)dataRow["DisplayThemes"];
|
||||
connectionInfo.EnableFontSmoothing = (bool)dataRow["EnableFontSmoothing"];
|
||||
connectionInfo.EnableDesktopComposition = (bool)dataRow["EnableDesktopComposition"];
|
||||
connectionInfo.DisableFullWindowDrag = (bool)dataRow["DisableFullWindowDrag"];
|
||||
connectionInfo.DisableMenuAnimations = (bool)dataRow["DisableMenuAnimations"];
|
||||
connectionInfo.DisableCursorShadow = (bool)dataRow["DisableCursorShadow"];
|
||||
connectionInfo.DisableCursorBlinking = (bool)dataRow["DisableCursorBlinking"];
|
||||
connectionInfo.CacheBitmaps = (bool)dataRow["CacheBitmaps"];
|
||||
connectionInfo.RedirectDiskDrives = (bool)dataRow["RedirectDiskDrives"];
|
||||
connectionInfo.RedirectPorts = (bool)dataRow["RedirectPorts"];
|
||||
connectionInfo.RedirectPrinters = (bool)dataRow["RedirectPrinters"];
|
||||
connectionInfo.RedirectClipboard = (bool)dataRow["RedirectClipboard"];
|
||||
connectionInfo.RedirectSmartCards = (bool)dataRow["RedirectSmartCards"];
|
||||
connectionInfo.RedirectSound = (RDPSounds)Enum.Parse(typeof(RDPSounds), (string)dataRow["RedirectSound"]);
|
||||
connectionInfo.SoundQuality = (RDPSoundQuality)Enum.Parse(typeof(RDPSoundQuality), (string)dataRow["SoundQuality"]);
|
||||
connectionInfo.RedirectAudioCapture = (bool)dataRow["RedirectAudioCapture"];
|
||||
connectionInfo.RedirectKeys = (bool)dataRow["RedirectKeys"];
|
||||
connectionInfo.OpeningCommand = (string)dataRow["OpeningCommand"];
|
||||
connectionInfo.PreExtApp = (string)dataRow["PreExtApp"];
|
||||
connectionInfo.PostExtApp = (string)dataRow["PostExtApp"];
|
||||
connectionInfo.MacAddress = (string)dataRow["MacAddress"];
|
||||
connectionInfo.UserField = (string)dataRow["UserField"];
|
||||
connectionInfo.ExtApp = (string)dataRow["ExtApp"];
|
||||
connectionInfo.VNCCompression = (ProtocolVNC.Compression)Enum.Parse(typeof(ProtocolVNC.Compression), (string)dataRow["VNCCompression"]);
|
||||
connectionInfo.VNCEncoding = (ProtocolVNC.Encoding)Enum.Parse(typeof(ProtocolVNC.Encoding), (string)dataRow["VNCEncoding"]);
|
||||
connectionInfo.VNCAuthMode = (ProtocolVNC.AuthMode)Enum.Parse(typeof(ProtocolVNC.AuthMode), (string)dataRow["VNCAuthMode"]);
|
||||
connectionInfo.VNCProxyType = (ProtocolVNC.ProxyType)Enum.Parse(typeof(ProtocolVNC.ProxyType), (string)dataRow["VNCProxyType"]);
|
||||
connectionInfo.VNCProxyIP = (string)dataRow["VNCProxyIP"];
|
||||
connectionInfo.VNCProxyPort = (int)dataRow["VNCProxyPort"];
|
||||
connectionInfo.VNCProxyUsername = (string)dataRow["VNCProxyUsername"];
|
||||
connectionInfo.VNCProxyPassword = DecryptValue((string)dataRow["VNCProxyPassword"]);
|
||||
connectionInfo.VNCColors = (ProtocolVNC.Colors)Enum.Parse(typeof(ProtocolVNC.Colors), (string)dataRow["VNCColors"]);
|
||||
connectionInfo.VNCSmartSizeMode = (ProtocolVNC.SmartSizeMode)Enum.Parse(typeof(ProtocolVNC.SmartSizeMode), (string)dataRow["VNCSmartSizeMode"]);
|
||||
connectionInfo.VNCViewOnly = (bool)dataRow["VNCViewOnly"];
|
||||
connectionInfo.RDGatewayUsageMethod = (RDGatewayUsageMethod)Enum.Parse(typeof(RDGatewayUsageMethod), (string)dataRow["RDGatewayUsageMethod"]);
|
||||
connectionInfo.RDGatewayHostname = (string)dataRow["RDGatewayHostname"];
|
||||
connectionInfo.RDGatewayUseConnectionCredentials = (RDGatewayUseConnectionCredentials)Enum.Parse(typeof(RDGatewayUseConnectionCredentials), (string)dataRow["RDGatewayUseConnectionCredentials"]);
|
||||
connectionInfo.RDGatewayUsername = (string)dataRow["RDGatewayUsername"];
|
||||
connectionInfo.RDGatewayPassword = DecryptValue((string)dataRow["RDGatewayPassword"]);
|
||||
connectionInfo.RDGatewayDomain = (string)dataRow["RDGatewayDomain"];
|
||||
|
||||
if (!dataRow.IsNull("RdpVersion")) // table allows null values which must be handled
|
||||
if (Enum.TryParse((string)dataRow["RdpVersion"], true, out RdpVersion rdpVersion))
|
||||
connectionInfo.RdpVersion = rdpVersion;
|
||||
|
||||
connectionInfo.Inheritance.CacheBitmaps = (bool)dataRow["InheritCacheBitmaps"];
|
||||
connectionInfo.Inheritance.Colors = (bool)dataRow["InheritColors"];
|
||||
connectionInfo.Inheritance.Description = (bool)dataRow["InheritDescription"];
|
||||
connectionInfo.Inheritance.DisplayThemes = (bool)dataRow["InheritDisplayThemes"];
|
||||
connectionInfo.Inheritance.DisplayWallpaper = (bool)dataRow["InheritDisplayWallpaper"];
|
||||
connectionInfo.Inheritance.EnableFontSmoothing = (bool)dataRow["InheritEnableFontSmoothing"];
|
||||
connectionInfo.Inheritance.EnableDesktopComposition = (bool)dataRow["InheritEnableDesktopComposition"];
|
||||
connectionInfo.Inheritance.DisableFullWindowDrag = (bool)dataRow["InheritDisableFullWindowDrag"];
|
||||
connectionInfo.Inheritance.DisableMenuAnimations = (bool)dataRow["InheritDisableMenuAnimations"];
|
||||
connectionInfo.Inheritance.DisableCursorShadow = (bool)dataRow["InheritDisableCursorShadow"];
|
||||
connectionInfo.Inheritance.DisableCursorBlinking = (bool)dataRow["InheritDisableCursorBlinking"];
|
||||
connectionInfo.Inheritance.Domain = (bool)dataRow["InheritDomain"];
|
||||
connectionInfo.Inheritance.Icon = (bool)dataRow["InheritIcon"];
|
||||
connectionInfo.Inheritance.Panel = (bool)dataRow["InheritPanel"];
|
||||
connectionInfo.Inheritance.Password = (bool)dataRow["InheritPassword"];
|
||||
connectionInfo.Inheritance.Port = (bool)dataRow["InheritPort"];
|
||||
connectionInfo.Inheritance.Protocol = (bool)dataRow["InheritProtocol"];
|
||||
connectionInfo.Inheritance.SSHTunnelConnectionName = (bool)dataRow["InheritSSHTunnelConnectionName"];
|
||||
connectionInfo.Inheritance.OpeningCommand = (bool)dataRow["InheritOpeningCommand"];
|
||||
connectionInfo.Inheritance.SSHOptions = (bool)dataRow["InheritSSHOptions"];
|
||||
connectionInfo.Inheritance.PuttySession = (bool)dataRow["InheritPuttySession"];
|
||||
connectionInfo.Inheritance.RedirectDiskDrives = (bool)dataRow["InheritRedirectDiskDrives"];
|
||||
connectionInfo.Inheritance.RedirectKeys = (bool)dataRow["InheritRedirectKeys"];
|
||||
connectionInfo.Inheritance.RedirectPorts = (bool)dataRow["InheritRedirectPorts"];
|
||||
connectionInfo.Inheritance.RedirectPrinters = (bool)dataRow["InheritRedirectPrinters"];
|
||||
connectionInfo.Inheritance.RedirectClipboard = (bool)dataRow["InheritRedirectClipboard"];
|
||||
connectionInfo.Inheritance.RedirectSmartCards = (bool)dataRow["InheritRedirectSmartCards"];
|
||||
connectionInfo.Inheritance.RedirectSound = (bool)dataRow["InheritRedirectSound"];
|
||||
connectionInfo.Inheritance.SoundQuality = (bool)dataRow["InheritSoundQuality"];
|
||||
connectionInfo.Inheritance.RedirectAudioCapture = (bool)dataRow["InheritRedirectAudioCapture"];
|
||||
connectionInfo.Inheritance.Resolution = (bool)dataRow["InheritResolution"];
|
||||
connectionInfo.Inheritance.AutomaticResize = (bool)dataRow["InheritAutomaticResize"];
|
||||
connectionInfo.Inheritance.UseConsoleSession = (bool)dataRow["InheritUseConsoleSession"];
|
||||
connectionInfo.Inheritance.UseCredSsp = (bool)dataRow["InheritUseCredSsp"];
|
||||
connectionInfo.Inheritance.UseVmId = (bool)dataRow["InheritUseVmId"];
|
||||
connectionInfo.Inheritance.UseEnhancedMode = (bool)dataRow["InheritUseEnhancedMode"];
|
||||
connectionInfo.Inheritance.VmId = (bool)dataRow["InheritVmId"];
|
||||
connectionInfo.Inheritance.RenderingEngine = (bool)dataRow["InheritRenderingEngine"];
|
||||
connectionInfo.Inheritance.Username = (bool)dataRow["InheritUsername"];
|
||||
connectionInfo.Inheritance.RDPAuthenticationLevel = (bool)dataRow["InheritRDPAuthenticationLevel"];
|
||||
connectionInfo.Inheritance.RDPAlertIdleTimeout = (bool)dataRow["InheritRDPAlertIdleTimeout"];
|
||||
connectionInfo.Inheritance.RDPMinutesToIdleTimeout = (bool)dataRow["InheritRDPMinutesToIdleTimeout"];
|
||||
connectionInfo.Inheritance.LoadBalanceInfo = (bool)dataRow["InheritLoadBalanceInfo"];
|
||||
connectionInfo.Inheritance.OpeningCommand = (bool)dataRow["InheritOpeningCommand"];
|
||||
connectionInfo.Inheritance.PreExtApp = (bool)dataRow["InheritPreExtApp"];
|
||||
connectionInfo.Inheritance.PostExtApp = (bool)dataRow["InheritPostExtApp"];
|
||||
connectionInfo.Inheritance.MacAddress = (bool)dataRow["InheritMacAddress"];
|
||||
connectionInfo.Inheritance.UserField = (bool)dataRow["InheritUserField"];
|
||||
connectionInfo.Inheritance.ExtApp = (bool)dataRow["InheritExtApp"];
|
||||
connectionInfo.Inheritance.VNCCompression = (bool)dataRow["InheritVNCCompression"];
|
||||
connectionInfo.Inheritance.VNCEncoding = (bool)dataRow["InheritVNCEncoding"];
|
||||
connectionInfo.Inheritance.VNCAuthMode = (bool)dataRow["InheritVNCAuthMode"];
|
||||
connectionInfo.Inheritance.VNCProxyType = (bool)dataRow["InheritVNCProxyType"];
|
||||
connectionInfo.Inheritance.VNCProxyIP = (bool)dataRow["InheritVNCProxyIP"];
|
||||
connectionInfo.Inheritance.VNCProxyPort = (bool)dataRow["InheritVNCProxyPort"];
|
||||
connectionInfo.Inheritance.VNCProxyUsername = (bool)dataRow["InheritVNCProxyUsername"];
|
||||
connectionInfo.Inheritance.VNCProxyPassword = (bool)dataRow["InheritVNCProxyPassword"];
|
||||
connectionInfo.Inheritance.VNCColors = (bool)dataRow["InheritVNCColors"];
|
||||
connectionInfo.Inheritance.VNCSmartSizeMode = (bool)dataRow["InheritVNCSmartSizeMode"];
|
||||
connectionInfo.Inheritance.VNCViewOnly = (bool)dataRow["InheritVNCViewOnly"];
|
||||
connectionInfo.Inheritance.RDGatewayUsageMethod = (bool)dataRow["InheritRDGatewayUsageMethod"];
|
||||
connectionInfo.Inheritance.RDGatewayHostname = (bool)dataRow["InheritRDGatewayHostname"];
|
||||
connectionInfo.Inheritance.RDGatewayUseConnectionCredentials = (bool)dataRow["InheritRDGatewayUseConnectionCredentials"];
|
||||
connectionInfo.Inheritance.RDGatewayUsername = (bool)dataRow["InheritRDGatewayUsername"];
|
||||
connectionInfo.Inheritance.RDGatewayPassword = (bool)dataRow["InheritRDGatewayPassword"];
|
||||
connectionInfo.Inheritance.RDGatewayDomain = (bool)dataRow["InheritRDGatewayDomain"];
|
||||
connectionInfo.Inheritance.RdpVersion = (bool)dataRow["InheritRdpVersion"];
|
||||
}
|
||||
|
||||
private string DecryptValue(string cipherText)
|
||||
{
|
||||
try
|
||||
{
|
||||
return _cryptographyProvider.Decrypt(cipherText, _decryptionKey);
|
||||
}
|
||||
catch (EncryptionException)
|
||||
{
|
||||
// value may not be encrypted
|
||||
return cipherText;
|
||||
}
|
||||
}
|
||||
|
||||
private ConnectionTreeModel CreateNodeHierarchy(List<ConnectionInfo> connectionList, DataTable dataTable)
|
||||
{
|
||||
var connectionTreeModel = new ConnectionTreeModel();
|
||||
var rootNode = new RootNodeInfo(RootNodeType.Connection, "0")
|
||||
{
|
||||
PasswordString = _decryptionKey.ConvertToUnsecureString()
|
||||
};
|
||||
connectionTreeModel.AddRootNode(rootNode);
|
||||
|
||||
foreach (DataRow row in dataTable.Rows)
|
||||
{
|
||||
var id = (string)row["ConstantID"];
|
||||
var connectionInfo = connectionList.First(node => node.ConstantID == id);
|
||||
var parentId = (string)row["ParentID"];
|
||||
if (parentId == "0" || connectionList.All(node => node.ConstantID != parentId))
|
||||
rootNode.AddChild(connectionInfo);
|
||||
else
|
||||
(connectionList.First(node => node.ConstantID == parentId) as ContainerInfo)?.AddChild(
|
||||
connectionInfo);
|
||||
}
|
||||
|
||||
return connectionTreeModel;
|
||||
}
|
||||
}
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using System.Security;
|
||||
using mRemoteNG.App;
|
||||
using mRemoteNG.Connection;
|
||||
using mRemoteNG.Connection.Protocol;
|
||||
using mRemoteNG.Connection.Protocol.Http;
|
||||
using mRemoteNG.Connection.Protocol.RDP;
|
||||
using mRemoteNG.Connection.Protocol.VNC;
|
||||
using mRemoteNG.Container;
|
||||
using mRemoteNG.Security;
|
||||
using mRemoteNG.Tools;
|
||||
using mRemoteNG.Tree;
|
||||
using mRemoteNG.Tree.Root;
|
||||
|
||||
namespace mRemoteNG.Config.Serializers.ConnectionSerializers.MsSql
|
||||
{
|
||||
public class DataTableDeserializer : IDeserializer<DataTable, ConnectionTreeModel>
|
||||
{
|
||||
private readonly ICryptographyProvider _cryptographyProvider;
|
||||
private readonly SecureString _decryptionKey;
|
||||
|
||||
public DataTableDeserializer(ICryptographyProvider cryptographyProvider, SecureString decryptionKey)
|
||||
{
|
||||
_cryptographyProvider = cryptographyProvider.ThrowIfNull(nameof(cryptographyProvider));
|
||||
_decryptionKey = decryptionKey.ThrowIfNull(nameof(decryptionKey));
|
||||
}
|
||||
|
||||
public ConnectionTreeModel Deserialize(DataTable table)
|
||||
{
|
||||
var connectionList = CreateNodesFromTable(table);
|
||||
var connectionTreeModel = CreateNodeHierarchy(connectionList, table);
|
||||
Runtime.ConnectionsService.IsConnectionsFileLoaded = true;
|
||||
return connectionTreeModel;
|
||||
}
|
||||
|
||||
private List<ConnectionInfo> CreateNodesFromTable(DataTable table)
|
||||
{
|
||||
var nodeList = new List<ConnectionInfo>();
|
||||
foreach (DataRow row in table.Rows)
|
||||
{
|
||||
// ReSharper disable once SwitchStatementMissingSomeCases
|
||||
switch ((string)row["Type"])
|
||||
{
|
||||
case "Connection":
|
||||
nodeList.Add(DeserializeConnectionInfo(row));
|
||||
break;
|
||||
case "Container":
|
||||
nodeList.Add(DeserializeContainerInfo(row));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return nodeList;
|
||||
}
|
||||
|
||||
private ConnectionInfo DeserializeConnectionInfo(DataRow row)
|
||||
{
|
||||
var connectionId = row["ConstantID"] as string ?? Guid.NewGuid().ToString();
|
||||
var connectionInfo = new ConnectionInfo(connectionId);
|
||||
PopulateConnectionInfoFromDatarow(row, connectionInfo);
|
||||
return connectionInfo;
|
||||
}
|
||||
|
||||
private ContainerInfo DeserializeContainerInfo(DataRow row)
|
||||
{
|
||||
var containerId = row["ConstantID"] as string ?? Guid.NewGuid().ToString();
|
||||
var containerInfo = new ContainerInfo(containerId);
|
||||
PopulateConnectionInfoFromDatarow(row, containerInfo);
|
||||
return containerInfo;
|
||||
}
|
||||
|
||||
private void PopulateConnectionInfoFromDatarow(DataRow dataRow, ConnectionInfo connectionInfo)
|
||||
{
|
||||
connectionInfo.Name = (string)dataRow["Name"];
|
||||
|
||||
// This throws a NPE - Parent is a connectionInfo object which will be null at this point.
|
||||
// The Parent object is linked properly later in CreateNodeHierarchy()
|
||||
//connectionInfo.Parent.ConstantID = (string)dataRow["ParentID"];
|
||||
|
||||
connectionInfo.Description = (string)dataRow["Description"];
|
||||
connectionInfo.Icon = (string)dataRow["Icon"];
|
||||
connectionInfo.Panel = (string)dataRow["Panel"];
|
||||
connectionInfo.Username = (string)dataRow["Username"];
|
||||
connectionInfo.Domain = (string)dataRow["Domain"];
|
||||
connectionInfo.Password = DecryptValue((string)dataRow["Password"]);
|
||||
connectionInfo.Hostname = (string)dataRow["Hostname"];
|
||||
connectionInfo.VmId = (string)dataRow["VmId"];
|
||||
connectionInfo.UseEnhancedMode = (bool)dataRow["UseEnhancedMode"];
|
||||
connectionInfo.Protocol = (ProtocolType)Enum.Parse(typeof(ProtocolType), (string)dataRow["Protocol"]);
|
||||
connectionInfo.SSHTunnelConnectionName = (string)dataRow["SSHTunnelConnectionName"];
|
||||
connectionInfo.OpeningCommand = (string)dataRow["OpeningCommand"];
|
||||
connectionInfo.SSHOptions = (string)dataRow["SSHOptions"];
|
||||
connectionInfo.PuttySession = (string)dataRow["PuttySession"];
|
||||
connectionInfo.Port = (int)dataRow["Port"];
|
||||
connectionInfo.UseConsoleSession = (bool)dataRow["ConnectToConsole"];
|
||||
connectionInfo.UseCredSsp = (bool)dataRow["UseCredSsp"];
|
||||
connectionInfo.UseVmId = (bool)dataRow["UseVmId"];
|
||||
connectionInfo.RenderingEngine = (HTTPBase.RenderingEngine)Enum.Parse(typeof(HTTPBase.RenderingEngine), (string)dataRow["RenderingEngine"]);
|
||||
connectionInfo.RDPAuthenticationLevel = (AuthenticationLevel)Enum.Parse(typeof(AuthenticationLevel), (string)dataRow["RDPAuthenticationLevel"]);
|
||||
connectionInfo.RDPMinutesToIdleTimeout = (int)dataRow["RDPMinutesToIdleTimeout"];
|
||||
connectionInfo.RDPAlertIdleTimeout = (bool)dataRow["RDPAlertIdleTimeout"];
|
||||
connectionInfo.LoadBalanceInfo = (string)dataRow["LoadBalanceInfo"];
|
||||
connectionInfo.Colors = (RDPColors)Enum.Parse(typeof(RDPColors), (string)dataRow["Colors"]);
|
||||
connectionInfo.Resolution = (RDPResolutions)Enum.Parse(typeof(RDPResolutions), (string)dataRow["Resolution"]);
|
||||
connectionInfo.AutomaticResize = (bool)dataRow["AutomaticResize"];
|
||||
connectionInfo.DisplayWallpaper = (bool)dataRow["DisplayWallpaper"];
|
||||
connectionInfo.DisplayThemes = (bool)dataRow["DisplayThemes"];
|
||||
connectionInfo.EnableFontSmoothing = (bool)dataRow["EnableFontSmoothing"];
|
||||
connectionInfo.EnableDesktopComposition = (bool)dataRow["EnableDesktopComposition"];
|
||||
connectionInfo.DisableFullWindowDrag = (bool)dataRow["DisableFullWindowDrag"];
|
||||
connectionInfo.DisableMenuAnimations = (bool)dataRow["DisableMenuAnimations"];
|
||||
connectionInfo.DisableCursorShadow = (bool)dataRow["DisableCursorShadow"];
|
||||
connectionInfo.DisableCursorBlinking = (bool)dataRow["DisableCursorBlinking"];
|
||||
connectionInfo.CacheBitmaps = (bool)dataRow["CacheBitmaps"];
|
||||
connectionInfo.RedirectDiskDrives = (bool)dataRow["RedirectDiskDrives"];
|
||||
connectionInfo.RedirectPorts = (bool)dataRow["RedirectPorts"];
|
||||
connectionInfo.RedirectPrinters = (bool)dataRow["RedirectPrinters"];
|
||||
connectionInfo.RedirectClipboard = (bool)dataRow["RedirectClipboard"];
|
||||
connectionInfo.RedirectSmartCards = (bool)dataRow["RedirectSmartCards"];
|
||||
connectionInfo.RedirectSound = (RDPSounds)Enum.Parse(typeof(RDPSounds), (string)dataRow["RedirectSound"]);
|
||||
connectionInfo.SoundQuality = (RDPSoundQuality)Enum.Parse(typeof(RDPSoundQuality), (string)dataRow["SoundQuality"]);
|
||||
connectionInfo.RedirectAudioCapture = (bool)dataRow["RedirectAudioCapture"];
|
||||
connectionInfo.StartProgram = (string)dataRow["StartProgram"];
|
||||
connectionInfo.StartProgramWorkDir = (string)dataRow["StartProgramWorkDir"];
|
||||
connectionInfo.RedirectKeys = (bool)dataRow["RedirectKeys"];
|
||||
connectionInfo.OpeningCommand = (string)dataRow["OpeningCommand"];
|
||||
connectionInfo.PreExtApp = (string)dataRow["PreExtApp"];
|
||||
connectionInfo.PostExtApp = (string)dataRow["PostExtApp"];
|
||||
connectionInfo.MacAddress = (string)dataRow["MacAddress"];
|
||||
connectionInfo.UserField = (string)dataRow["UserField"];
|
||||
connectionInfo.ExtApp = (string)dataRow["ExtApp"];
|
||||
connectionInfo.VNCCompression = (ProtocolVNC.Compression)Enum.Parse(typeof(ProtocolVNC.Compression), (string)dataRow["VNCCompression"]);
|
||||
connectionInfo.VNCEncoding = (ProtocolVNC.Encoding)Enum.Parse(typeof(ProtocolVNC.Encoding), (string)dataRow["VNCEncoding"]);
|
||||
connectionInfo.VNCAuthMode = (ProtocolVNC.AuthMode)Enum.Parse(typeof(ProtocolVNC.AuthMode), (string)dataRow["VNCAuthMode"]);
|
||||
connectionInfo.VNCProxyType = (ProtocolVNC.ProxyType)Enum.Parse(typeof(ProtocolVNC.ProxyType), (string)dataRow["VNCProxyType"]);
|
||||
connectionInfo.VNCProxyIP = (string)dataRow["VNCProxyIP"];
|
||||
connectionInfo.VNCProxyPort = (int)dataRow["VNCProxyPort"];
|
||||
connectionInfo.VNCProxyUsername = (string)dataRow["VNCProxyUsername"];
|
||||
connectionInfo.VNCProxyPassword = DecryptValue((string)dataRow["VNCProxyPassword"]);
|
||||
connectionInfo.VNCColors = (ProtocolVNC.Colors)Enum.Parse(typeof(ProtocolVNC.Colors), (string)dataRow["VNCColors"]);
|
||||
connectionInfo.VNCSmartSizeMode = (ProtocolVNC.SmartSizeMode)Enum.Parse(typeof(ProtocolVNC.SmartSizeMode), (string)dataRow["VNCSmartSizeMode"]);
|
||||
connectionInfo.VNCViewOnly = (bool)dataRow["VNCViewOnly"];
|
||||
connectionInfo.RDGatewayUsageMethod = (RDGatewayUsageMethod)Enum.Parse(typeof(RDGatewayUsageMethod), (string)dataRow["RDGatewayUsageMethod"]);
|
||||
connectionInfo.RDGatewayHostname = (string)dataRow["RDGatewayHostname"];
|
||||
connectionInfo.RDGatewayUseConnectionCredentials = (RDGatewayUseConnectionCredentials)Enum.Parse(typeof(RDGatewayUseConnectionCredentials), (string)dataRow["RDGatewayUseConnectionCredentials"]);
|
||||
connectionInfo.RDGatewayUsername = (string)dataRow["RDGatewayUsername"];
|
||||
connectionInfo.RDGatewayPassword = DecryptValue((string)dataRow["RDGatewayPassword"]);
|
||||
connectionInfo.RDGatewayDomain = (string)dataRow["RDGatewayDomain"];
|
||||
|
||||
if (!dataRow.IsNull("RdpVersion")) // table allows null values which must be handled
|
||||
if (Enum.TryParse((string)dataRow["RdpVersion"], true, out RdpVersion rdpVersion))
|
||||
connectionInfo.RdpVersion = rdpVersion;
|
||||
|
||||
connectionInfo.Inheritance.CacheBitmaps = (bool)dataRow["InheritCacheBitmaps"];
|
||||
connectionInfo.Inheritance.Colors = (bool)dataRow["InheritColors"];
|
||||
connectionInfo.Inheritance.Description = (bool)dataRow["InheritDescription"];
|
||||
connectionInfo.Inheritance.DisplayThemes = (bool)dataRow["InheritDisplayThemes"];
|
||||
connectionInfo.Inheritance.DisplayWallpaper = (bool)dataRow["InheritDisplayWallpaper"];
|
||||
connectionInfo.Inheritance.EnableFontSmoothing = (bool)dataRow["InheritEnableFontSmoothing"];
|
||||
connectionInfo.Inheritance.EnableDesktopComposition = (bool)dataRow["InheritEnableDesktopComposition"];
|
||||
connectionInfo.Inheritance.DisableFullWindowDrag = (bool)dataRow["InheritDisableFullWindowDrag"];
|
||||
connectionInfo.Inheritance.DisableMenuAnimations = (bool)dataRow["InheritDisableMenuAnimations"];
|
||||
connectionInfo.Inheritance.DisableCursorShadow = (bool)dataRow["InheritDisableCursorShadow"];
|
||||
connectionInfo.Inheritance.DisableCursorBlinking = (bool)dataRow["InheritDisableCursorBlinking"];
|
||||
connectionInfo.Inheritance.Domain = (bool)dataRow["InheritDomain"];
|
||||
connectionInfo.Inheritance.Icon = (bool)dataRow["InheritIcon"];
|
||||
connectionInfo.Inheritance.Panel = (bool)dataRow["InheritPanel"];
|
||||
connectionInfo.Inheritance.Password = (bool)dataRow["InheritPassword"];
|
||||
connectionInfo.Inheritance.Port = (bool)dataRow["InheritPort"];
|
||||
connectionInfo.Inheritance.Protocol = (bool)dataRow["InheritProtocol"];
|
||||
connectionInfo.Inheritance.SSHTunnelConnectionName = (bool)dataRow["InheritSSHTunnelConnectionName"];
|
||||
connectionInfo.Inheritance.OpeningCommand = (bool)dataRow["InheritOpeningCommand"];
|
||||
connectionInfo.Inheritance.SSHOptions = (bool)dataRow["InheritSSHOptions"];
|
||||
connectionInfo.Inheritance.PuttySession = (bool)dataRow["InheritPuttySession"];
|
||||
connectionInfo.Inheritance.RedirectDiskDrives = (bool)dataRow["InheritRedirectDiskDrives"];
|
||||
connectionInfo.Inheritance.RedirectKeys = (bool)dataRow["InheritRedirectKeys"];
|
||||
connectionInfo.Inheritance.RedirectPorts = (bool)dataRow["InheritRedirectPorts"];
|
||||
connectionInfo.Inheritance.RedirectPrinters = (bool)dataRow["InheritRedirectPrinters"];
|
||||
connectionInfo.Inheritance.RedirectClipboard = (bool)dataRow["InheritRedirectClipboard"];
|
||||
connectionInfo.Inheritance.RedirectSmartCards = (bool)dataRow["InheritRedirectSmartCards"];
|
||||
connectionInfo.Inheritance.RedirectSound = (bool)dataRow["InheritRedirectSound"];
|
||||
connectionInfo.Inheritance.SoundQuality = (bool)dataRow["InheritSoundQuality"];
|
||||
connectionInfo.Inheritance.RedirectAudioCapture = (bool)dataRow["InheritRedirectAudioCapture"];
|
||||
connectionInfo.Inheritance.Resolution = (bool)dataRow["InheritResolution"];
|
||||
connectionInfo.Inheritance.AutomaticResize = (bool)dataRow["InheritAutomaticResize"];
|
||||
connectionInfo.Inheritance.UseConsoleSession = (bool)dataRow["InheritUseConsoleSession"];
|
||||
connectionInfo.Inheritance.UseCredSsp = (bool)dataRow["InheritUseCredSsp"];
|
||||
connectionInfo.Inheritance.UseVmId = (bool)dataRow["InheritUseVmId"];
|
||||
connectionInfo.Inheritance.UseEnhancedMode = (bool)dataRow["InheritUseEnhancedMode"];
|
||||
connectionInfo.Inheritance.VmId = (bool)dataRow["InheritVmId"];
|
||||
connectionInfo.Inheritance.RenderingEngine = (bool)dataRow["InheritRenderingEngine"];
|
||||
connectionInfo.Inheritance.Username = (bool)dataRow["InheritUsername"];
|
||||
connectionInfo.Inheritance.RDPAuthenticationLevel = (bool)dataRow["InheritRDPAuthenticationLevel"];
|
||||
connectionInfo.Inheritance.RDPAlertIdleTimeout = (bool)dataRow["InheritRDPAlertIdleTimeout"];
|
||||
connectionInfo.Inheritance.RDPMinutesToIdleTimeout = (bool)dataRow["InheritRDPMinutesToIdleTimeout"];
|
||||
connectionInfo.Inheritance.LoadBalanceInfo = (bool)dataRow["InheritLoadBalanceInfo"];
|
||||
connectionInfo.Inheritance.OpeningCommand = (bool)dataRow["InheritOpeningCommand"];
|
||||
connectionInfo.Inheritance.PreExtApp = (bool)dataRow["InheritPreExtApp"];
|
||||
connectionInfo.Inheritance.PostExtApp = (bool)dataRow["InheritPostExtApp"];
|
||||
connectionInfo.Inheritance.MacAddress = (bool)dataRow["InheritMacAddress"];
|
||||
connectionInfo.Inheritance.UserField = (bool)dataRow["InheritUserField"];
|
||||
connectionInfo.Inheritance.ExtApp = (bool)dataRow["InheritExtApp"];
|
||||
connectionInfo.Inheritance.VNCCompression = (bool)dataRow["InheritVNCCompression"];
|
||||
connectionInfo.Inheritance.VNCEncoding = (bool)dataRow["InheritVNCEncoding"];
|
||||
connectionInfo.Inheritance.VNCAuthMode = (bool)dataRow["InheritVNCAuthMode"];
|
||||
connectionInfo.Inheritance.VNCProxyType = (bool)dataRow["InheritVNCProxyType"];
|
||||
connectionInfo.Inheritance.VNCProxyIP = (bool)dataRow["InheritVNCProxyIP"];
|
||||
connectionInfo.Inheritance.VNCProxyPort = (bool)dataRow["InheritVNCProxyPort"];
|
||||
connectionInfo.Inheritance.VNCProxyUsername = (bool)dataRow["InheritVNCProxyUsername"];
|
||||
connectionInfo.Inheritance.VNCProxyPassword = (bool)dataRow["InheritVNCProxyPassword"];
|
||||
connectionInfo.Inheritance.VNCColors = (bool)dataRow["InheritVNCColors"];
|
||||
connectionInfo.Inheritance.VNCSmartSizeMode = (bool)dataRow["InheritVNCSmartSizeMode"];
|
||||
connectionInfo.Inheritance.VNCViewOnly = (bool)dataRow["InheritVNCViewOnly"];
|
||||
connectionInfo.Inheritance.RDGatewayUsageMethod = (bool)dataRow["InheritRDGatewayUsageMethod"];
|
||||
connectionInfo.Inheritance.RDGatewayHostname = (bool)dataRow["InheritRDGatewayHostname"];
|
||||
connectionInfo.Inheritance.RDGatewayUseConnectionCredentials = (bool)dataRow["InheritRDGatewayUseConnectionCredentials"];
|
||||
connectionInfo.Inheritance.RDGatewayUsername = (bool)dataRow["InheritRDGatewayUsername"];
|
||||
connectionInfo.Inheritance.RDGatewayPassword = (bool)dataRow["InheritRDGatewayPassword"];
|
||||
connectionInfo.Inheritance.RDGatewayDomain = (bool)dataRow["InheritRDGatewayDomain"];
|
||||
connectionInfo.Inheritance.RdpVersion = (bool)dataRow["InheritRdpVersion"];
|
||||
}
|
||||
|
||||
private string DecryptValue(string cipherText)
|
||||
{
|
||||
try
|
||||
{
|
||||
return _cryptographyProvider.Decrypt(cipherText, _decryptionKey);
|
||||
}
|
||||
catch (EncryptionException)
|
||||
{
|
||||
// value may not be encrypted
|
||||
return cipherText;
|
||||
}
|
||||
}
|
||||
|
||||
private ConnectionTreeModel CreateNodeHierarchy(List<ConnectionInfo> connectionList, DataTable dataTable)
|
||||
{
|
||||
var connectionTreeModel = new ConnectionTreeModel();
|
||||
var rootNode = new RootNodeInfo(RootNodeType.Connection, "0")
|
||||
{
|
||||
PasswordString = _decryptionKey.ConvertToUnsecureString()
|
||||
};
|
||||
connectionTreeModel.AddRootNode(rootNode);
|
||||
|
||||
foreach (DataRow row in dataTable.Rows)
|
||||
{
|
||||
var id = (string)row["ConstantID"];
|
||||
var connectionInfo = connectionList.First(node => node.ConstantID == id);
|
||||
var parentId = (string)row["ParentID"];
|
||||
if (parentId == "0" || connectionList.All(node => node.ConstantID != parentId))
|
||||
rootNode.AddChild(connectionInfo);
|
||||
else
|
||||
(connectionList.First(node => node.ConstantID == parentId) as ContainerInfo)?.AddChild(
|
||||
connectionInfo);
|
||||
}
|
||||
|
||||
return connectionTreeModel;
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -80,9 +80,9 @@ namespace mRemoteNG.Config.Serializers.ConnectionSerializers.MsSql
|
||||
if (rootTreeNode != null)
|
||||
{
|
||||
cmd = databaseConnector.DbCommand(
|
||||
"INSERT INTO tblRoot (Name, Export, Protected, ConfVersion) VALUES(\'" +
|
||||
MiscTools.PrepareValueForDB(rootTreeNode.Name) + "\', 0, \'" + strProtected + "\'," +
|
||||
ConnectionsFileInfo.ConnectionFileVersion.ToString(CultureInfo.InvariantCulture) + ")");
|
||||
"INSERT INTO tblRoot (Name, Export, Protected, ConfVersion) VALUES('" +
|
||||
MiscTools.PrepareValueForDB(rootTreeNode.Name) + "', 0, '" + strProtected + "','" +
|
||||
ConnectionsFileInfo.ConnectionFileVersion.ToString() + "')");
|
||||
cmd.ExecuteNonQuery();
|
||||
}
|
||||
else
|
||||
|
||||
@@ -116,6 +116,7 @@ namespace mRemoteNG.Config.Serializers.ConnectionSerializers.Xml
|
||||
element.Add(new XAttribute("Favorite", connectionInfo.Favorite));
|
||||
element.Add(new XAttribute("ExtApp", connectionInfo.ExtApp));
|
||||
element.Add(new XAttribute("StartProgram", connectionInfo.StartProgram));
|
||||
element.Add(new XAttribute("StartProgramWorkDir", connectionInfo.StartProgramWorkDir));
|
||||
element.Add(new XAttribute("VNCCompression", connectionInfo.VNCCompression));
|
||||
element.Add(new XAttribute("VNCEncoding", connectionInfo.VNCEncoding));
|
||||
element.Add(new XAttribute("VNCAuthMode", connectionInfo.VNCAuthMode));
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -8,7 +8,9 @@ using System;
|
||||
namespace mRemoteNG.Config.Serializers.Versioning
|
||||
{
|
||||
public class SqlDatabaseVersionVerifier
|
||||
{
|
||||
{
|
||||
protected readonly Version currentSupportedVersion = new Version(2, 9);
|
||||
|
||||
private readonly IDatabaseConnector _databaseConnector;
|
||||
|
||||
public SqlDatabaseVersionVerifier(IDatabaseConnector DatabaseConnector)
|
||||
@@ -39,6 +41,7 @@ namespace mRemoteNG.Config.Serializers.Versioning
|
||||
new SqlVersion25To26Upgrader(_databaseConnector),
|
||||
new SqlVersion26To27Upgrader(_databaseConnector),
|
||||
new SqlVersion27To28Upgrader(_databaseConnector),
|
||||
new SqlVersion28To29Upgrader(_databaseConnector),
|
||||
};
|
||||
|
||||
foreach (var upgrader in dbUpgraders)
|
||||
@@ -50,7 +53,7 @@ namespace mRemoteNG.Config.Serializers.Versioning
|
||||
}
|
||||
|
||||
// DB is at the highest current supported version
|
||||
if (databaseVersion.CompareTo(new Version(2, 8)) == 0)
|
||||
if (databaseVersion.CompareTo(currentSupportedVersion) == 0)
|
||||
isVerified = true;
|
||||
|
||||
if (isVerified == false)
|
||||
|
||||
@@ -0,0 +1,80 @@
|
||||
using mRemoteNG.App;
|
||||
using mRemoteNG.Config.DatabaseConnectors;
|
||||
using mRemoteNG.Messages;
|
||||
using System;
|
||||
using System.Data.Common;
|
||||
|
||||
namespace mRemoteNG.Config.Serializers.Versioning
|
||||
{
|
||||
public class SqlVersion28To29Upgrader : IVersionUpgrader
|
||||
{
|
||||
private readonly Version version = new Version(2, 9);
|
||||
private readonly IDatabaseConnector _databaseConnector;
|
||||
|
||||
public SqlVersion28To29Upgrader(IDatabaseConnector databaseConnector)
|
||||
{
|
||||
_databaseConnector = databaseConnector ?? throw new ArgumentNullException(nameof(databaseConnector));
|
||||
}
|
||||
|
||||
public bool CanUpgrade(Version currentVersion)
|
||||
{
|
||||
return currentVersion == new Version(2, 8) ||
|
||||
// Support upgrading during dev revisions, 2.9.1, 2.9.2, etc...
|
||||
(currentVersion <= new Version(2, 9) &&
|
||||
currentVersion < version);
|
||||
}
|
||||
|
||||
public Version Upgrade()
|
||||
{
|
||||
Runtime.MessageCollector.AddMessage(MessageClass.InformationMsg,
|
||||
string.Format("Upgrading database to version {0}.", version));
|
||||
|
||||
const string mySqlAlter = @"
|
||||
ALTER TABLE tblCons ADD COLUMN StartProgram varchar(512) DEFAULT NULL;
|
||||
ALTER TABLE tblCons ADD COLUMN StartProgramWorkDir varchar(512) DEFAULT NULL;
|
||||
ALTER TABLE tblRoot CHANGE COLUMN ConfVersion ConfVersion VARCHAR(15) NOT NULL;";
|
||||
const string mySqlUpdate = @"UPDATE tblRoot SET ConfVersion=?;";
|
||||
const string msSqlAlter = @"
|
||||
IF NOT EXISTS (SELECT * FROM sys.columns WHERE object_id = OBJECT_ID(N'[dbo].[tblCons]') AND name = 'StartProgram')
|
||||
BEGIN
|
||||
ALTER TABLE tblCons ADD StartProgram varchar(512), StartProgramWorkDir varchar(512);
|
||||
END;GO;
|
||||
ALTER TABLE tblRoot MODIFY COLUMN ConfVersion varchar(15);GO;";
|
||||
const string msSqlUpdate = @"UPDATE tblRoot SET ConfVersion=@confVersion;";
|
||||
using (var sqlTran = _databaseConnector.DbConnection().BeginTransaction(System.Data.IsolationLevel.Serializable))
|
||||
{
|
||||
DbCommand dbCommand;
|
||||
if (_databaseConnector.GetType() == typeof(MSSqlDatabaseConnector))
|
||||
{
|
||||
dbCommand = _databaseConnector.DbCommand(msSqlAlter);
|
||||
dbCommand.Transaction = sqlTran;
|
||||
dbCommand.ExecuteNonQuery();
|
||||
dbCommand = _databaseConnector.DbCommand(msSqlUpdate);
|
||||
dbCommand.Transaction = sqlTran;
|
||||
}
|
||||
else if (_databaseConnector.GetType() == typeof(MySqlDatabaseConnector))
|
||||
{
|
||||
dbCommand = _databaseConnector.DbCommand(mySqlAlter);
|
||||
dbCommand.Transaction = sqlTran;
|
||||
dbCommand.ExecuteNonQuery();
|
||||
dbCommand = _databaseConnector.DbCommand(mySqlUpdate);
|
||||
dbCommand.Transaction = sqlTran;
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new Exception("Unknown database back-end");
|
||||
}
|
||||
var pConfVersion = dbCommand.CreateParameter();
|
||||
pConfVersion.ParameterName = "confVersion";
|
||||
pConfVersion.Value = version.ToString();
|
||||
pConfVersion.DbType = System.Data.DbType.String;
|
||||
pConfVersion.Direction = System.Data.ParameterDirection.Input;
|
||||
dbCommand.Parameters.Add(pConfVersion);
|
||||
|
||||
dbCommand.ExecuteNonQuery();
|
||||
sqlTran.Commit();
|
||||
}
|
||||
return version;
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -65,7 +65,8 @@ namespace mRemoteNG.Connection
|
||||
{
|
||||
SetTreeDisplayDefaults();
|
||||
SetConnectionDefaults();
|
||||
SetProtocolDefaults();
|
||||
SetProtocolDefaults();
|
||||
SetRemoteDesktopServicesDefaults();
|
||||
SetRdGatewayDefaults();
|
||||
SetAppearanceDefaults();
|
||||
SetRedirectDefaults();
|
||||
@@ -308,6 +309,12 @@ namespace mRemoteNG.Connection
|
||||
UseCredSsp = Settings.Default.ConDefaultUseCredSsp;
|
||||
UseVmId = Settings.Default.ConDefaultUseVmId;
|
||||
UseEnhancedMode = Settings.Default.ConDefaultUseEnhancedMode;
|
||||
}
|
||||
|
||||
private void SetRemoteDesktopServicesDefaults()
|
||||
{
|
||||
StartProgram = string.Empty;
|
||||
StartProgramWorkDir = string.Empty;
|
||||
}
|
||||
|
||||
private void SetRdGatewayDefaults()
|
||||
|
||||
@@ -285,9 +285,14 @@ namespace mRemoteNG.Connection.Protocol.RDP
|
||||
_rdpClient.FullScreenTitle = connectionInfo.Name;
|
||||
|
||||
_alertOnIdleDisconnect = connectionInfo.RDPAlertIdleTimeout;
|
||||
_rdpClient.AdvancedSettings2.MinutesToIdleTimeout = connectionInfo.RDPMinutesToIdleTimeout;
|
||||
|
||||
//not user changeable
|
||||
_rdpClient.AdvancedSettings2.MinutesToIdleTimeout = connectionInfo.RDPMinutesToIdleTimeout;
|
||||
|
||||
#region Remote Desktop Services
|
||||
_rdpClient.SecuredSettings2.StartProgram = connectionInfo.StartProgram;
|
||||
_rdpClient.SecuredSettings2.WorkDir = connectionInfo.StartProgramWorkDir;
|
||||
#endregion
|
||||
|
||||
//not user changeable
|
||||
_rdpClient.AdvancedSettings2.GrabFocusOnConnect = true;
|
||||
_rdpClient.AdvancedSettings3.EnableAutoReconnect = true;
|
||||
_rdpClient.AdvancedSettings3.MaxReconnectAttempts = Settings.Default.RdpReconnectionCount;
|
||||
@@ -297,8 +302,6 @@ namespace mRemoteNG.Connection.Protocol.RDP
|
||||
|
||||
_rdpClient.AdvancedSettings2.overallConnectionTimeout = Settings.Default.ConRDPOverallConnectionTimeout;
|
||||
|
||||
_rdpClient.SecuredSettings2.StartProgram = connectionInfo.StartProgram;
|
||||
|
||||
_rdpClient.AdvancedSettings2.BitmapPeristence = Convert.ToInt32(connectionInfo.CacheBitmaps);
|
||||
if (_rdpVersion >= Versions.RDC61)
|
||||
{
|
||||
|
||||
12566
mRemoteNG/Language/Language.Designer.cs
generated
12566
mRemoteNG/Language/Language.Designer.cs
generated
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
6436
mRemoteNG/Properties/Settings.Designer.cs
generated
6436
mRemoteNG/Properties/Settings.Designer.cs
generated
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -8,167 +8,168 @@
|
||||
xmlns:xs="http://www.w3.org/2001/XMLSchema">
|
||||
|
||||
|
||||
<xs:element name="Connections">
|
||||
<xs:complexType>
|
||||
<xs:sequence minOccurs="0" maxOccurs="unbounded">
|
||||
<xs:element name="Node" type="mrng:connectioninfo" />
|
||||
</xs:sequence>
|
||||
<xs:attribute name="Name" type="xs:string" use="required" />
|
||||
<xs:attribute name="Export" type="xs:boolean" use="required" />
|
||||
<xs:attribute name="EncryptionEngine" type="xs:string" use="required" />
|
||||
<xs:attribute name="BlockCipherMode" type="xs:string" use="required" />
|
||||
<xs:attribute name="KdfIterations" type="xs:int" use="optional" />
|
||||
<xs:attribute name="FullFileEncryption" type="xs:boolean" use="required" />
|
||||
<xs:attribute name="Protected" type="xs:string" use="required" />
|
||||
<xs:attribute name="ConfVersion" type="xs:float" use="required" />
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
|
||||
|
||||
<xs:complexType name="connectioninfo">
|
||||
<xs:sequence minOccurs="0" maxOccurs="unbounded">
|
||||
<xs:element name="Node" type="mrng:connectioninfo" />
|
||||
</xs:sequence>
|
||||
<xs:attribute name="Name" type="xs:string" use="required" />
|
||||
<xs:attribute name="Id" type="xs:string" use="required" />
|
||||
<xs:attribute name="Type" type="xs:string" use="required" />
|
||||
<xs:attribute name="Expanded" type="xs:boolean" use="optional" />
|
||||
<xs:attribute name="Descr" type="xs:string" use="required" />
|
||||
<xs:attribute name="Icon" type="xs:string" use="required" />
|
||||
<xs:attribute name="Panel" type="xs:string" use="required" />
|
||||
<xs:attribute name="Username" type="xs:string" use="required" />
|
||||
<xs:attribute name="Domain" type="xs:string" use="required" />
|
||||
<xs:attribute name="Password" type="xs:string" use="required" />
|
||||
<xs:attribute name="Hostname" type="xs:string" use="required" />
|
||||
<xs:attribute name="Protocol" type="xs:string" use="required" />
|
||||
<xs:attribute name="RdpVersion" type="xs:string" use="required" />
|
||||
<xs:attribute name="VmId" type="xs:string" use="required" />
|
||||
<xs:attribute name="UseVmId" type="xs:boolean" use="required" />
|
||||
<xs:attribute name="UseEnhancedMode" type="xs:boolean" use="required" />
|
||||
<xs:attribute name="SSHTunnelConnectionName" type="xs:string" use="optional" />
|
||||
<xs:attribute name="SSHOptions" type="xs:string" use="optional" />
|
||||
<xs:attribute name="PuttySession" type="xs:string" use="required" />
|
||||
<xs:attribute name="Port" type="xs:int" use="required" />
|
||||
<xs:attribute name="ConnectToConsole" type="xs:boolean" use="required" />
|
||||
<xs:attribute name="UseCredSsp" type="xs:boolean" use="required" />
|
||||
<xs:attribute name="RenderingEngine" type="xs:string" use="required" />
|
||||
<xs:attribute name="RDPAuthenticationLevel" type="xs:string" use="required" />
|
||||
<xs:attribute name="RDPMinutesToIdleTimeout" type="xs:int" use="required" />
|
||||
<xs:attribute name="RDPAlertIdleTimeout" type="xs:boolean" use="required" />
|
||||
<xs:attribute name="LoadBalanceInfo" type="xs:string" use="required" />
|
||||
<xs:attribute name="Colors" type="xs:string" use="required" />
|
||||
<xs:attribute name="Resolution" type="xs:string" use="required" />
|
||||
<xs:attribute name="AutomaticResize" type="xs:boolean" use="required" />
|
||||
<xs:attribute name="DisplayWallpaper" type="xs:boolean" use="required" />
|
||||
<xs:attribute name="DisplayThemes" type="xs:boolean" use="required" />
|
||||
<xs:attribute name="EnableFontSmoothing" type="xs:boolean" use="required" />
|
||||
<xs:attribute name="EnableDesktopComposition" type="xs:boolean" use="required" />
|
||||
<xs:attribute name="DisableFullWindowDrag" type="xs:boolean" use="required" />
|
||||
<xs:attribute name="DisableMenuAnimations" type="xs:boolean" use="required" />
|
||||
<xs:attribute name="DisableCursorShadow" type="xs:boolean" use="required" />
|
||||
<xs:attribute name="DisableCursorBlinking" type="xs:boolean" use="required" />
|
||||
<xs:attribute name="CacheBitmaps" type="xs:boolean" use="required" />
|
||||
<xs:attribute name="RedirectDiskDrives" type="xs:boolean" use="required" />
|
||||
<xs:attribute name="RedirectPorts" type="xs:boolean" use="required" />
|
||||
<xs:attribute name="RedirectPrinters" type="xs:boolean" use="required" />
|
||||
<xs:attribute name="RedirectClipboard" type="xs:boolean" use="required" />
|
||||
<xs:attribute name="RedirectSmartCards" type="xs:boolean" use="required" />
|
||||
<xs:attribute name="RedirectSound" type="xs:string" use="required" />
|
||||
<xs:attribute name="SoundQuality" type="xs:string" use="required" />
|
||||
<xs:attribute name="RedirectAudioCapture" type="xs:boolean" use="required" />
|
||||
<xs:attribute name="RedirectKeys" type="xs:boolean" use="required" />
|
||||
<xs:attribute name="Connected" type="xs:boolean" use="required" />
|
||||
<xs:attribute name="PreExtApp" type="xs:string" use="required" />
|
||||
<xs:attribute name="PostExtApp" type="xs:string" use="required" />
|
||||
<xs:attribute name="MacAddress" type="xs:string" use="required" />
|
||||
<xs:attribute name="UserField" type="xs:string" use="required" />
|
||||
<xs:attribute name="ExtApp" type="xs:string" use="required" />
|
||||
<xs:attribute name="Favorite" type="xs:string" use="required" />
|
||||
<xs:attribute name="VNCCompression" type="xs:string" use="required" />
|
||||
<xs:attribute name="VNCEncoding" type="xs:string" use="required" />
|
||||
<xs:attribute name="VNCAuthMode" type="xs:string" use="required" />
|
||||
<xs:attribute name="VNCProxyType" type="xs:string" use="required" />
|
||||
<xs:attribute name="VNCProxyIP" type="xs:string" use="required" />
|
||||
<xs:attribute name="VNCProxyPort" type="xs:int" use="required" />
|
||||
<xs:attribute name="VNCProxyUsername" type="xs:string" use="required" />
|
||||
<xs:attribute name="VNCProxyPassword" type="xs:string" use="required" />
|
||||
<xs:attribute name="VNCColors" type="xs:string" use="required" />
|
||||
<xs:attribute name="VNCSmartSizeMode" type="xs:string" use="required" />
|
||||
<xs:attribute name="VNCViewOnly" type="xs:boolean" use="required" />
|
||||
<xs:attribute name="RDGatewayUsageMethod" type="xs:string" use="required" />
|
||||
<xs:attribute name="RDGatewayHostname" type="xs:string" use="required" />
|
||||
<xs:attribute name="RDGatewayUseConnectionCredentials" type="xs:string" use="required" />
|
||||
<xs:attribute name="RDGatewayUsername" type="xs:string" use="required" />
|
||||
<xs:attribute name="RDGatewayPassword" type="xs:string" use="required" />
|
||||
<xs:attribute name="RDGatewayDomain" type="xs:string" use="required" />
|
||||
<xs:attribute name="StartProgram" type="xs:string" use="optional" />
|
||||
<xs:attribute name="InheritCredentialRecord" type="xs:boolean" use="optional" />
|
||||
<xs:attribute name="InheritCacheBitmaps" type="xs:boolean" use="optional" />
|
||||
<xs:attribute name="InheritColors" type="xs:boolean" use="optional" />
|
||||
<xs:attribute name="InheritDescription" type="xs:boolean" use="optional" />
|
||||
<xs:attribute name="InheritDisplayThemes" type="xs:boolean" use="optional" />
|
||||
<xs:attribute name="InheritDisplayWallpaper" type="xs:boolean" use="optional" />
|
||||
<xs:attribute name="InheritEnableFontSmoothing" type="xs:boolean" use="optional" />
|
||||
<xs:attribute name="InheritEnableDesktopComposition" type="xs:boolean" use="optional" />
|
||||
<xs:attribute name="InheritDisableFullWindowDrag" type="xs:boolean" use="optional" />
|
||||
<xs:attribute name="InheritDisableMenuAnimations" type="xs:boolean" use="optional" />
|
||||
<xs:attribute name="InheritDisableCursorShadow" type="xs:boolean" use="optional" />
|
||||
<xs:attribute name="InheritDisableCursorBlinking" type="xs:boolean" use="optional" />
|
||||
<xs:attribute name="InheritDomain" type="xs:boolean" use="optional" />
|
||||
<xs:attribute name="InheritIcon" type="xs:boolean" use="optional" />
|
||||
<xs:attribute name="InheritPanel" type="xs:boolean" use="optional" />
|
||||
<xs:attribute name="InheritPassword" type="xs:boolean" use="optional" />
|
||||
<xs:attribute name="InheritPort" type="xs:boolean" use="optional" />
|
||||
<xs:attribute name="InheritProtocol" type="xs:boolean" use="optional" />
|
||||
<xs:attribute name="InheritRdpVersion" type="xs:boolean" use="optional" />
|
||||
<xs:attribute name="InheritSSHTunnelConnectionName" type="xs:boolean" use="optional" />
|
||||
<xs:attribute name="InheritSSHOptions" type="xs:boolean" use="optional" />
|
||||
<xs:attribute name="InheritPuttySession" type="xs:boolean" use="optional" />
|
||||
<xs:attribute name="InheritRedirectDiskDrives" type="xs:boolean" use="optional" />
|
||||
<xs:attribute name="InheritRedirectKeys" type="xs:boolean" use="optional" />
|
||||
<xs:attribute name="InheritRedirectPorts" type="xs:boolean" use="optional" />
|
||||
<xs:attribute name="InheritRedirectPrinters" type="xs:boolean" use="optional" />
|
||||
<xs:attribute name="InheritRedirectClipboard" type="xs:boolean" use="optional" />
|
||||
<xs:attribute name="InheritRedirectSmartCards" type="xs:boolean" use="optional" />
|
||||
<xs:attribute name="InheritRedirectSound" type="xs:boolean" use="optional" />
|
||||
<xs:attribute name="InheritSoundQuality" type="xs:boolean" use="optional" />
|
||||
<xs:attribute name="InheritRedirectAudioCapture" type="xs:boolean" use="optional" />
|
||||
<xs:attribute name="InheritResolution" type="xs:boolean" use="optional" />
|
||||
<xs:attribute name="InheritAutomaticResize" type="xs:boolean" use="optional" />
|
||||
<xs:attribute name="InheritUseConsoleSession" type="xs:boolean" use="optional" />
|
||||
<xs:attribute name="InheritRenderingEngine" type="xs:boolean" use="optional" />
|
||||
<xs:attribute name="InheritUsername" type="xs:boolean" use="optional" />
|
||||
<xs:attribute name="InheritICAEncryptionStrength" type="xs:boolean" use="optional" />
|
||||
<xs:attribute name="InheritRDPAuthenticationLevel" type="xs:boolean" use="optional" />
|
||||
<xs:attribute name="InheritRDPMinutesToIdleTimeout" type="xs:boolean" use="optional" />
|
||||
<xs:attribute name="InheritRDPAlertIdleTimeout" type="xs:boolean" use="optional" />
|
||||
<xs:attribute name="InheritLoadBalanceInfo" type="xs:boolean" use="optional" />
|
||||
<xs:attribute name="InheritPreExtApp" type="xs:boolean" use="optional" />
|
||||
<xs:attribute name="InheritPostExtApp" type="xs:boolean" use="optional" />
|
||||
<xs:attribute name="InheritMacAddress" type="xs:boolean" use="optional" />
|
||||
<xs:attribute name="InheritUseCredSsp" type="xs:boolean" use="optional" />
|
||||
<xs:attribute name="InheritVmId" type="xs:boolean" use="optional" />
|
||||
<xs:attribute name="InheritUseVmId" type="xs:boolean" use="optional" />
|
||||
<xs:attribute name="InheritUseEnhancedMode" type="xs:boolean" use="optional" />
|
||||
<xs:attribute name="InheritUserField" type="xs:boolean" use="optional" />
|
||||
<xs:attribute name="InheritExtApp" type="xs:boolean" use="optional" />
|
||||
<xs:attribute name="InheritFavorite" type="xs:boolean" use="optional" />
|
||||
<xs:attribute name="InheritVNCCompression" type="xs:boolean" use="optional" />
|
||||
<xs:attribute name="InheritVNCEncoding" type="xs:boolean" use="optional" />
|
||||
<xs:attribute name="InheritVNCAuthMode" type="xs:boolean" use="optional" />
|
||||
<xs:attribute name="InheritVNCProxyType" type="xs:boolean" use="optional" />
|
||||
<xs:attribute name="InheritVNCProxyIP" type="xs:boolean" use="optional" />
|
||||
<xs:attribute name="InheritVNCProxyPort" type="xs:boolean" use="optional" />
|
||||
<xs:attribute name="InheritVNCProxyUsername" type="xs:boolean" use="optional" />
|
||||
<xs:attribute name="InheritVNCProxyPassword" type="xs:boolean" use="optional" />
|
||||
<xs:attribute name="InheritVNCColors" type="xs:boolean" use="optional" />
|
||||
<xs:attribute name="InheritVNCSmartSizeMode" type="xs:boolean" use="optional" />
|
||||
<xs:attribute name="InheritVNCViewOnly" type="xs:boolean" use="optional" />
|
||||
<xs:attribute name="InheritRDGatewayUsageMethod" type="xs:boolean" use="optional" />
|
||||
<xs:attribute name="InheritRDGatewayHostname" type="xs:boolean" use="optional" />
|
||||
<xs:attribute name="InheritRDGatewayUseConnectionCredentials" type="xs:boolean" use="optional" />
|
||||
<xs:attribute name="InheritRDGatewayUsername" type="xs:boolean" use="optional" />
|
||||
<xs:attribute name="InheritRDGatewayPassword" type="xs:boolean" use="optional" />
|
||||
<xs:attribute name="InheritRDGatewayDomain" type="xs:boolean" use="optional" />
|
||||
<xs:element name="Connections">
|
||||
<xs:complexType>
|
||||
<xs:sequence minOccurs="0" maxOccurs="unbounded">
|
||||
<xs:element name="Node" type="mrng:connectioninfo" />
|
||||
</xs:sequence>
|
||||
<xs:attribute name="Name" type="xs:string" use="required" />
|
||||
<xs:attribute name="Export" type="xs:boolean" use="required" />
|
||||
<xs:attribute name="EncryptionEngine" type="xs:string" use="required" />
|
||||
<xs:attribute name="BlockCipherMode" type="xs:string" use="required" />
|
||||
<xs:attribute name="KdfIterations" type="xs:int" use="optional" />
|
||||
<xs:attribute name="FullFileEncryption" type="xs:boolean" use="required" />
|
||||
<xs:attribute name="Protected" type="xs:string" use="required" />
|
||||
<xs:attribute name="ConfVersion" type="xs:float" use="required" />
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
|
||||
|
||||
<xs:complexType name="connectioninfo">
|
||||
<xs:sequence minOccurs="0" maxOccurs="unbounded">
|
||||
<xs:element name="Node" type="mrng:connectioninfo" />
|
||||
</xs:sequence>
|
||||
<xs:attribute name="Name" type="xs:string" use="required" />
|
||||
<xs:attribute name="Id" type="xs:string" use="required" />
|
||||
<xs:attribute name="Type" type="xs:string" use="required" />
|
||||
<xs:attribute name="Expanded" type="xs:boolean" use="optional" />
|
||||
<xs:attribute name="Descr" type="xs:string" use="required" />
|
||||
<xs:attribute name="Icon" type="xs:string" use="required" />
|
||||
<xs:attribute name="Panel" type="xs:string" use="required" />
|
||||
<xs:attribute name="Username" type="xs:string" use="required" />
|
||||
<xs:attribute name="Domain" type="xs:string" use="required" />
|
||||
<xs:attribute name="Password" type="xs:string" use="required" />
|
||||
<xs:attribute name="Hostname" type="xs:string" use="required" />
|
||||
<xs:attribute name="Protocol" type="xs:string" use="required" />
|
||||
<xs:attribute name="RdpVersion" type="xs:string" use="required" />
|
||||
<xs:attribute name="VmId" type="xs:string" use="required" />
|
||||
<xs:attribute name="UseVmId" type="xs:boolean" use="required" />
|
||||
<xs:attribute name="UseEnhancedMode" type="xs:boolean" use="required" />
|
||||
<xs:attribute name="SSHTunnelConnectionName" type="xs:string" use="optional" />
|
||||
<xs:attribute name="SSHOptions" type="xs:string" use="optional" />
|
||||
<xs:attribute name="PuttySession" type="xs:string" use="required" />
|
||||
<xs:attribute name="Port" type="xs:int" use="required" />
|
||||
<xs:attribute name="ConnectToConsole" type="xs:boolean" use="required" />
|
||||
<xs:attribute name="UseCredSsp" type="xs:boolean" use="required" />
|
||||
<xs:attribute name="RenderingEngine" type="xs:string" use="required" />
|
||||
<xs:attribute name="RDPAuthenticationLevel" type="xs:string" use="required" />
|
||||
<xs:attribute name="RDPMinutesToIdleTimeout" type="xs:int" use="required" />
|
||||
<xs:attribute name="RDPAlertIdleTimeout" type="xs:boolean" use="required" />
|
||||
<xs:attribute name="LoadBalanceInfo" type="xs:string" use="required" />
|
||||
<xs:attribute name="Colors" type="xs:string" use="required" />
|
||||
<xs:attribute name="Resolution" type="xs:string" use="required" />
|
||||
<xs:attribute name="AutomaticResize" type="xs:boolean" use="required" />
|
||||
<xs:attribute name="DisplayWallpaper" type="xs:boolean" use="required" />
|
||||
<xs:attribute name="DisplayThemes" type="xs:boolean" use="required" />
|
||||
<xs:attribute name="EnableFontSmoothing" type="xs:boolean" use="required" />
|
||||
<xs:attribute name="EnableDesktopComposition" type="xs:boolean" use="required" />
|
||||
<xs:attribute name="DisableFullWindowDrag" type="xs:boolean" use="required" />
|
||||
<xs:attribute name="DisableMenuAnimations" type="xs:boolean" use="required" />
|
||||
<xs:attribute name="DisableCursorShadow" type="xs:boolean" use="required" />
|
||||
<xs:attribute name="DisableCursorBlinking" type="xs:boolean" use="required" />
|
||||
<xs:attribute name="CacheBitmaps" type="xs:boolean" use="required" />
|
||||
<xs:attribute name="RedirectDiskDrives" type="xs:boolean" use="required" />
|
||||
<xs:attribute name="RedirectPorts" type="xs:boolean" use="required" />
|
||||
<xs:attribute name="RedirectPrinters" type="xs:boolean" use="required" />
|
||||
<xs:attribute name="RedirectClipboard" type="xs:boolean" use="required" />
|
||||
<xs:attribute name="RedirectSmartCards" type="xs:boolean" use="required" />
|
||||
<xs:attribute name="RedirectSound" type="xs:string" use="required" />
|
||||
<xs:attribute name="SoundQuality" type="xs:string" use="required" />
|
||||
<xs:attribute name="RedirectAudioCapture" type="xs:boolean" use="required" />
|
||||
<xs:attribute name="RedirectKeys" type="xs:boolean" use="required" />
|
||||
<xs:attribute name="Connected" type="xs:boolean" use="required" />
|
||||
<xs:attribute name="PreExtApp" type="xs:string" use="required" />
|
||||
<xs:attribute name="PostExtApp" type="xs:string" use="required" />
|
||||
<xs:attribute name="MacAddress" type="xs:string" use="required" />
|
||||
<xs:attribute name="UserField" type="xs:string" use="required" />
|
||||
<xs:attribute name="ExtApp" type="xs:string" use="required" />
|
||||
<xs:attribute name="Favorite" type="xs:string" use="required" />
|
||||
<xs:attribute name="VNCCompression" type="xs:string" use="required" />
|
||||
<xs:attribute name="VNCEncoding" type="xs:string" use="required" />
|
||||
<xs:attribute name="VNCAuthMode" type="xs:string" use="required" />
|
||||
<xs:attribute name="VNCProxyType" type="xs:string" use="required" />
|
||||
<xs:attribute name="VNCProxyIP" type="xs:string" use="required" />
|
||||
<xs:attribute name="VNCProxyPort" type="xs:int" use="required" />
|
||||
<xs:attribute name="VNCProxyUsername" type="xs:string" use="required" />
|
||||
<xs:attribute name="VNCProxyPassword" type="xs:string" use="required" />
|
||||
<xs:attribute name="VNCColors" type="xs:string" use="required" />
|
||||
<xs:attribute name="VNCSmartSizeMode" type="xs:string" use="required" />
|
||||
<xs:attribute name="VNCViewOnly" type="xs:boolean" use="required" />
|
||||
<xs:attribute name="RDGatewayUsageMethod" type="xs:string" use="required" />
|
||||
<xs:attribute name="RDGatewayHostname" type="xs:string" use="required" />
|
||||
<xs:attribute name="RDGatewayUseConnectionCredentials" type="xs:string" use="required" />
|
||||
<xs:attribute name="RDGatewayUsername" type="xs:string" use="required" />
|
||||
<xs:attribute name="RDGatewayPassword" type="xs:string" use="required" />
|
||||
<xs:attribute name="RDGatewayDomain" type="xs:string" use="required" />
|
||||
<xs:attribute name="InheritCredentialRecord" type="xs:boolean" use="optional" />
|
||||
<xs:attribute name="InheritCacheBitmaps" type="xs:boolean" use="optional" />
|
||||
<xs:attribute name="InheritColors" type="xs:boolean" use="optional" />
|
||||
<xs:attribute name="InheritDescription" type="xs:boolean" use="optional" />
|
||||
<xs:attribute name="InheritDisplayThemes" type="xs:boolean" use="optional" />
|
||||
<xs:attribute name="InheritDisplayWallpaper" type="xs:boolean" use="optional" />
|
||||
<xs:attribute name="InheritEnableFontSmoothing" type="xs:boolean" use="optional" />
|
||||
<xs:attribute name="InheritEnableDesktopComposition" type="xs:boolean" use="optional" />
|
||||
<xs:attribute name="InheritDisableFullWindowDrag" type="xs:boolean" use="optional" />
|
||||
<xs:attribute name="InheritDisableMenuAnimations" type="xs:boolean" use="optional" />
|
||||
<xs:attribute name="InheritDisableCursorShadow" type="xs:boolean" use="optional" />
|
||||
<xs:attribute name="InheritDisableCursorBlinking" type="xs:boolean" use="optional" />
|
||||
<xs:attribute name="InheritDomain" type="xs:boolean" use="optional" />
|
||||
<xs:attribute name="InheritIcon" type="xs:boolean" use="optional" />
|
||||
<xs:attribute name="InheritPanel" type="xs:boolean" use="optional" />
|
||||
<xs:attribute name="InheritPassword" type="xs:boolean" use="optional" />
|
||||
<xs:attribute name="InheritPort" type="xs:boolean" use="optional" />
|
||||
<xs:attribute name="InheritProtocol" type="xs:boolean" use="optional" />
|
||||
<xs:attribute name="InheritRdpVersion" type="xs:boolean" use="optional" />
|
||||
<xs:attribute name="InheritSSHTunnelConnectionName" type="xs:boolean" use="optional" />
|
||||
<xs:attribute name="InheritSSHOptions" type="xs:boolean" use="optional" />
|
||||
<xs:attribute name="InheritPuttySession" type="xs:boolean" use="optional" />
|
||||
<xs:attribute name="InheritRedirectDiskDrives" type="xs:boolean" use="optional" />
|
||||
<xs:attribute name="InheritRedirectKeys" type="xs:boolean" use="optional" />
|
||||
<xs:attribute name="InheritRedirectPorts" type="xs:boolean" use="optional" />
|
||||
<xs:attribute name="InheritRedirectPrinters" type="xs:boolean" use="optional" />
|
||||
<xs:attribute name="InheritRedirectClipboard" type="xs:boolean" use="optional" />
|
||||
<xs:attribute name="InheritRedirectSmartCards" type="xs:boolean" use="optional" />
|
||||
<xs:attribute name="InheritRedirectSound" type="xs:boolean" use="optional" />
|
||||
<xs:attribute name="InheritSoundQuality" type="xs:boolean" use="optional" />
|
||||
<xs:attribute name="InheritRedirectAudioCapture" type="xs:boolean" use="optional" />
|
||||
<xs:attribute name="InheritResolution" type="xs:boolean" use="optional" />
|
||||
<xs:attribute name="InheritAutomaticResize" type="xs:boolean" use="optional" />
|
||||
<xs:attribute name="InheritUseConsoleSession" type="xs:boolean" use="optional" />
|
||||
<xs:attribute name="InheritRenderingEngine" type="xs:boolean" use="optional" />
|
||||
<xs:attribute name="InheritUsername" type="xs:boolean" use="optional" />
|
||||
<xs:attribute name="InheritICAEncryptionStrength" type="xs:boolean" use="optional" />
|
||||
<xs:attribute name="InheritRDPAuthenticationLevel" type="xs:boolean" use="optional" />
|
||||
<xs:attribute name="InheritRDPMinutesToIdleTimeout" type="xs:boolean" use="optional" />
|
||||
<xs:attribute name="InheritRDPAlertIdleTimeout" type="xs:boolean" use="optional" />
|
||||
<xs:attribute name="InheritLoadBalanceInfo" type="xs:boolean" use="optional" />
|
||||
<xs:attribute name="InheritPreExtApp" type="xs:boolean" use="optional" />
|
||||
<xs:attribute name="InheritPostExtApp" type="xs:boolean" use="optional" />
|
||||
<xs:attribute name="InheritMacAddress" type="xs:boolean" use="optional" />
|
||||
<xs:attribute name="InheritUseCredSsp" type="xs:boolean" use="optional" />
|
||||
<xs:attribute name="InheritVmId" type="xs:boolean" use="optional" />
|
||||
<xs:attribute name="InheritUseVmId" type="xs:boolean" use="optional" />
|
||||
<xs:attribute name="InheritUseEnhancedMode" type="xs:boolean" use="optional" />
|
||||
<xs:attribute name="InheritUserField" type="xs:boolean" use="optional" />
|
||||
<xs:attribute name="InheritExtApp" type="xs:boolean" use="optional" />
|
||||
<xs:attribute name="InheritFavorite" type="xs:boolean" use="optional" />
|
||||
<xs:attribute name="InheritVNCCompression" type="xs:boolean" use="optional" />
|
||||
<xs:attribute name="InheritVNCEncoding" type="xs:boolean" use="optional" />
|
||||
<xs:attribute name="InheritVNCAuthMode" type="xs:boolean" use="optional" />
|
||||
<xs:attribute name="InheritVNCProxyType" type="xs:boolean" use="optional" />
|
||||
<xs:attribute name="InheritVNCProxyIP" type="xs:boolean" use="optional" />
|
||||
<xs:attribute name="InheritVNCProxyPort" type="xs:boolean" use="optional" />
|
||||
<xs:attribute name="InheritVNCProxyUsername" type="xs:boolean" use="optional" />
|
||||
<xs:attribute name="InheritVNCProxyPassword" type="xs:boolean" use="optional" />
|
||||
<xs:attribute name="InheritVNCColors" type="xs:boolean" use="optional" />
|
||||
<xs:attribute name="InheritVNCSmartSizeMode" type="xs:boolean" use="optional" />
|
||||
<xs:attribute name="InheritVNCViewOnly" type="xs:boolean" use="optional" />
|
||||
<xs:attribute name="InheritRDGatewayUsageMethod" type="xs:boolean" use="optional" />
|
||||
<xs:attribute name="InheritRDGatewayHostname" type="xs:boolean" use="optional" />
|
||||
<xs:attribute name="InheritRDGatewayUseConnectionCredentials" type="xs:boolean" use="optional" />
|
||||
<xs:attribute name="InheritRDGatewayUsername" type="xs:boolean" use="optional" />
|
||||
<xs:attribute name="InheritRDGatewayPassword" type="xs:boolean" use="optional" />
|
||||
<xs:attribute name="InheritRDGatewayDomain" type="xs:boolean" use="optional" />
|
||||
<xs:attribute name="StartProgram" type="xs:string" use="optional" />
|
||||
<xs:attribute name="StartProgramWorkDir" type="xs:string" use="optional" />
|
||||
</xs:complexType>
|
||||
</xs:schema>
|
||||
1660
mRemoteNG/app.config
1660
mRemoteNG/app.config
File diff suppressed because it is too large
Load Diff
@@ -157,7 +157,9 @@ CREATE TABLE [dbo].[tblCons] (
|
||||
[InheritVNCProxyUsername] bit NOT NULL,
|
||||
[InheritVNCSmartSizeMode] bit NOT NULL,
|
||||
[InheritVNCViewOnly] bit NOT NULL,
|
||||
[InheritVmId] bit
|
||||
[InheritVmId] bit,
|
||||
[StartProgram] varchar(512),
|
||||
[StartProgramWorkDir] varchar(512)
|
||||
) ON [PRIMARY]
|
||||
GO
|
||||
|
||||
@@ -165,7 +167,7 @@ CREATE TABLE [dbo].[tblRoot] (
|
||||
[Name] [varchar] (2048) NOT NULL ,
|
||||
[Export] [bit] NOT NULL ,
|
||||
[Protected] [varchar] (4048) NOT NULL ,
|
||||
[ConfVersion] [float] NOT NULL
|
||||
[ConfVersion] [varchar] (15) NOT NULL
|
||||
) ON [PRIMARY]
|
||||
GO
|
||||
|
||||
|
||||
@@ -161,6 +161,8 @@ CREATE TABLE `tblCons` (
|
||||
`InheritVNCSmartSizeMode` tinyint(1) NOT NULL,
|
||||
`InheritVNCViewOnly` tinyint(1) NOT NULL,
|
||||
`InheritVmId` tinyint(1) DEFAULT NULL,
|
||||
`StartProgram` varchar(512) DEFAULT NULL,
|
||||
`StartProgramWorkDir` varchar(512) DEFAULT NULL,
|
||||
PRIMARY KEY (`ConstantID`),
|
||||
UNIQUE (`ID`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=3324 DEFAULT CHARSET=latin1;
|
||||
@@ -177,7 +179,7 @@ CREATE TABLE `tblRoot` (
|
||||
`Name` varchar(2048) NOT NULL,
|
||||
`Export` tinyint(1) NOT NULL,
|
||||
`Protected` varchar(4048) NOT NULL,
|
||||
`ConfVersion` double NOT NULL
|
||||
`ConfVersion` varchar(15) NOT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user