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

Excel Macro to launch remote command

Status
Not open for further replies.

chester27

IS-IT--Management
Apr 29, 2002
208
0
0
GB
Looking for help with creating a macro to launch a command or script on a remote server, and return success or fail.
 
100's of miles away. We only have RDp access, and is the only box with the application we want to call. I can do it using calls to batch files that use PsExec from Sysinternals, but this is not practical to place on 100's of PC's

Just looking for maybe a function to call and execute the command on the remote server, and have this controlled by a button on an excel spreadsheet.
 
You could use VBA to run the PsExec via command line.

From:
Code:
Public Sub StartExeWithArgument()
    Dim strProgramName As String
    Dim strArgument As String

    strProgramName = "C:\Program Files\Test\foobar.exe"
    strArgument = "/G"

    Call Shell("""" & strProgramName & """ """ & strArgument & """", vbNormalFocus)
End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top