-
May 15th, 2018, 06:03 AM
#1
Thread Starter
New Member
need to open file on remote desktop (rdp)
I want to open a file on remote desktop. I am not able to reach C: drive (or any folder) on the remote connection. The code I am running does open the remote connection, but doesnt routes to the desktop or any other folder. Code is below (it seams the second "C:\" is not being executed) - Please help
Option Explicit
Private Declare PtrSafe Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, _
ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
Private Const SW_HIDE As Long = 0
Private Const SW_SHOWNORMAL As Long = 1
Private Sub Command1_Click()
Dim retval As Variant
Dim myid, mypw As String
retval = Shell("cmdkey /generic:TERMSRV/remotename /user:" & myid & " /password:" & mypw)
ShellExecute 0&, "Open", "C:\windows\system32\mstsc.exe", " /admin /v:remotename", "C:\", SW_SHOWNORMAL
End Sub
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|