NicoNL
asked on
shortcut with script to startup mstsc.exe with all login information predefined
I want to create a shortcut to startup a remote desktop session with the mstsc.exe, with all information predefined. Not to use a RDP connection file. Predefined must be:
Logon domain name (not local login to the server)
Username (%username% ?)
full screen
Colors, High Color (15 bit)
Display the connection bar when in full mode
Local devices and resources - Clipboard (only)
Is this possible by using VB Script?
Logon domain name (not local login to the server)
Username (%username% ?)
full screen
Colors, High Color (15 bit)
Display the connection bar when in full mode
Local devices and resources - Clipboard (only)
Is this possible by using VB Script?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
After a little bit more testing I've noticed that Vista adds the following string to the RDP file when saving it as a new file:
promptcredentialonce:i:1
This does not work for XP, nor for win2k3.
The string:
domain:s:domainname
does also work with Vista and 2008 Server.
Does anybody know if there is a patch / hotfix available to make promptcredentialonce:i:1 and domain:s:domainname function in XP or 2k3?
promptcredentialonce:i:1
This does not work for XP, nor for win2k3.
The string:
domain:s:domainname
does also work with Vista and 2008 Server.
Does anybody know if there is a patch / hotfix available to make promptcredentialonce:i:1 and domain:s:domainname function in XP or 2k3?
As I said: if you're creating the rdp file dynamically through a script, then this can be done.
First, create an rdp file containing the information you require, then open it in Notepad (or your preferred text editor).
Add all settings (except username and domain) to the stub batch file below where you already see the settings for username and domain, and prepend them with
>>"%RDPFile%" echo
Adjust the name of the rdp file it's generating.
Save it as YourServer.cmd or Whatever.cmd.
Then simply start the script. If you start it through a shortcut, you can give it a nicer icon, for example from mstsc.exe or shell32.dll.
First, create an rdp file containing the information you require, then open it in Notepad (or your preferred text editor).
Add all settings (except username and domain) to the stub batch file below where you already see the settings for username and domain, and prepend them with
>>"%RDPFile%" echo
Adjust the name of the rdp file it's generating.
Save it as YourServer.cmd or Whatever.cmd.
Then simply start the script. If you start it through a shortcut, you can give it a nicer icon, for example from mstsc.exe or shell32.dll.
@echo off
setlocal
set RDPFile=%Temp%\YourServer.rdp
if exist %RDPFile% del "%RDPFile%"
REM *** Create a temporary RDP file containing user information:
>>"%RDPFile%" echo username:s:%UserName%
>>"%RDPFile%" echo domain:s:%UserDomain%
REM *** Start the RDP client with the file just created:
start mstsc.exe "%RDPFile%"
ASKER
Wow, super! I think you just found the solution for me.
In the other sugested link https://www.experts-exchange.com/questions/23147592/Is-it-Possible-to-use-a-HTA-file-and-call-Remote-Desktop.html
it is sort of the same solution using VBScript.
Great, thank you! :-))))))))
In the other sugested link https://www.experts-exchange.com/questions/23147592/Is-it-Possible-to-use-a-HTA-file-and-call-Remote-Desktop.html
it is sort of the same solution using VBScript.
Great, thank you! :-))))))))
No problem. Thanks for the grade.
Regards,
Rob.
Regards,
Rob.
ASKER
The reason I'm looking for a workaround is because of a "logon to: this computer" problem.
We have upgraded our domain Active Directory to Windows server 2008, the functional level is still Windows Server 2003. from that moment on the users started complaining that they couldn't logon to the terminal server. From Remote Desktop Client 6.0 on there are improved authentication security features added, users have to enter their credentials twice. The second time in the "Log on to:" the local computer / server is automatically listed, instead of the domain name. Logon locally is blocked. Users have to manually select the domain to log on to, instead of the local server.
We have enabled the Always prompt for password GPO on the terminal servers. Users logon using a RDD file. It is possible to ad the string "EnableCredSSPSupport:i:0"
The only time it automatically selects the domain to logon to is when we ad the string "username:s:DOMAINNAME\USE
We want to avoid having to create a RDP file for every user, containing the string "username:s:DOMAINNAME\USE
Is there a work around to force "logon to: Domain", to avoid manually having to change it from logon to: this computer?