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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

run program on remote xp pro workstation

Status
Not open for further replies.

bookouri

IS-IT--Management
Feb 23, 2000
1,464
US
Is there a powertool or some utility to allow somebody to run exe's on another machine remotely?

 
Well, you can get in through Remote Desktop or Netmeeting and take control of their entire desktop and do anything in the world that you want to their computer until you screw it up so badly that you lose the network connection.

I dont know of any that will let you do something like that remotely; it sounds like a hackers dream... Do you mean like pushing out an update or a program in a 2000/2003 domain? I know you can do that, but nothing like what you want.
 
Q. What is the difference between Remote Desktop and Remote Assistance?


Remote Desktop, which allows users to control their machines from a remote computer, and Remote Assistance, which lets users ask for help and allows them to give access to their computer to others. While both features involve remote access, they have different uses.

Both of these features use the same underlying technology, but they're quite different from the user's perspective. Remote Desktop is for users who want to work on the remote computer. On the other hand, Remote Assistance allows people to offer and ask for help remotely.

Below are some of the other differences.

Remote Assistance requires an invitation. If you want to connect to a remote computer, the user must invite you. After you connect, the remote user needs to manually grant you access. There's no invitation and granting process with Remote Desktop; you just connect to the remote computer and type your username and password.

Remote Desktop requires a username and password on the remote machine. With Remote Assistance, you don't need the user account; the remote user manually grants you control when you connect. You can only use Remote Assistance when the user who needs help logs onto the remote computer.

With Remote Assistance, both users see the same desktop. With Remote Desktop, you're the only one who sees your desktop. Other users see the welcome screen.

You use the Help And Support Center with Remote Assistance; you use the Remote Desktop Connection with Remote Desktop.

Only users who have Windows XP can offer or accept help via Remote Assistance. With Remote Desktop, you can connect to Windows XP machines from computers running Windows 9x, Windows NT, and Windows 2000.

Only Windows XP Professional supports Remote Desktop. Remote Assistance is available on both Professional and Home Edition.

Download the Remote Desktop Client from Microsoft's Site or from the XP CD, if you want to connect from anything other than XP.

How to use the Remote Desktop feature of Windows XP Professional

300546 - Overview of Remote Assistance in Windows XP
 
I found a little vbs script that works great and does exactly what i needed.

I dont remember where i found it but the creator's name is in it.

'ReRun
' Written by Martin Krolik (martin@krolikconsulting.com)
' Copyright 2003
' You are free to use this script for commercial and non-commercial purposes at your own risk.
' No guarantee is given or implied.

' testpass explorer
Set objArgs = Wscript.Arguments

If objArgs.Count < 5 Then
Wscript.Echo "ReRun.vbs: " & Chr(13) & Chr(10) & "Starts a application on a remote machine (desktop)" & Chr(13) & Chr(10) _
& "At least 5 arguments are required : usage ReRun.vbs COMPUTER HOURMINUTE USER PASSWORD COMMANDLINE [COMMANDLINEARGS] " & Chr(13) & Chr(10) _
& "Example: ReRun.vbs TheBoss 1305 mark passWord notepad.exe " & Chr(13) & Chr(10) _
& " (Will kick off notepad on the users desktop at 1:05 pm (scheduled as user mark)" & Chr(13) & Chr(10) _
& " " & Chr(13) & Chr(10) _
& "Written by Martin Krolik (martin@krolikconsulting.com) " & Chr(13) & Chr(10) _
& "Copyright 2003" & Chr(13) & Chr(10) _
& "You are free to use this script for commercial and non-commercial purposes at your own risk." & Chr(13) & Chr(10) _
& "No gaurantees are given or implied." & Chr(13) & Chr(10) _


Else

strComputer = objArgs(0)
strHourMinute = objArgs(1)
strUserId = objArgs(2)
strPassword = objArgs(3)
strCommand = """" & objArgs(4) & """"
blnGetCurrentTime = False

If strHourMinute = "proc" Then
strMode = "Process" ' can not be interactive with desktop due to security reasons
Else
If strHourMinute = "now" Then
blnGetCurrentTime = True
End If
strMode = "Scheduled At Job" ' Will be interactive with the desktop
End If

If objArgs.Count > 5 Then
For I = 5 to objArgs.Count - 1
strCommand = strCommand & objArgs(I) & " "
Next
End If

Set objLocator = CreateObject("WbemScripting.SWbemLocator")

If strUserId = "identify" Then
Set objWMIService = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")

'Set objWMIService = objLocator.ConnectServer(strComputer, "root\cimv2")
'objWMIService.Security_.ImpersonationLevel = 2

Else

Set objWMIService = objLocator.ConnectServer(strComputer, "root\cimv2", strUserID, strPassword)
objWMIService.Security_.ImpersonationLevel = 3
End If

If objWMIService is Nothing Then
Wscript.Echo "Could not establish connection to specified computer."

Else

If strMode = "Process" Then
Set objNewProcess = objWMIService.Get("Win32_Process")
errProcessCreated = objNewProcess.Create(strCommand, null, null, intProcessID)
If errProcessCreated <> 0 Then
Wscript.Echo "Error in process creation"
Else
Wscript.Echo "Process created"
End If

Else

Set colItems = objWMIService.ExecQuery("Select * from Win32_TimeZone")
For Each objItem in colItems
strBias = objItem.Bias
Next

If blnGetCurrentTime = True Then
objDate = DateAdd("n", 1, Now)
strHourMinuteSecond = FixedLengthNumber(Hour(objDate),2) & FixedLengthNumber(Minute(objDate),2) & FixedLengthNumber(Second(objDate),2)
strTime = "********" & strHourMinuteSecond & ".000000" & strBias
Else
strTime = "********" & strHourMinute & "00.000000" & strBias
End If


Set objNewJob = objWMIService.Get("Win32_ScheduledJob")
errJobCreated = objNewJob.Create (strCommand, strTime, False, 0, , True, JobID)
If errJobCreated <> 0 Then
Wscript.Echo "Error on task creation"
Else
Wscript.Echo "Task created"
End If
End If
End If
End If

Function FixedLengthNumber(vNumber, vLength)
' Prepends an integer with zeros so that the resulting string is of a minumum length
Dim vTemp, n
If Len(vNumber) < vLength then
vTemp = ""
For n = 1 to (vLength - Len(vNumber))
vTemp = vTemp & "0"
Next
FixedLengthNumber = vTemp & vNumber
Else
FixedLengthNumber = vNumber
End If
End Function
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top