Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Username of other computer

Status
Not open for further replies.

vanvb

Programmer
Feb 7, 2003
255
CA
I have a program that returns the username of the current user on the computer and writes it to a central file. When I run it, everything works fine. The problem is that I need to call it from another machine and have it run for the machine that it is sitting on. If I call it locally while sitting in front of the machine, it works. If I call it from another machine, it is returning the user name of the calling machine so the program essentially then runs on the calling machine rather than the local machine where the program is sitting.

I hope I explained that well.

How do I call a program from another machine and have it run locally on the machine it is sitting on?
I'm calling the .exe from a batch file.
 
Sorry, another thought.
Alternately to the above, if someone knows how to get the username from another computer, that would be just as good, but the people using the computer will not be administrators, so rights issues would come into play. That's why I am doing it as above.
 
DCOM suggests itself as a solution, but I'll need a little time to "fudge" one together... Take Care

Matt
If at first you don't succeed, skydiving is not for you.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top