mstsc保存用戶名和密碼,實現自動登錄遠程桌面

首先可以使用mstsc /?來查看關於mstsc的參數說明

 

 

 

 

根據上述的命令說明,我這裏實現的bat文件爲

 

[vb] view plaincopy
 
  1. mstsc C:/a.rdp /console /v: xxx.xxx.xxx.xxx:3389  

 

 

 

a.rdp內容

 

 

[vb] view plaincopy
 
  1. screen mode id:i:1   
  2. desktopwidth:i:1280   
  3. desktopheight:i:750   
  4. session bpp:i:24   
  5. winposstr:s:2,3,188,8,1062,721   
  6. full address:s:MyServer   
  7. compression:i:1   
  8. keyboardhook:i:2   
  9. audiomode:i:0   
  10. redirectdrives:i:0   
  11. redirectprinters:i:0   
  12. redirectcomports:i:0   
  13. redirectsmartcards:i:0   
  14. displayconnectionbar:i:1   
  15. autoreconnection   
  16. enabled:i:1   
  17. username:s:MyUserName   
  18. domain:s:MyDomain   
  19. alternate shell:s:   
  20. shell working directory:s:   
  21. password 51:b:01000000D08C9DDF0115D1118C7A00C04FC297EB01000000A925BC8BF405AE47B6A93F9FCD7F5A360400000008000000700073007700000003660000A800000010000000C6D37A7460CFA72B01B292A434E7B05B0000000004800000A0000000100000001BD47A8C85A97DE20B65AE8C515E8EF110000000164E84E384B887573DF97586B4246AD914000000884A9FACDB5B1862C5B27339F805AD6E392E1DE0  
  22. disable wallpaper:i:1   
  23. disable full window drag:i:1   
  24. disable menu anims:i:1   
  25. disable themes:i:0   
  26. disable cursor setting:i:0   
  27. bitmapcachepersistenable:i:1  

 

 

 

這樣,我點擊我的bat文件就可以自動的登錄遠程桌面了,不用每次的都輸入用戶名和密碼了。

 

 

password的產生可以利用工具來產生,可以從這裏下載

http://download.csdn.NET/source/3335310

密碼寫在  password 51:b  之後


關於原理性的介紹參考如下兩篇文檔:

http://coe.uncc.edu/mosaic/remote_desk/RDP%20File%20Settings.htm

http://www.remkoweijnen.nl/blog/2007/10/18/how-rdp-passwords-are-encrypted/comment-page-3  


原文 http://blog.csdn.net/skywalkzf/article/details/6462330

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章