INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

Excel Macro to launch remote command

Excel Macro to launch remote command

(OP)
Looking for help with creating a macro to launch a command or script on a remote server, and return success or fail.

RE: Excel Macro to launch remote command

How far away is the remote server?

RE: Excel Macro to launch remote command

(OP)
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.

RE: Excel Macro to launch remote command

You could use VBA to run the PsExec via command line.

From: https://stackoverflow.com/questions/20917355/how-d...

CODE --> VBA

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 

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close