Remote Desktop File Format

来源:http://www.cnblogs.com/digdeep/archive/2016/03/15/5278241.html
-Advertisement-
Play Games

轉自:http://engrmosaic.uncc.edu/mosaic-anywhere/remote-desktop-file-format The new Terminal Services client (version 2600 and newer, 5.1.2600.x) introdu


轉自:http://engrmosaic.uncc.edu/mosaic-anywhere/remote-desktop-file-format

The new Terminal Services client (version 2600 and newer, 5.1.2600.x) introduces quite a few new capabilities.  A major client-side convenience is that connection settings can be saved in an RDP file which can then be easily edited, copied, and distributed.

Unfortunately, the parameters are not nearly as well documented as the ActiveX control parameters yet; this will presumably change before the .NET server release.

Which Terminal Services/Remote Desktop Client?

The newest ones, versions 5.1.2600.x and up.  The client can be downloaded from the Remote Desktop Connection page - and despite the header, it is the client to use for connecting to either Terminal Services or XP Remote Desktop.

You can install it on any true 32-bit Windows OS except Windows XP and .NET - they already come with their own version.

Making an RDP File

You can create an RDP connection file using a text editor; there is nothing special about its structure to prevent this; in fact, the Terminal Services people appear to have been assiduous about making it simple and easy to use; the order in which parameters are placed doesn't even matter.

The simplest way to do it initially, though, is to run the mstsc client, configure basic settings you want, then choose "Save As..." on the General tab.  You can then open the resulting file in Notepad and work with it.

RDP File Structure

The file structure is relatively simple. The standard file consists of several lines; each has parameter name, type, and value, separated by a ":".  Any colons after the second one appear to be ignored (necessary so that file paths can be embedded).  MSTSC also appears to silently ignore anything it cannot parse, so you can insert freeform comments into the file.

For example, here are two lines which tell MSTSC to establish a 1024x768 desktop when it connects:

desktopheight:i:768
desktopwidth:i:1024

The first element in each line is the parameter name.  Immediately following it, after the first colon, is the parameter type; as far as I can tell, there are only 3 types of values -

  • i (integer) This is used for numeric values such as the desktop resolutions above.  All  of the "on-off" values are integers; this may be to allow future expansion of value types, since some - such as audio redirection and keyboard hooking - actually have multiple values.
  • s (string) Almost everything which is not a pure integer.  This includes paths and server names
  • b (binary) apparently only used for hashed password storage

RDP File Parameters

Below is a table listing all of the parameters I have encountered so far.  I list the parameter name, type, an example value, and then include notes on usage where possible.

PARAMETER

 

VALUE

NOTES

alternate shell

s

c:\winnt\system32\notepad.exe

Sets the shell to be used within the Terminal Services session. This can be used to set an alternate shell such as progman.exe; you can also use it to set the application which the user runs on logon to the Terminal Server.

audiomode

i

2

Known values:
0 - Bring to this computer
1 - Leave at remote computer
2 - Do not play

auto connect

i

0

0 or 1

autoreconnection enabled

i

1

Set to 1 to connect automatically when file is opened.

bitmapcachepersistenable

i

1

1 maintains bitmap cache between sessions

compression

i

1

1 means use extra compressions

connect to console

i

1

0 - connect to a virtual session
1 - connect to the console session

desktopheight

i

768

height of session desktop in pixels

desktopwidth

i

 

width of session desktop in pixels

disable cursor setting

i

0

?

disable full window drag

i

1

set to 1, disables display of window contents while dragging in session

disable menu anims

i

1

set to 1, disables menu animations in session

disable themes

i

1

set to 1, disables use of themes in session

disable wallpaper

i

1

set to 1, disables display of wallpaper in session

displayconnectionbar

i

1

Set to 1, displays the connection bar in a fullscreen session

domain

s

HQ

domain name to use for logon

full address

s

192.168.1.1:33389

IP address/name of server (and optional alternate port)

keyboardhook

i

2

For applying standard Windows key combinations
0 - On the local computer
1 - On the remote computer
2 - In fullscreen mode only

maximizeshell

i

0

set to 1, maximizes any alternate shell used in the session

password 51

b

(big long binary hash)

Ifyou choose to save the connection password, this will be a large binary hash value

