Jump to content

Run Script on another pc


Tiger
 Share

Recommended Posts

So as I understand it, you have a script on Computer #1 that you want to run a script on Computer #2 so the script that Computer #1 is executing is actually taking place on Computer #2 (not on computer #1).

About the only way to do that without psexec (which would be the easiest/most reliable way to go cross-operating system) might be doing it through COM, although I don't know whether Vista plays the exact same (being 64 bit) as far as COM goes or not.

AutoIt isn't natively capable of executing scripts/programs in the context of a different machine than the one it's on. (The exception maybe being through COM)

Although based on how I understand what you're asking, I don't see what psexec doesn't do that you want it to, so maybe I don't understand the situation clearly for that matter.

Link to comment
Share on other sites

I have a network with two PC.

1. Vista (Vista-PC)

2. XP (XP-PC)

I have two scripts. Script 1 is on the XP-PC. This script runs the second script on the vista-pc. How can I do this

Script 1

RunWait("\\VISTA-PC\test\setup.exe")oÝ÷ Ù'+vjëh×6MsgBox(0, "", "Setup is running!")
One way is to have a script running in the background on the Vista PC and you send it a message to start the installer program. That could be done by writting a file with an instruction in it on the Vista PC or using TCPIP or UDP.

You could have VNC server on the Vista and use UVNC viewr on the XP PC and remotely control the Vista PC long enough to start the installer.

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
Link to comment
Share on other sites

Have you an example script

Well the easy route would be to download psexec.exe and put it in your C:\Windows\System32 folder.

Then you could use

ShellExecuteWait ("psexec", "\\VISTA-PC C:\test\setup.exe")

For doing it through COM, I'd google how to do that with vbscript and then look at transposing that to AutoIt.

Edited by exodius
Link to comment
Share on other sites

Can everyone help me, please

Psexec looks like it shoul do the job though I have never used it. You need to run it from the cmd prompt to experiment with it. Have you seen the notes here?

Can you bave a script which always runs in the background on the Vista PC? If so then you can use the suggestion I made earlier.

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...