Eexcuting commands in another system command prompt
Can we execute commands another system command prompt .
Thanks for the link .It will work only when logged in user has rights in the other system and need to do some DCOM Settings
I got a code that will connect to the remote compute and i can get the process in the remote computer .But i cant able to find a code to execue commands in it .here is below the code that will make to connect remote computer
' Full Computer Name
' can be found by right-clicking My Computer,
' then click Properties, then click the Computer Name tab)
' or use the computer's IP address
strComputer = "FullComputerName"
strDomain = "DOMAIN"
Wscript.StdOut.Write "Please enter your user name:"
strUser = Wscript.StdIn.ReadLine
Set objPassword = CreateObject("ScriptPW.Password")
Wscript.StdOut.Write "Please enter your password:"
strPassword = objPassword.GetPassword()
Set objSWbemLocator = CreateObject("WbemScripting.SWbemLocator")
Set objSWbemServices = objSWbemLocator.ConnectServer(strComputer, _
"ntlmdomain:" + strDomain)
Set colSwbemObjectSet = _
objSWbemServices.ExecQuery("Select * From Win32_Process")
For Each objProcess in colSWbemObjectSet
Wscript.Echo "Process Name: " & objProcess.Name
You will always need rights to do this on a remote machine. If this was not the case then you could just start something on anyone's machine, that too without their permission.
But Im able to access their Process using the their user name and password using the above the code .I can also able to terminate the process .
I dont know how to proceed with executing the commands .
What kind of command you want to launch? Because many methods limit the process to be launched in a non-interactive fashion. Which means there will be no UI displayed for the process or command you launch
What im trying to achieve is ,there is some agent is running in the machine .i have to give some commands in the command prompt to do some activity that will trigger a service which will inturn do some activities .I