port

i

3389

 

redirectcomports

i

1

set to 1, redirects client COM ports in session (XP/.NET only)

redirectdrives

i

1

set to 1, redirects client drives in session (XP/.NET only)

redirectprinters

i

1

set to 1, redirects client printers in session

redirectsmartcards

i

1

set to 1, redirects client smart cards in session (XP/.NET only)

screen mode id

i

1

FullScreen vs. normal
0 - ?
1 - windowed
2 - fullscreen

server port

i

3389

You can specify the port separately from the "full address" parameter. Thanks to James from acmewidgets.com for finding this out!

session bpp

i

16

bit depth for session - 8, 16, or 24. Only 8 is valid for Windows 2000 Terminal Servers

shell working directory

s

c:\program files\microsoft office

Working directory if an alternate shell was specified.

smart sizing

i

 

Scale the client window display of desktop when resizing
0 or not present - Do not scale
1 - Scale (Takes extra resources to scale)

username

s

administrator

name of user logging on

winposstr

s

0,1,0,249,808,876

Not sure about the details on this one.  There are always 6 comma-separated values.  I would guess that these are presets for position and "window mode" sizes - maximized versus sized.


Example RDP File

This is an example RDP connection file. It starts maximized for its desktop size (800x600); color depth is 16-bit; it will attempt to automatically start connecting to 192.168.1.12 on launch; and so on...

screen mode id:i:1
desktopwidth:i:800
desktopheight:i:600
session bpp:i:16
auto connect:i:1
full address:s:192.168.1.12
compression:i:1
keyboardhook:i:2
audiomode:i:2
redirectdrives:i:0
redirectprinters:i:0
redirectcomports:i:0
redirectsmartcards:i:0
displayconnectionbar:i:1
username:s:Administrator
domain:s:AKA
alternate shell:s:
shell working directory:s:
disable wallpaper:i:1
disable full window drag:i:1
disable menu anims:i:1
disable themes:i:1
bitmapcachepersistenable:i:1

 
您的分享是我們最大的動力!

