mirror of
https://github.com/kimmknight/remoteapptool.git
synced 2025-11-24 02:08:24 +00:00
Initial commit
This commit is contained in:
2
RDPFileLib/.gitignore
vendored
Normal file
2
RDPFileLib/.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
bin/
|
||||
obj/
|
||||
13
RDPFileLib/My Project/Application.Designer.vb
generated
Normal file
13
RDPFileLib/My Project/Application.Designer.vb
generated
Normal file
@@ -0,0 +1,13 @@
|
||||
'------------------------------------------------------------------------------
|
||||
' <auto-generated>
|
||||
' This code was generated by a tool.
|
||||
' Runtime Version:4.0.30319.42000
|
||||
'
|
||||
' Changes to this file may cause incorrect behavior and will be lost if
|
||||
' the code is regenerated.
|
||||
' </auto-generated>
|
||||
'------------------------------------------------------------------------------
|
||||
|
||||
Option Strict On
|
||||
Option Explicit On
|
||||
|
||||
10
RDPFileLib/My Project/Application.myapp
Normal file
10
RDPFileLib/My Project/Application.myapp
Normal file
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<MyApplicationData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
|
||||
<MySubMain>false</MySubMain>
|
||||
<SingleInstance>false</SingleInstance>
|
||||
<ShutdownMode>0</ShutdownMode>
|
||||
<EnableVisualStyles>true</EnableVisualStyles>
|
||||
<AuthenticationMode>0</AuthenticationMode>
|
||||
<ApplicationType>1</ApplicationType>
|
||||
<SaveMySettingsOnExit>true</SaveMySettingsOnExit>
|
||||
</MyApplicationData>
|
||||
35
RDPFileLib/My Project/AssemblyInfo.vb
Normal file
35
RDPFileLib/My Project/AssemblyInfo.vb
Normal file
@@ -0,0 +1,35 @@
|
||||
Imports System
|
||||
Imports System.Reflection
|
||||
Imports System.Runtime.InteropServices
|
||||
|
||||
' General Information about an assembly is controlled through the following
|
||||
' set of attributes. Change these attribute values to modify the information
|
||||
' associated with an assembly.
|
||||
|
||||
' Review the values of the assembly attributes
|
||||
|
||||
<Assembly: AssemblyTitle("RDPFileLib")>
|
||||
<Assembly: AssemblyDescription("")>
|
||||
<Assembly: AssemblyCompany("")>
|
||||
<Assembly: AssemblyProduct("RDPFileLib")>
|
||||
<Assembly: AssemblyCopyright("Copyright © 2016")>
|
||||
<Assembly: AssemblyTrademark("")>
|
||||
|
||||
<Assembly: ComVisible(False)>
|
||||
|
||||
'The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
<Assembly: Guid("7331d9d3-2740-46b3-b668-759fe76774f3")>
|
||||
|
||||
' Version information for an assembly consists of the following four values:
|
||||
'
|
||||
' Major Version
|
||||
' Minor Version
|
||||
' Build Number
|
||||
' Revision
|
||||
'
|
||||
' You can specify all the values or you can default the Build and Revision Numbers
|
||||
' by using the '*' as shown below:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("1.0.0.0")>
|
||||
<Assembly: AssemblyFileVersion("1.0.0.0")>
|
||||
63
RDPFileLib/My Project/Resources.Designer.vb
generated
Normal file
63
RDPFileLib/My Project/Resources.Designer.vb
generated
Normal file
@@ -0,0 +1,63 @@
|
||||
'------------------------------------------------------------------------------
|
||||
' <auto-generated>
|
||||
' This code was generated by a tool.
|
||||
' Runtime Version:4.0.30319.42000
|
||||
'
|
||||
' Changes to this file may cause incorrect behavior and will be lost if
|
||||
' the code is regenerated.
|
||||
' </auto-generated>
|
||||
'------------------------------------------------------------------------------
|
||||
|
||||
Option Strict On
|
||||
Option Explicit On
|
||||
|
||||
Imports System
|
||||
|
||||
Namespace My.Resources
|
||||
|
||||
'This class was auto-generated by the StronglyTypedResourceBuilder
|
||||
'class via a tool like ResGen or Visual Studio.
|
||||
'To add or remove a member, edit your .ResX file then rerun ResGen
|
||||
'with the /str option, or rebuild your VS project.
|
||||
'''<summary>
|
||||
''' A strongly-typed resource class, for looking up localized strings, etc.
|
||||
'''</summary>
|
||||
<Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0"), _
|
||||
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
|
||||
Global.Microsoft.VisualBasic.HideModuleNameAttribute()> _
|
||||
Friend Module Resources
|
||||
|
||||
Private resourceMan As Global.System.Resources.ResourceManager
|
||||
|
||||
Private resourceCulture As Global.System.Globalization.CultureInfo
|
||||
|
||||
'''<summary>
|
||||
''' Returns the cached ResourceManager instance used by this class.
|
||||
'''</summary>
|
||||
<Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager
|
||||
Get
|
||||
If Object.ReferenceEquals(resourceMan, Nothing) Then
|
||||
Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("RDPFileLib.Resources", GetType(Resources).Assembly)
|
||||
resourceMan = temp
|
||||
End If
|
||||
Return resourceMan
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Overrides the current thread's CurrentUICulture property for all
|
||||
''' resource lookups using this strongly typed resource class.
|
||||
'''</summary>
|
||||
<Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
Friend Property Culture() As Global.System.Globalization.CultureInfo
|
||||
Get
|
||||
Return resourceCulture
|
||||
End Get
|
||||
Set
|
||||
resourceCulture = value
|
||||
End Set
|
||||
End Property
|
||||
End Module
|
||||
End Namespace
|
||||
117
RDPFileLib/My Project/Resources.resx
Normal file
117
RDPFileLib/My Project/Resources.resx
Normal file
@@ -0,0 +1,117 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
73
RDPFileLib/My Project/Settings.Designer.vb
generated
Normal file
73
RDPFileLib/My Project/Settings.Designer.vb
generated
Normal file
@@ -0,0 +1,73 @@
|
||||
'------------------------------------------------------------------------------
|
||||
' <auto-generated>
|
||||
' This code was generated by a tool.
|
||||
' Runtime Version:4.0.30319.42000
|
||||
'
|
||||
' Changes to this file may cause incorrect behavior and will be lost if
|
||||
' the code is regenerated.
|
||||
' </auto-generated>
|
||||
'------------------------------------------------------------------------------
|
||||
|
||||
Option Strict On
|
||||
Option Explicit On
|
||||
|
||||
|
||||
Namespace My
|
||||
|
||||
<Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0"), _
|
||||
Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
Partial Friend NotInheritable Class MySettings
|
||||
Inherits Global.System.Configuration.ApplicationSettingsBase
|
||||
|
||||
Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings()),MySettings)
|
||||
|
||||
#Region "My.Settings Auto-Save Functionality"
|
||||
#If _MyType = "WindowsForms" Then
|
||||
Private Shared addedHandler As Boolean
|
||||
|
||||
Private Shared addedHandlerLockObject As New Object
|
||||
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
Private Shared Sub AutoSaveSettings(ByVal sender As Global.System.Object, ByVal e As Global.System.EventArgs)
|
||||
If My.Application.SaveMySettingsOnExit Then
|
||||
My.Settings.Save()
|
||||
End If
|
||||
End Sub
|
||||
#End If
|
||||
#End Region
|
||||
|
||||
Public Shared ReadOnly Property [Default]() As MySettings
|
||||
Get
|
||||
|
||||
#If _MyType = "WindowsForms" Then
|
||||
If Not addedHandler Then
|
||||
SyncLock addedHandlerLockObject
|
||||
If Not addedHandler Then
|
||||
AddHandler My.Application.Shutdown, AddressOf AutoSaveSettings
|
||||
addedHandler = True
|
||||
End If
|
||||
End SyncLock
|
||||
End If
|
||||
#End If
|
||||
Return defaultInstance
|
||||
End Get
|
||||
End Property
|
||||
End Class
|
||||
End Namespace
|
||||
|
||||
Namespace My
|
||||
|
||||
<Global.Microsoft.VisualBasic.HideModuleNameAttribute(), _
|
||||
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute()> _
|
||||
Friend Module MySettingsProperty
|
||||
|
||||
<Global.System.ComponentModel.Design.HelpKeywordAttribute("My.Settings")> _
|
||||
Friend ReadOnly Property Settings() As Global.RDPFileLib.My.MySettings
|
||||
Get
|
||||
Return Global.RDPFileLib.My.MySettings.Default
|
||||
End Get
|
||||
End Property
|
||||
End Module
|
||||
End Namespace
|
||||
5
RDPFileLib/My Project/Settings.settings
Normal file
5
RDPFileLib/My Project/Settings.settings
Normal file
@@ -0,0 +1,5 @@
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" UseMySettingsClassName="true">
|
||||
<Profiles />
|
||||
<Settings />
|
||||
</SettingsFile>
|
||||
111
RDPFileLib/RDPFileLib.bak.vbproj
Normal file
111
RDPFileLib/RDPFileLib.bak.vbproj
Normal file
@@ -0,0 +1,111 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{258307D5-A407-4622-BF1A-BDCA8E3D2FAA}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<RootNamespace>RDPFileLib</RootNamespace>
|
||||
<AssemblyName>RDPFileLib</AssemblyName>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<MyType>Windows</MyType>
|
||||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
||||
<TargetFrameworkProfile />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<DefineDebug>true</DefineDebug>
|
||||
<DefineTrace>true</DefineTrace>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DocumentationFile>RDPFileLib.xml</DocumentationFile>
|
||||
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<DefineDebug>false</DefineDebug>
|
||||
<DefineTrace>true</DefineTrace>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DocumentationFile>RDPFileLib.xml</DocumentationFile>
|
||||
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<OptionExplicit>On</OptionExplicit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<OptionCompare>Binary</OptionCompare>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<OptionStrict>Off</OptionStrict>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<OptionInfer>On</OptionInfer>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Import Include="Microsoft.VisualBasic" />
|
||||
<Import Include="System" />
|
||||
<Import Include="System.Collections" />
|
||||
<Import Include="System.Collections.Generic" />
|
||||
<Import Include="System.Data" />
|
||||
<Import Include="System.Diagnostics" />
|
||||
<Import Include="System.Linq" />
|
||||
<Import Include="System.Xml.Linq" />
|
||||
<Import Include="System.Threading.Tasks" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="RDPFileLib.vb" />
|
||||
<Compile Include="My Project\AssemblyInfo.vb" />
|
||||
<Compile Include="My Project\Application.Designer.vb">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Application.myapp</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="My Project\Resources.Designer.vb">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="My Project\Settings.Designer.vb">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Settings.settings</DependentUpon>
|
||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="My Project\Resources.resx">
|
||||
<Generator>VbMyResourcesResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.vb</LastGenOutput>
|
||||
<CustomToolNamespace>My.Resources</CustomToolNamespace>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="app.config" />
|
||||
<None Include="My Project\Application.myapp">
|
||||
<Generator>MyApplicationCodeGenerator</Generator>
|
||||
<LastGenOutput>Application.Designer.vb</LastGenOutput>
|
||||
</None>
|
||||
<None Include="My Project\Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
<CustomToolNamespace>My</CustomToolNamespace>
|
||||
<LastGenOutput>Settings.Designer.vb</LastGenOutput>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
||||
255
RDPFileLib/RDPFileLib.vb
Normal file
255
RDPFileLib/RDPFileLib.vb
Normal file
@@ -0,0 +1,255 @@
|
||||
Public Class RDPFile
|
||||
Public administrative_session As Integer = 0
|
||||
Public allow_desktop_composition As Integer = 0
|
||||
Public allow_font_smoothing As Integer = 0
|
||||
Public alternate_full_address As String = ""
|
||||
Public alternate_shell As String = ""
|
||||
Public audiocapturemode As Integer = 0
|
||||
Public audiomode As Integer = 0
|
||||
Public audioqualitymode As Integer = 0
|
||||
Public authentication_level As Integer = 2
|
||||
Public autoreconnect_max_retries As Integer = 20
|
||||
Public autoreconnection_enabled As Integer = 1
|
||||
Public bandwidthautodetect As Integer = 1
|
||||
Public bitmapcachepersistenable As Integer = 1
|
||||
Public bitmapcachesize As Integer = 1500
|
||||
Public compression As Integer = 1
|
||||
Public connect_to_console As Integer = 0
|
||||
Public connection_type As Integer = 2
|
||||
Public desktop_size_id As Integer = 0
|
||||
Public desktopheight As Integer = 600
|
||||
Public desktopwidth As Integer = 800
|
||||
Public devicestoredirect As String = ""
|
||||
Public disable_ctrl_alt_del As Integer = 1
|
||||
Public disable_full_window_drag As Integer = 1
|
||||
Public disable_menu_anims As Integer = 1
|
||||
Public disable_themes As Integer = 0
|
||||
Public disable_wallpaper As Integer = 1
|
||||
Public disableconnectionsharing As Integer = 0
|
||||
Public disableremoteappcapscheck As Integer = 0
|
||||
Public displayconnectionbar As Integer = 1
|
||||
Public domain As String = ""
|
||||
Public drivestoredirect As String = ""
|
||||
Public enablecredsspsupport As Integer = 1
|
||||
Public enablesuperpan As Integer = 0
|
||||
Public full_address As String = ""
|
||||
Public gatewaycredentialssource As Integer = 4
|
||||
Public gatewayhostname As String = ""
|
||||
Public gatewayprofileusagemethod As Integer = 0
|
||||
Public gatewayusagemethod As Integer = 4
|
||||
Public keyboardhook As Integer = 2
|
||||
Public negotiate_security_layer As Integer = 1
|
||||
Public networkautodetect As Integer = 1
|
||||
'Public password_51 As Binary
|
||||
Public pinconnectionbar As Integer = 1
|
||||
Public prompt_for_credentials As Integer = 0
|
||||
Public prompt_for_credentials_on_client As Integer = 0
|
||||
Public promptcredentialonce As Integer = 1
|
||||
Public public_mode As Integer = 0
|
||||
Public redirectclipboard As Integer = 1
|
||||
Public redirectcomports As Integer = 0
|
||||
Public redirectdirectx As Integer = 1
|
||||
Public redirectdrives As Integer = 0
|
||||
Public redirectposdevices As Integer = 0
|
||||
Public redirectprinters As Integer = 1
|
||||
Public redirectsmartcards As Integer = 1
|
||||
Public remoteapplicationcmdline As String = ""
|
||||
Public remoteapplicationexpandcmdline As Integer = 1
|
||||
Public remoteapplicationexpandworkingdir As Integer = 0
|
||||
Public remoteapplicationfile As String = ""
|
||||
Public remoteapplicationfileextensions As String = ""
|
||||
Public remoteapplicationicon As String = ""
|
||||
Public remoteapplicationmode As Integer = 0
|
||||
Public remoteapplicationname As String = ""
|
||||
Public remoteapplicationprogram As String = ""
|
||||
Public screen_mode_id As Integer = 2
|
||||
Public server_port As Integer = 3389
|
||||
Public session_bpp As Integer = 32
|
||||
Public shell_working_directory As String = ""
|
||||
Public smart_sizing As Integer = 0
|
||||
Public span_monitors As Integer = 0
|
||||
Public superpanaccelerationfactor As Integer = 1
|
||||
Public usbdevicestoredirect As String = ""
|
||||
Public use_multimon As Integer = 0
|
||||
Public username As String = ""
|
||||
Public videoplaybackmode As Integer = 1
|
||||
Public winposstr As String = "0,3,0,0,800,600"
|
||||
|
||||
Public Sub SaveRDPfile(FilePath As String, Optional SaveDefaultSettings As Boolean = False)
|
||||
My.Computer.FileSystem.WriteAllText(FilePath, GetRDPstring(SaveDefaultSettings), False)
|
||||
End Sub
|
||||
|
||||
Public Function GetRDPstring(Optional SaveDefaultSettings As Boolean = False)
|
||||
Dim RDPstring As String = ""
|
||||
|
||||
Dim DefaultRDP As New RDPFile
|
||||
|
||||
If SaveDefaultSettings Or Not DefaultRDP.administrative_session = administrative_session Then RDPstring += "administrative session" & ":" & administrative_session.GetType().ToString.Replace("System.", "").ToLower.Substring(0, 1) & ":" & administrative_session.ToString & vbCrLf
|
||||
If SaveDefaultSettings Or Not DefaultRDP.allow_desktop_composition = allow_desktop_composition Then RDPstring += "allow desktop composition" & ":" & allow_desktop_composition.GetType().ToString.Replace("System.", "").ToLower.Substring(0, 1) & ":" & allow_desktop_composition.ToString & vbCrLf
|
||||
If SaveDefaultSettings Or Not DefaultRDP.allow_font_smoothing = allow_font_smoothing Then RDPstring += "allow font smoothing" & ":" & allow_font_smoothing.GetType().ToString.Replace("System.", "").ToLower.Substring(0, 1) & ":" & allow_font_smoothing.ToString & vbCrLf
|
||||
If SaveDefaultSettings Or Not DefaultRDP.alternate_full_address = alternate_full_address Then RDPstring += "alternate full address" & ":" & alternate_full_address.GetType().ToString.Replace("System.", "").ToLower.Substring(0, 1) & ":" & alternate_full_address.ToString & vbCrLf
|
||||
If SaveDefaultSettings Or Not DefaultRDP.alternate_shell = alternate_shell Then RDPstring += "alternate shell" & ":" & alternate_shell.GetType().ToString.Replace("System.", "").ToLower.Substring(0, 1) & ":" & alternate_shell.ToString & vbCrLf
|
||||
If SaveDefaultSettings Or Not DefaultRDP.audiocapturemode = audiocapturemode Then RDPstring += "audiocapturemode" & ":" & audiocapturemode.GetType().ToString.Replace("System.", "").ToLower.Substring(0, 1) & ":" & audiocapturemode.ToString & vbCrLf
|
||||
If SaveDefaultSettings Or Not DefaultRDP.audiomode = audiomode Then RDPstring += "audiomode" & ":" & audiomode.GetType().ToString.Replace("System.", "").ToLower.Substring(0, 1) & ":" & audiomode.ToString & vbCrLf
|
||||
If SaveDefaultSettings Or Not DefaultRDP.audioqualitymode = audioqualitymode Then RDPstring += "audioqualitymode" & ":" & audioqualitymode.GetType().ToString.Replace("System.", "").ToLower.Substring(0, 1) & ":" & audioqualitymode.ToString & vbCrLf
|
||||
If SaveDefaultSettings Or Not DefaultRDP.authentication_level = authentication_level Then RDPstring += "authentication level" & ":" & authentication_level.GetType().ToString.Replace("System.", "").ToLower.Substring(0, 1) & ":" & authentication_level.ToString & vbCrLf
|
||||
If SaveDefaultSettings Or Not DefaultRDP.autoreconnect_max_retries = autoreconnect_max_retries Then RDPstring += "autoreconnect max retries" & ":" & autoreconnect_max_retries.GetType().ToString.Replace("System.", "").ToLower.Substring(0, 1) & ":" & autoreconnect_max_retries.ToString & vbCrLf
|
||||
If SaveDefaultSettings Or Not DefaultRDP.autoreconnection_enabled = autoreconnection_enabled Then RDPstring += "autoreconnection enabled" & ":" & autoreconnection_enabled.GetType().ToString.Replace("System.", "").ToLower.Substring(0, 1) & ":" & autoreconnection_enabled.ToString & vbCrLf
|
||||
If SaveDefaultSettings Or Not DefaultRDP.bandwidthautodetect = bandwidthautodetect Then RDPstring += "bandwidthautodetect" & ":" & bandwidthautodetect.GetType().ToString.Replace("System.", "").ToLower.Substring(0, 1) & ":" & bandwidthautodetect.ToString & vbCrLf
|
||||
If SaveDefaultSettings Or Not DefaultRDP.bitmapcachepersistenable = bitmapcachepersistenable Then RDPstring += "bitmapcachepersistenable" & ":" & bitmapcachepersistenable.GetType().ToString.Replace("System.", "").ToLower.Substring(0, 1) & ":" & bitmapcachepersistenable.ToString & vbCrLf
|
||||
If SaveDefaultSettings Or Not DefaultRDP.bitmapcachesize = bitmapcachesize Then RDPstring += "bitmapcachesize" & ":" & bitmapcachesize.GetType().ToString.Replace("System.", "").ToLower.Substring(0, 1) & ":" & bitmapcachesize.ToString & vbCrLf
|
||||
If SaveDefaultSettings Or Not DefaultRDP.compression = compression Then RDPstring += "compression" & ":" & compression.GetType().ToString.Replace("System.", "").ToLower.Substring(0, 1) & ":" & compression.ToString & vbCrLf
|
||||
If SaveDefaultSettings Or Not DefaultRDP.connect_to_console = connect_to_console Then RDPstring += "connect to console" & ":" & connect_to_console.GetType().ToString.Replace("System.", "").ToLower.Substring(0, 1) & ":" & connect_to_console.ToString & vbCrLf
|
||||
If SaveDefaultSettings Or Not DefaultRDP.connection_type = connection_type Then RDPstring += "connection type" & ":" & connection_type.GetType().ToString.Replace("System.", "").ToLower.Substring(0, 1) & ":" & connection_type.ToString & vbCrLf
|
||||
If SaveDefaultSettings Or Not DefaultRDP.desktop_size_id = desktop_size_id Then RDPstring += "desktop size id" & ":" & desktop_size_id.GetType().ToString.Replace("System.", "").ToLower.Substring(0, 1) & ":" & desktop_size_id.ToString & vbCrLf
|
||||
If SaveDefaultSettings Or Not DefaultRDP.desktopheight = desktopheight Then RDPstring += "desktopheight" & ":" & desktopheight.GetType().ToString.Replace("System.", "").ToLower.Substring(0, 1) & ":" & desktopheight.ToString & vbCrLf
|
||||
If SaveDefaultSettings Or Not DefaultRDP.desktopwidth = desktopwidth Then RDPstring += "desktopwidth" & ":" & desktopwidth.GetType().ToString.Replace("System.", "").ToLower.Substring(0, 1) & ":" & desktopwidth.ToString & vbCrLf
|
||||
If SaveDefaultSettings Or Not DefaultRDP.devicestoredirect = devicestoredirect Then RDPstring += "devicestoredirect" & ":" & devicestoredirect.GetType().ToString.Replace("System.", "").ToLower.Substring(0, 1) & ":" & devicestoredirect.ToString & vbCrLf
|
||||
If SaveDefaultSettings Or Not DefaultRDP.disable_ctrl_alt_del = disable_ctrl_alt_del Then RDPstring += "disable ctrl+alt+del" & ":" & disable_ctrl_alt_del.GetType().ToString.Replace("System.", "").ToLower.Substring(0, 1) & ":" & disable_ctrl_alt_del.ToString & vbCrLf
|
||||
If SaveDefaultSettings Or Not DefaultRDP.disable_full_window_drag = disable_full_window_drag Then RDPstring += "disable full window drag" & ":" & disable_full_window_drag.GetType().ToString.Replace("System.", "").ToLower.Substring(0, 1) & ":" & disable_full_window_drag.ToString & vbCrLf
|
||||
If SaveDefaultSettings Or Not DefaultRDP.disable_menu_anims = disable_menu_anims Then RDPstring += "disable menu anims" & ":" & disable_menu_anims.GetType().ToString.Replace("System.", "").ToLower.Substring(0, 1) & ":" & disable_menu_anims.ToString & vbCrLf
|
||||
If SaveDefaultSettings Or Not DefaultRDP.disable_themes = disable_themes Then RDPstring += "disable themes" & ":" & disable_themes.GetType().ToString.Replace("System.", "").ToLower.Substring(0, 1) & ":" & disable_themes.ToString & vbCrLf
|
||||
If SaveDefaultSettings Or Not DefaultRDP.disable_wallpaper = disable_wallpaper Then RDPstring += "disable wallpaper" & ":" & disable_wallpaper.GetType().ToString.Replace("System.", "").ToLower.Substring(0, 1) & ":" & disable_wallpaper.ToString & vbCrLf
|
||||
If SaveDefaultSettings Or Not DefaultRDP.disableconnectionsharing = disableconnectionsharing Then RDPstring += "disableconnectionsharing" & ":" & disableconnectionsharing.GetType().ToString.Replace("System.", "").ToLower.Substring(0, 1) & ":" & disableconnectionsharing.ToString & vbCrLf
|
||||
If SaveDefaultSettings Or Not DefaultRDP.disableremoteappcapscheck = disableremoteappcapscheck Then RDPstring += "disableremoteappcapscheck" & ":" & disableremoteappcapscheck.GetType().ToString.Replace("System.", "").ToLower.Substring(0, 1) & ":" & disableremoteappcapscheck.ToString & vbCrLf
|
||||
If SaveDefaultSettings Or Not DefaultRDP.displayconnectionbar = displayconnectionbar Then RDPstring += "displayconnectionbar" & ":" & displayconnectionbar.GetType().ToString.Replace("System.", "").ToLower.Substring(0, 1) & ":" & displayconnectionbar.ToString & vbCrLf
|
||||
If SaveDefaultSettings Or Not DefaultRDP.domain = domain Then RDPstring += "domain" & ":" & domain.GetType().ToString.Replace("System.", "").ToLower.Substring(0, 1) & ":" & domain.ToString & vbCrLf
|
||||
If SaveDefaultSettings Or Not DefaultRDP.drivestoredirect = drivestoredirect Then RDPstring += "drivestoredirect" & ":" & drivestoredirect.GetType().ToString.Replace("System.", "").ToLower.Substring(0, 1) & ":" & drivestoredirect.ToString & vbCrLf
|
||||
If SaveDefaultSettings Or Not DefaultRDP.enablecredsspsupport = enablecredsspsupport Then RDPstring += "enablecredsspsupport" & ":" & enablecredsspsupport.GetType().ToString.Replace("System.", "").ToLower.Substring(0, 1) & ":" & enablecredsspsupport.ToString & vbCrLf
|
||||
If SaveDefaultSettings Or Not DefaultRDP.enablesuperpan = enablesuperpan Then RDPstring += "enablesuperpan" & ":" & enablesuperpan.GetType().ToString.Replace("System.", "").ToLower.Substring(0, 1) & ":" & enablesuperpan.ToString & vbCrLf
|
||||
If SaveDefaultSettings Or Not DefaultRDP.full_address = full_address Then RDPstring += "full address" & ":" & full_address.GetType().ToString.Replace("System.", "").ToLower.Substring(0, 1) & ":" & full_address.ToString & vbCrLf
|
||||
If SaveDefaultSettings Or Not DefaultRDP.gatewaycredentialssource = gatewaycredentialssource Then RDPstring += "gatewaycredentialssource" & ":" & gatewaycredentialssource.GetType().ToString.Replace("System.", "").ToLower.Substring(0, 1) & ":" & gatewaycredentialssource.ToString & vbCrLf
|
||||
If SaveDefaultSettings Or Not DefaultRDP.gatewayhostname = gatewayhostname Then RDPstring += "gatewayhostname" & ":" & gatewayhostname.GetType().ToString.Replace("System.", "").ToLower.Substring(0, 1) & ":" & gatewayhostname.ToString & vbCrLf
|
||||
If SaveDefaultSettings Or Not DefaultRDP.gatewayprofileusagemethod = gatewayprofileusagemethod Then RDPstring += "gatewayprofileusagemethod" & ":" & gatewayprofileusagemethod.GetType().ToString.Replace("System.", "").ToLower.Substring(0, 1) & ":" & gatewayprofileusagemethod.ToString & vbCrLf
|
||||
If SaveDefaultSettings Or Not DefaultRDP.gatewayusagemethod = gatewayusagemethod Then RDPstring += "gatewayusagemethod" & ":" & gatewayusagemethod.GetType().ToString.Replace("System.", "").ToLower.Substring(0, 1) & ":" & gatewayusagemethod.ToString & vbCrLf
|
||||
If SaveDefaultSettings Or Not DefaultRDP.keyboardhook = keyboardhook Then RDPstring += "keyboardhook" & ":" & keyboardhook.GetType().ToString.Replace("System.", "").ToLower.Substring(0, 1) & ":" & keyboardhook.ToString & vbCrLf
|
||||
If SaveDefaultSettings Or Not DefaultRDP.negotiate_security_layer = negotiate_security_layer Then RDPstring += "negotiate security layer" & ":" & negotiate_security_layer.GetType().ToString.Replace("System.", "").ToLower.Substring(0, 1) & ":" & negotiate_security_layer.ToString & vbCrLf
|
||||
If SaveDefaultSettings Or Not DefaultRDP.networkautodetect = networkautodetect Then RDPstring += "networkautodetect" & ":" & networkautodetect.GetType().ToString.Replace("System.", "").ToLower.Substring(0, 1) & ":" & networkautodetect.ToString & vbCrLf
|
||||
'If SaveDefaultSettings Or Not DefaultRDP.password_51 = password_51 Then RDPstring += "password 51" & ":" & password_51.GetType().ToString.Replace("System.", "").ToLower.Substring(0, 1) & ":" & password_51.ToString & vbCrLf
|
||||
If SaveDefaultSettings Or Not DefaultRDP.pinconnectionbar = pinconnectionbar Then RDPstring += "pinconnectionbar" & ":" & pinconnectionbar.GetType().ToString.Replace("System.", "").ToLower.Substring(0, 1) & ":" & pinconnectionbar.ToString & vbCrLf
|
||||
If SaveDefaultSettings Or Not DefaultRDP.prompt_for_credentials = prompt_for_credentials Then RDPstring += "prompt for credentials" & ":" & prompt_for_credentials.GetType().ToString.Replace("System.", "").ToLower.Substring(0, 1) & ":" & prompt_for_credentials.ToString & vbCrLf
|
||||
If SaveDefaultSettings Or Not DefaultRDP.prompt_for_credentials_on_client = prompt_for_credentials_on_client Then RDPstring += "prompt for credentials on client" & ":" & prompt_for_credentials_on_client.GetType().ToString.Replace("System.", "").ToLower.Substring(0, 1) & ":" & prompt_for_credentials_on_client.ToString & vbCrLf
|
||||
If SaveDefaultSettings Or Not DefaultRDP.promptcredentialonce = promptcredentialonce Then RDPstring += "promptcredentialonce" & ":" & promptcredentialonce.GetType().ToString.Replace("System.", "").ToLower.Substring(0, 1) & ":" & promptcredentialonce.ToString & vbCrLf
|
||||
If SaveDefaultSettings Or Not DefaultRDP.public_mode = public_mode Then RDPstring += "public mode" & ":" & public_mode.GetType().ToString.Replace("System.", "").ToLower.Substring(0, 1) & ":" & public_mode.ToString & vbCrLf
|
||||
If SaveDefaultSettings Or Not DefaultRDP.redirectclipboard = redirectclipboard Then RDPstring += "redirectclipboard" & ":" & redirectclipboard.GetType().ToString.Replace("System.", "").ToLower.Substring(0, 1) & ":" & redirectclipboard.ToString & vbCrLf
|
||||
If SaveDefaultSettings Or Not DefaultRDP.redirectcomports = redirectcomports Then RDPstring += "redirectcomports" & ":" & redirectcomports.GetType().ToString.Replace("System.", "").ToLower.Substring(0, 1) & ":" & redirectcomports.ToString & vbCrLf
|
||||
If SaveDefaultSettings Or Not DefaultRDP.redirectdirectx = redirectdirectx Then RDPstring += "redirectdirectx" & ":" & redirectdirectx.GetType().ToString.Replace("System.", "").ToLower.Substring(0, 1) & ":" & redirectdirectx.ToString & vbCrLf
|
||||
If SaveDefaultSettings Or Not DefaultRDP.redirectdrives = redirectdrives Then RDPstring += "redirectdrives" & ":" & redirectdrives.GetType().ToString.Replace("System.", "").ToLower.Substring(0, 1) & ":" & redirectdrives.ToString & vbCrLf
|
||||
If SaveDefaultSettings Or Not DefaultRDP.redirectposdevices = redirectposdevices Then RDPstring += "redirectposdevices" & ":" & redirectposdevices.GetType().ToString.Replace("System.", "").ToLower.Substring(0, 1) & ":" & redirectposdevices.ToString & vbCrLf
|
||||
If SaveDefaultSettings Or Not DefaultRDP.redirectprinters = redirectprinters Then RDPstring += "redirectprinters" & ":" & redirectprinters.GetType().ToString.Replace("System.", "").ToLower.Substring(0, 1) & ":" & redirectprinters.ToString & vbCrLf
|
||||
If SaveDefaultSettings Or Not DefaultRDP.redirectsmartcards = redirectsmartcards Then RDPstring += "redirectsmartcards" & ":" & redirectsmartcards.GetType().ToString.Replace("System.", "").ToLower.Substring(0, 1) & ":" & redirectsmartcards.ToString & vbCrLf
|
||||
If SaveDefaultSettings Or Not DefaultRDP.remoteapplicationcmdline = remoteapplicationcmdline Then RDPstring += "remoteapplicationcmdline" & ":" & remoteapplicationcmdline.GetType().ToString.Replace("System.", "").ToLower.Substring(0, 1) & ":" & remoteapplicationcmdline.ToString & vbCrLf
|
||||
If SaveDefaultSettings Or Not DefaultRDP.remoteapplicationexpandcmdline = remoteapplicationexpandcmdline Then RDPstring += "remoteapplicationexpandcmdline" & ":" & remoteapplicationexpandcmdline.GetType().ToString.Replace("System.", "").ToLower.Substring(0, 1) & ":" & remoteapplicationexpandcmdline.ToString & vbCrLf
|
||||
If SaveDefaultSettings Or Not DefaultRDP.remoteapplicationexpandworkingdir = remoteapplicationexpandworkingdir Then RDPstring += "remoteapplicationexpandworkingdir" & ":" & remoteapplicationexpandworkingdir.GetType().ToString.Replace("System.", "").ToLower.Substring(0, 1) & ":" & remoteapplicationexpandworkingdir.ToString & vbCrLf
|
||||
If SaveDefaultSettings Or Not DefaultRDP.remoteapplicationfile = remoteapplicationfile Then RDPstring += "remoteapplicationfile" & ":" & remoteapplicationfile.GetType().ToString.Replace("System.", "").ToLower.Substring(0, 1) & ":" & remoteapplicationfile.ToString & vbCrLf
|
||||
If SaveDefaultSettings Or Not DefaultRDP.remoteapplicationfileextensions = remoteapplicationfileextensions Then RDPstring += "remoteapplicationfileextensions" & ":" & remoteapplicationfileextensions.GetType().ToString.Replace("System.", "").ToLower.Substring(0, 1) & ":" & remoteapplicationfileextensions.ToString & vbCrLf
|
||||
If SaveDefaultSettings Or Not DefaultRDP.remoteapplicationicon = remoteapplicationicon Then RDPstring += "remoteapplicationicon" & ":" & remoteapplicationicon.GetType().ToString.Replace("System.", "").ToLower.Substring(0, 1) & ":" & remoteapplicationicon.ToString & vbCrLf
|
||||
If SaveDefaultSettings Or Not DefaultRDP.remoteapplicationmode = remoteapplicationmode Then RDPstring += "remoteapplicationmode" & ":" & remoteapplicationmode.GetType().ToString.Replace("System.", "").ToLower.Substring(0, 1) & ":" & remoteapplicationmode.ToString & vbCrLf
|
||||
If SaveDefaultSettings Or Not DefaultRDP.remoteapplicationname = remoteapplicationname Then RDPstring += "remoteapplicationname" & ":" & remoteapplicationname.GetType().ToString.Replace("System.", "").ToLower.Substring(0, 1) & ":" & remoteapplicationname.ToString & vbCrLf
|
||||
If SaveDefaultSettings Or Not DefaultRDP.remoteapplicationprogram = remoteapplicationprogram Then RDPstring += "remoteapplicationprogram" & ":" & remoteapplicationprogram.GetType().ToString.Replace("System.", "").ToLower.Substring(0, 1) & ":" & remoteapplicationprogram.ToString & vbCrLf
|
||||
If SaveDefaultSettings Or Not DefaultRDP.screen_mode_id = screen_mode_id Then RDPstring += "screen mode id" & ":" & screen_mode_id.GetType().ToString.Replace("System.", "").ToLower.Substring(0, 1) & ":" & screen_mode_id.ToString & vbCrLf
|
||||
If SaveDefaultSettings Or Not DefaultRDP.server_port = server_port Then RDPstring += "server port" & ":" & server_port.GetType().ToString.Replace("System.", "").ToLower.Substring(0, 1) & ":" & server_port.ToString & vbCrLf
|
||||
If SaveDefaultSettings Or Not DefaultRDP.session_bpp = session_bpp Then RDPstring += "session bpp" & ":" & session_bpp.GetType().ToString.Replace("System.", "").ToLower.Substring(0, 1) & ":" & session_bpp.ToString & vbCrLf
|
||||
If SaveDefaultSettings Or Not DefaultRDP.shell_working_directory = shell_working_directory Then RDPstring += "shell working directory" & ":" & shell_working_directory.GetType().ToString.Replace("System.", "").ToLower.Substring(0, 1) & ":" & shell_working_directory.ToString & vbCrLf
|
||||
If SaveDefaultSettings Or Not DefaultRDP.smart_sizing = smart_sizing Then RDPstring += "smart sizing" & ":" & smart_sizing.GetType().ToString.Replace("System.", "").ToLower.Substring(0, 1) & ":" & smart_sizing.ToString & vbCrLf
|
||||
If SaveDefaultSettings Or Not DefaultRDP.span_monitors = span_monitors Then RDPstring += "span monitors" & ":" & span_monitors.GetType().ToString.Replace("System.", "").ToLower.Substring(0, 1) & ":" & span_monitors.ToString & vbCrLf
|
||||
If SaveDefaultSettings Or Not DefaultRDP.superpanaccelerationfactor = superpanaccelerationfactor Then RDPstring += "superpanaccelerationfactor" & ":" & superpanaccelerationfactor.GetType().ToString.Replace("System.", "").ToLower.Substring(0, 1) & ":" & superpanaccelerationfactor.ToString & vbCrLf
|
||||
If SaveDefaultSettings Or Not DefaultRDP.usbdevicestoredirect = usbdevicestoredirect Then RDPstring += "usbdevicestoredirect" & ":" & usbdevicestoredirect.GetType().ToString.Replace("System.", "").ToLower.Substring(0, 1) & ":" & usbdevicestoredirect.ToString & vbCrLf
|
||||
If SaveDefaultSettings Or Not DefaultRDP.use_multimon = use_multimon Then RDPstring += "use multimon" & ":" & use_multimon.GetType().ToString.Replace("System.", "").ToLower.Substring(0, 1) & ":" & use_multimon.ToString & vbCrLf
|
||||
If SaveDefaultSettings Or Not DefaultRDP.username = username Then RDPstring += "username" & ":" & username.GetType().ToString.Replace("System.", "").ToLower.Substring(0, 1) & ":" & username.ToString & vbCrLf
|
||||
If SaveDefaultSettings Or Not DefaultRDP.videoplaybackmode = videoplaybackmode Then RDPstring += "videoplaybackmode" & ":" & videoplaybackmode.GetType().ToString.Replace("System.", "").ToLower.Substring(0, 1) & ":" & videoplaybackmode.ToString & vbCrLf
|
||||
If SaveDefaultSettings Or Not DefaultRDP.winposstr = winposstr Then RDPstring += "winposstr" & ":" & winposstr.GetType().ToString.Replace("System.", "").ToLower.Substring(0, 1) & ":" & winposstr.ToString & vbCrLf
|
||||
|
||||
Return RDPstring
|
||||
End Function
|
||||
|
||||
Public Sub LoadRDPfile(FilePath As String)
|
||||
Dim sr As New System.IO.StreamReader(FilePath)
|
||||
|
||||
While (sr.Peek <> -1)
|
||||
Dim line As String = sr.ReadLine
|
||||
Dim SplitLine As Array = line.Split(":")
|
||||
|
||||
If Not SplitLine(2) = "" Then
|
||||
If SplitLine(0) = "administrative session" Then administrative_session = SplitLine(2)
|
||||
If SplitLine(0) = "allow desktop composition" Then allow_desktop_composition = SplitLine(2)
|
||||
If SplitLine(0) = "allow font smoothing" Then allow_font_smoothing = SplitLine(2)
|
||||
If SplitLine(0) = "alternate full address" Then alternate_full_address = SplitLine(2)
|
||||
If SplitLine(0) = "alternate shell" Then alternate_shell = SplitLine(2)
|
||||
If SplitLine(0) = "audiocapturemode" Then audiocapturemode = SplitLine(2)
|
||||
If SplitLine(0) = "audiomode" Then audiomode = SplitLine(2)
|
||||
If SplitLine(0) = "audioqualitymode" Then audioqualitymode = SplitLine(2)
|
||||
If SplitLine(0) = "authentication level" Then authentication_level = SplitLine(2)
|
||||
If SplitLine(0) = "autoreconnect max retries" Then autoreconnect_max_retries = SplitLine(2)
|
||||
If SplitLine(0) = "autoreconnection enabled" Then autoreconnection_enabled = SplitLine(2)
|
||||
If SplitLine(0) = "bandwidthautodetect" Then bandwidthautodetect = SplitLine(2)
|
||||
If SplitLine(0) = "bitmapcachepersistenable" Then bitmapcachepersistenable = SplitLine(2)
|
||||
If SplitLine(0) = "bitmapcachesize" Then bitmapcachesize = SplitLine(2)
|
||||
If SplitLine(0) = "compression" Then compression = SplitLine(2)
|
||||
If SplitLine(0) = "connect to console" Then connect_to_console = SplitLine(2)
|
||||
If SplitLine(0) = "connection type" Then connection_type = SplitLine(2)
|
||||
If SplitLine(0) = "desktop size id" Then desktop_size_id = SplitLine(2)
|
||||
If SplitLine(0) = "desktopheight" Then desktopheight = SplitLine(2)
|
||||
If SplitLine(0) = "desktopwidth" Then desktopwidth = SplitLine(2)
|
||||
If SplitLine(0) = "devicestoredirect" Then devicestoredirect = SplitLine(2)
|
||||
If SplitLine(0) = "disable ctrl+alt+del" Then disable_ctrl_alt_del = SplitLine(2)
|
||||
If SplitLine(0) = "disable full window drag" Then disable_full_window_drag = SplitLine(2)
|
||||
If SplitLine(0) = "disable menu anims" Then disable_menu_anims = SplitLine(2)
|
||||
If SplitLine(0) = "disable themes" Then disable_themes = SplitLine(2)
|
||||
If SplitLine(0) = "disable wallpaper" Then disable_wallpaper = SplitLine(2)
|
||||
If SplitLine(0) = "disableconnectionsharing" Then disableconnectionsharing = SplitLine(2)
|
||||
If SplitLine(0) = "disableremoteappcapscheck" Then disableremoteappcapscheck = SplitLine(2)
|
||||
If SplitLine(0) = "displayconnectionbar" Then displayconnectionbar = SplitLine(2)
|
||||
If SplitLine(0) = "domain" Then domain = SplitLine(2)
|
||||
If SplitLine(0) = "drivestoredirect" Then drivestoredirect = SplitLine(2)
|
||||
If SplitLine(0) = "enablecredsspsupport" Then enablecredsspsupport = SplitLine(2)
|
||||
If SplitLine(0) = "enablesuperpan" Then enablesuperpan = SplitLine(2)
|
||||
If SplitLine(0) = "full address" Then full_address = SplitLine(2)
|
||||
If SplitLine(0) = "gatewaycredentialssource" Then gatewaycredentialssource = SplitLine(2)
|
||||
If SplitLine(0) = "gatewayhostname" Then gatewayhostname = SplitLine(2)
|
||||
If SplitLine(0) = "gatewayprofileusagemethod" Then gatewayprofileusagemethod = SplitLine(2)
|
||||
If SplitLine(0) = "gatewayusagemethod" Then gatewayusagemethod = SplitLine(2)
|
||||
If SplitLine(0) = "keyboardhook" Then keyboardhook = SplitLine(2)
|
||||
If SplitLine(0) = "negotiate security layer" Then negotiate_security_layer = SplitLine(2)
|
||||
If SplitLine(0) = "networkautodetect" Then networkautodetect = SplitLine(2)
|
||||
'If SplitLine(0) = "password 51" Then password_51 = SplitLine(2)
|
||||
If SplitLine(0) = "pinconnectionbar" Then pinconnectionbar = SplitLine(2)
|
||||
If SplitLine(0) = "prompt for credentials" Then prompt_for_credentials = SplitLine(2)
|
||||
If SplitLine(0) = "prompt for credentials on client" Then prompt_for_credentials_on_client = SplitLine(2)
|
||||
If SplitLine(0) = "promptcredentialonce" Then promptcredentialonce = SplitLine(2)
|
||||
If SplitLine(0) = "public mode" Then public_mode = SplitLine(2)
|
||||
If SplitLine(0) = "redirectclipboard" Then redirectclipboard = SplitLine(2)
|
||||
If SplitLine(0) = "redirectcomports" Then redirectcomports = SplitLine(2)
|
||||
If SplitLine(0) = "redirectdirectx" Then redirectdirectx = SplitLine(2)
|
||||
If SplitLine(0) = "redirectdrives" Then redirectdrives = SplitLine(2)
|
||||
If SplitLine(0) = "redirectposdevices" Then redirectposdevices = SplitLine(2)
|
||||
If SplitLine(0) = "redirectprinters" Then redirectprinters = SplitLine(2)
|
||||
If SplitLine(0) = "redirectsmartcards" Then redirectsmartcards = SplitLine(2)
|
||||
If SplitLine(0) = "remoteapplicationcmdline" Then remoteapplicationcmdline = SplitLine(2)
|
||||
If SplitLine(0) = "remoteapplicationexpandcmdline" Then remoteapplicationexpandcmdline = SplitLine(2)
|
||||
If SplitLine(0) = "remoteapplicationexpandworkingdir" Then remoteapplicationexpandworkingdir = SplitLine(2)
|
||||
If SplitLine(0) = "remoteapplicationfile" Then remoteapplicationfile = SplitLine(2)
|
||||
If SplitLine(0) = "remoteapplicationfileextensions" Then remoteapplicationfileextensions = SplitLine(2)
|
||||
If SplitLine(0) = "remoteapplicationicon" Then remoteapplicationicon = SplitLine(2)
|
||||
If SplitLine(0) = "remoteapplicationmode" Then remoteapplicationmode = SplitLine(2)
|
||||
If SplitLine(0) = "remoteapplicationname" Then remoteapplicationname = SplitLine(2)
|
||||
If SplitLine(0) = "remoteapplicationprogram" Then remoteapplicationprogram = SplitLine(2)
|
||||
If SplitLine(0) = "screen mode id" Then screen_mode_id = SplitLine(2)
|
||||
If SplitLine(0) = "server port" Then server_port = SplitLine(2)
|
||||
If SplitLine(0) = "session bpp" Then session_bpp = SplitLine(2)
|
||||
If SplitLine(0) = "shell working directory" Then shell_working_directory = SplitLine(2)
|
||||
If SplitLine(0) = "smart sizing" Then smart_sizing = SplitLine(2)
|
||||
If SplitLine(0) = "span monitors" Then span_monitors = SplitLine(2)
|
||||
If SplitLine(0) = "superpanaccelerationfactor" Then superpanaccelerationfactor = SplitLine(2)
|
||||
If SplitLine(0) = "usbdevicestoredirect" Then usbdevicestoredirect = SplitLine(2)
|
||||
If SplitLine(0) = "use multimon" Then use_multimon = SplitLine(2)
|
||||
If SplitLine(0) = "username" Then username = SplitLine(2)
|
||||
If SplitLine(0) = "videoplaybackmode" Then videoplaybackmode = SplitLine(2)
|
||||
If SplitLine(0) = "winposstr" Then winposstr = SplitLine(2)
|
||||
|
||||
End If
|
||||
|
||||
End While
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
111
RDPFileLib/RDPFileLib.vbproj
Normal file
111
RDPFileLib/RDPFileLib.vbproj
Normal file
@@ -0,0 +1,111 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{258307D5-A407-4622-BF1A-BDCA8E3D2FAA}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<RootNamespace>RDPFileLib</RootNamespace>
|
||||
<AssemblyName>RDPFileLib</AssemblyName>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<MyType>Windows</MyType>
|
||||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
||||
<TargetFrameworkProfile />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<DefineDebug>true</DefineDebug>
|
||||
<DefineTrace>true</DefineTrace>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DocumentationFile>RDPFileLib.xml</DocumentationFile>
|
||||
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<DefineDebug>false</DefineDebug>
|
||||
<DefineTrace>true</DefineTrace>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DocumentationFile>RDPFileLib.xml</DocumentationFile>
|
||||
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<OptionExplicit>On</OptionExplicit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<OptionCompare>Binary</OptionCompare>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<OptionStrict>Off</OptionStrict>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<OptionInfer>On</OptionInfer>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Import Include="Microsoft.VisualBasic" />
|
||||
<Import Include="System" />
|
||||
<Import Include="System.Collections" />
|
||||
<Import Include="System.Collections.Generic" />
|
||||
<Import Include="System.Data" />
|
||||
<Import Include="System.Diagnostics" />
|
||||
<Import Include="System.Linq" />
|
||||
<Import Include="System.Xml.Linq" />
|
||||
<Import Include="System.Threading.Tasks" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="RDPFileLib.vb" />
|
||||
<Compile Include="My Project\AssemblyInfo.vb" />
|
||||
<Compile Include="My Project\Application.Designer.vb">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Application.myapp</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="My Project\Resources.Designer.vb">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="My Project\Settings.Designer.vb">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Settings.settings</DependentUpon>
|
||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="My Project\Resources.resx">
|
||||
<Generator>VbMyResourcesResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.vb</LastGenOutput>
|
||||
<CustomToolNamespace>My.Resources</CustomToolNamespace>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="app.config" />
|
||||
<None Include="My Project\Application.myapp">
|
||||
<Generator>MyApplicationCodeGenerator</Generator>
|
||||
<LastGenOutput>Application.Designer.vb</LastGenOutput>
|
||||
</None>
|
||||
<None Include="My Project\Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
<CustomToolNamespace>My</CustomToolNamespace>
|
||||
<LastGenOutput>Settings.Designer.vb</LastGenOutput>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
||||
27
RDPFileLib/app.config
Normal file
27
RDPFileLib/app.config
Normal file
@@ -0,0 +1,27 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<configuration>
|
||||
<configSections>
|
||||
</configSections>
|
||||
<system.diagnostics>
|
||||
<sources>
|
||||
<!-- This section defines the logging configuration for My.Application.Log -->
|
||||
<source name="DefaultSource" switchName="DefaultSwitch">
|
||||
<listeners>
|
||||
<add name="FileLog"/>
|
||||
<!-- Uncomment the below section to write to the Application Event Log -->
|
||||
<!--<add name="EventLog"/>-->
|
||||
</listeners>
|
||||
</source>
|
||||
</sources>
|
||||
<switches>
|
||||
<add name="DefaultSwitch" value="Information" />
|
||||
</switches>
|
||||
<sharedListeners>
|
||||
<add name="FileLog"
|
||||
type="Microsoft.VisualBasic.Logging.FileLogTraceListener, Microsoft.VisualBasic, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"
|
||||
initializeData="FileLogWriter"/>
|
||||
<!-- Uncomment the below section and replace APPLICATION_NAME with the name of your application to write to the Application Event Log -->
|
||||
<!--<add name="EventLog" type="System.Diagnostics.EventLogTraceListener" initializeData="APPLICATION_NAME"/> -->
|
||||
</sharedListeners>
|
||||
</system.diagnostics>
|
||||
</configuration>
|
||||
Reference in New Issue
Block a user