|
-
Apr 10th, 2001, 09:56 AM
#1
Thread Starter
Black Cat
How would I write a program that displays its output to the screen of the user who is logged on locally and physically seated at the computer? I have a utility downloaded from www.sysinternals.com that allows me to execute programs remotely on a NT network, and it works great for command-prompt type programs as it seems to redirect standard input and output to and from my command-prompt. However, I can launch graphical apps, and they run, but they don't display to the user's screen - they just show up under the task lists. I'm assuming they display to a "screen" created for me as a remote log-in - can I force them to the context of the local user?
Last edited by JoshT; Apr 10th, 2001 at 10:55 AM.
Josh
Get these: Mozilla Opera OpenBSD
I have books for sale: "MCSD in a Nutshell" and "VB Distributed Exam Cram" - PM me for details. Will also trade for a decent ATX Pentium 2 MB/CPU/RAM combo.
-
Apr 10th, 2001, 10:45 AM
#2
Code:
Private Declare Function GetUserName Lib "advapi32.dll" Alias "GetUserNameA" _
(ByVal lpBuffer As String, nSize As Long) As Long
Private Sub Form_Load()
Dim strUserName As String
strUserName = String(100, Chr$(0))
GetUserName strUserName, 100
strUserName = Left$(strUserName, InStr(strUserName, Chr$(0)) - 1)
MsgBox "Hello " & strUserName & " !"
End
End Sub
Will find the user name, use the getwindowsdirectory API call to return the windows path & you can search for a folder named this strusername under %windir%\Profiles\ folder
Last edited by alex_read; Apr 10th, 2001 at 10:50 AM.
-
Apr 10th, 2001, 11:05 AM
#3
Thread Starter
Black Cat
Huh?
?????
I'm not sure how your reply answers my question, alex.
GetUserName would return my username, or whatever I used to log onto the other computer, probably. The code you gave would never show to a screen because I don't seem to have a screen to display graphics to. I want to "hijack" the local user's screen (benevolently). What I think I would need is an API call so that no matter what user started the thread, its graphical output would go to the "interactive session" or something.
Josh
Get these: Mozilla Opera OpenBSD
I have books for sale: "MCSD in a Nutshell" and "VB Distributed Exam Cram" - PM me for details. Will also trade for a decent ATX Pentium 2 MB/CPU/RAM combo.
-
Apr 11th, 2001, 06:03 AM
#4
I've looked onto the site to see if I can make more sense of this, could you post a link to the actual program you downloaded from this site please ?
-
Apr 11th, 2001, 07:05 AM
#5
Thread Starter
Black Cat
http://www.sysinternals.com/ntw2k/fr.../pstools.shtml, or more specifically, the psexec program. When I was looking through MSDN, it seems I'd have to look into winstation or the behavior of services to find what I'd want to do.
Josh
Get these: Mozilla Opera OpenBSD
I have books for sale: "MCSD in a Nutshell" and "VB Distributed Exam Cram" - PM me for details. Will also trade for a decent ATX Pentium 2 MB/CPU/RAM combo.
-
Apr 11th, 2001, 07:08 AM
#6
Oh God, you want to do a PCAnywhere type app. Gotcha now, you want to run it from their system. Sorry, but this is slightly out of my leaque! 
Have you looked at the Winsock add in component with vb ?
-
Apr 11th, 2001, 10:06 AM
#7
Thread Starter
Black Cat
Yeah, I'm thinking it's more trouble than I need. I wanted to do something where I wouldn't need to install anything.
I've used the Winsock control, and even a little with the Winsock API.
Josh
Get these: Mozilla Opera OpenBSD
I have books for sale: "MCSD in a Nutshell" and "VB Distributed Exam Cram" - PM me for details. Will also trade for a decent ATX Pentium 2 MB/CPU/RAM combo.
-
Apr 13th, 2001, 02:52 AM
#8
Member
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
|