Link to home
Start Free TrialLog in
Avatar of mmalik15
mmalik15

asked on

Run a Ms-Dos Command Remotely

Hi,

I need to run a Ms-Dos command from one server to another. say i m on  server 78.246.105.126 and need to execute a command on 78.246.105.125 how would I execute that command. The background of the problem is i have  search server program installed on 78.246.105.125 and I need to run a clear search command like indexeradmin clearcollection ABC from 78.246.105.126?

78.246.105.125 has windows server 2003 installed on it.
ASKER CERTIFIED SOLUTION
Avatar of LeDaouk
LeDaouk
Flag of Lebanon image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
You want to use PSExec from the above link.  You issue the following to run the program

psexec \\computername programname.exe
Avatar of mmalik15
mmalik15

ASKER

thanks for the comments

I have slightly different issue as i dont want to run an exe file on a remote computer.

say if i m logged on 78.246.105.125 and i have command window open i will type in the following command and this command would execute

C:/indexeradmin cleancollection somename

now I want to run and schedule this command using a batch file on 78.246.105.126. I know how to create a task and schedule it, all i m looking for is the command which i need to put in batch file
yeh use it to run the command prompt on the remote computer
psexec \\computername cmd.exe
If you are asking about making a scheduled task, the command is "at".  Go to a command line and issue the following command for instructions.

at /?