How do I execute a program on a remote computer?

How do I execute a program on a remote computer?
Who is Participating?
NetminderConnect With a Mentor Commented:
Per recommendation, points NOT refunded and question closed.

EE Admin
What os is the remote computer using

you can use telnet , terminal server , dameware
or any remote control software

also you can install services from remote location
using srvinstw.exe from w2k resource kit
If you give us some more information on what you really want to do, then we can give you some ideas... It really depends on the situation, but I have found ways for running most things remotely. But as I said, it depends on what you're trying to do.
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

logindaniAuthor Commented:
Basically I'm trying to insert a REG file into the registry using "regedit /s <Filename>"

But I would like to be able to run any application like notepad.exe for example.

I saw it is simple to do with WMI, but I can't rely on it being installed on the remote machine.
With regedt32 you can access the registry of a remote Windows NT/2000/XP computer. You can do this via Registry |Select Computer |\\name001
You need to have sufficient rights to do this.

With rcmd from the Windows 2000 resouce kit you can execute remote commands.

Hope this helps.

hendrik999 has exactly what you need for that scenario. You can use WMI or other ways, but if that's all you need then those two should accomplish the taks you mentioned.
logindaniAuthor Commented:
Guys, guys ... I need to do it from WITHIN THE CODE ...,
and I need it to work for NT, 2000 and XP.

Since I don't have WMI on NT, I need one of the 'other ways' you mentioned.
Ahhh, that's what I was talking about. We need to know exactly what you need to do. We did not know that you wanted code to run a remote application. The suggestion that hendrik999 offered met every requirement that you made here.

Now, what do you mean "from WITHIN THE CODE"?

What code are you speaking of? Do you wish to create a VB app or such that you can run on your computer that will execute applications on a remote computer and you want code that you can run to accomplish this?

One of the OTHER WAYS I mentioned would be in fact to use shell scripting to run a remote app such as hedrick999 mentioned. To remotely administer the registry, there are other shell scripting commands you can use to accomplish that using the Windows 2000 Resource Kit Tools. We need to know your requirements a bit better...
logindaniAuthor Commented:
I'm building a VB app that is responsible for configuring servers. I'm mostly configuring the registry but I also need to run exexutables on those servers. I have to support servers that run on NT and 2000.
Hi logindani,
ok, my comment is not for including in your code, but it's a separate file but it works very fine.
Here you can find a very good working remote execute tool. This tool works also with download the exe-file if it doesnt exist on the remote site.
Hope it helps a bit
Well then Hendrik999's idea will work fine then. Using VB code, there is a shell command (I can't remember it off the top of my head.. I haven't programmed in a while) to run shell cripts such as batch files, executables, or others with parameters. Get the Resource kit tools or the application mentioned by gro and call the executables with parameters.
Dear questionner/expert(s)

No comment has been added lately, so it's time to clean up this TA.
I'll leave a recommendation in the Cleanup topic area that this question is to be:

- PAQ'd and pts removed

Please leave any comments here within the next seven days.



Cleanup volunteer
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.