I'm a student away from home and I need to access my home computer with Remote Desktop Connection. I have a privileged user account on that machine, and I could tell my family to enable RDP, but I don't want them to know my password.
I assume I can make a .reg file to activate RDP, but this could require administrative privilege, which my family's user accounts don't have.
My idea is to send them a script wich they run and RDP gets activated. I would make a batch file and embed it into some Delphi or python executable, just not to store the password in plain text. Security is not a major concern, but I don't want them to look into my documents (they don't know linux live usb or cds).
I tried echo password&&echo.|runas /user:myusername regedit
to pass it the password but it returns "Logon failure: unknown user name or bad password".
Trying runas
providing the correct password by hand returns: The requested operation requires elevation.
Someone has an idea?
You can pass your password do runas.exe
by using SendKeys method in VBScript:
Set oShell = CreateObject("WScript.Shell")
oShell.Run "cmd /c runas /user:myusername regedit",1
WScript.Sleep 1000
oShell.SendKeys "mypassword{Enter}"
I am sure you can find similar method in Delphi and other programming languages.
And here you can find how to enable remote desktop by using the registry.