-Advertisement-
Play Games
更多相關文章
  • Qt時常發生的錯誤總結 1,代碼有問題,但是它卻告訴你別的地方~比頭文件不能讀取,賊蛋疼! 2,庫文件問題,會出現一大堆錯誤,這個時候就要好好檢查庫文件了。 3,版本問題,Qt版本升級時有些東西會變化,所以要及其註意你寫的代碼不一定在這種版本上好使,到另一版本上就行!
  • 一、RPM包校驗 [root@localhost Packages]# rpm -V 已安裝的包名 #選項: #-V校驗指定RPM包中的文件(verify) [root@localhost Packages]# vim /etc/httpd/conf/httpd.conf---> 對包的配置文件進行...
  • rror:Flash Download Failed-"Cortex-M3"出現一般有兩種情況:   1.SWD模式下,Debug菜單中,Reset菜單選項(Autodetect/HWreset/sysresetReq/Vectreset)預設是AutoDetect,改成SysResetReq即可。
  • 之前一直嘗試使用“橋接”的方法,但是一打開虛擬機,本機windows就斷網。最後不得不換種方法,還好嘗試了很多遍終於使用NAT設置成功的聯網了。 說明:本機windows連接的是無線網。 1.檢查自己的windows系統的VMware DHCP Service 和 VMware NAT Servic
  • 裝載系統的時候只開啟了22埠。結果再裝完Nginx+php+mysql 後不能訪問網站。 iptables -L -n 查看防火牆設置發現沒開啟80埠 由於Linux防火牆預設是關閉的。可以用兩種方式,一個是關閉防火牆,另一個就是讓防火牆開放這個埠。 關閉防火牆命名: service ipta
  • 二、Makefile(下)01.make常用內嵌函數函數調用  $(function arguments)$(wildcard PATTERN)  當前目錄下匹配模式的文件  例如:src=$(wildcard *.c)$(patsubst PATTERN,REPLACEMENT,TEXT)  模式
  • 鑒於前段時間系統出了點問題,然後直接將盤抹了,來個徹底乾凈的系統重裝。這裡敲下過程。(網路恢復太慢了,我整整一個晚上竟然沒down下來,惱怒了,直接U盤裝) First,系統盤製作: 1.首先需要有:一個不小於8G的U盤,運行OS X 系統的電腦(U盤最好先使用磁碟工具進行抹盤,格式選擇OS 擴展(
  • 二、makefile(上)01.make工具  利用make工具可以自動完成編譯工作。這些工作包括:如果修改了某幾個源文件,則只重裝新編譯這幾個源文件;如果某個頭文件被修改了,則重新編譯所有包含該頭文件的源文件。利用這個自動編譯可大大簡化開發工作,避免不必要的重新編譯。  make工具通過一個稱為M
一周排行
    -Advertisement-
    Play Games
  • 移動開發(一):使用.NET MAUI開發第一個安卓APP 對於工作多年的C#程式員來說,近來想嘗試開發一款安卓APP,考慮了很久最終選擇使用.NET MAUI這個微軟官方的框架來嘗試體驗開發安卓APP,畢竟是使用Visual Studio開發工具,使用起來也比較的順手,結合微軟官方的教程進行了安卓 ...
  • 前言 QuestPDF 是一個開源 .NET 庫,用於生成 PDF 文檔。使用了C# Fluent API方式可簡化開發、減少錯誤並提高工作效率。利用它可以輕鬆生成 PDF 報告、發票、導出文件等。 項目介紹 QuestPDF 是一個革命性的開源 .NET 庫,它徹底改變了我們生成 PDF 文檔的方 ...
  • 項目地址 項目後端地址: https://github.com/ZyPLJ/ZYTteeHole 項目前端頁面地址: ZyPLJ/TreeHoleVue (github.com) https://github.com/ZyPLJ/TreeHoleVue 目前項目測試訪問地址: http://tree ...
  • 話不多說,直接開乾 一.下載 1.官方鏈接下載: https://www.microsoft.com/zh-cn/sql-server/sql-server-downloads 2.在下載目錄中找到下麵這個小的安裝包 SQL2022-SSEI-Dev.exe,運行開始下載SQL server; 二. ...
  • 前言 隨著物聯網(IoT)技術的迅猛發展,MQTT(消息隊列遙測傳輸)協議憑藉其輕量級和高效性,已成為眾多物聯網應用的首選通信標準。 MQTTnet 作為一個高性能的 .NET 開源庫,為 .NET 平臺上的 MQTT 客戶端與伺服器開發提供了強大的支持。 本文將全面介紹 MQTTnet 的核心功能 ...
  • Serilog支持多種接收器用於日誌存儲,增強器用於添加屬性,LogContext管理動態屬性,支持多種輸出格式包括純文本、JSON及ExpressionTemplate。還提供了自定義格式化選項,適用於不同需求。 ...
  • 目錄簡介獲取 HTML 文檔解析 HTML 文檔測試參考文章 簡介 動態內容網站使用 JavaScript 腳本動態檢索和渲染數據,爬取信息時需要模擬瀏覽器行為,否則獲取到的源碼基本是空的。 本文使用的爬取步驟如下: 使用 Selenium 獲取渲染後的 HTML 文檔 使用 HtmlAgility ...
  • 1.前言 什麼是熱更新 游戲或者軟體更新時,無需重新下載客戶端進行安裝,而是在應用程式啟動的情況下,在內部進行資源或者代碼更新 Unity目前常用熱更新解決方案 HybridCLR,Xlua,ILRuntime等 Unity目前常用資源管理解決方案 AssetBundles,Addressable, ...
  • 本文章主要是在C# ASP.NET Core Web API框架實現向手機發送驗證碼簡訊功能。這裡我選擇是一個互億無線簡訊驗證碼平臺,其實像阿裡雲,騰訊雲上面也可以。 首先我們先去 互億無線 https://www.ihuyi.com/api/sms.html 去註冊一個賬號 註冊完成賬號後,它會送 ...
  • 通過以下方式可以高效,並保證數據同步的可靠性 1.API設計 使用RESTful設計,確保API端點明確,並使用適當的HTTP方法(如POST用於創建,PUT用於更新)。 設計清晰的請求和響應模型,以確保客戶端能夠理解預期格式。 2.數據驗證 在伺服器端進行嚴格的數據驗證,確保接收到的數據符合預期格 ...