Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C#
  4. Invoking a cmd command on remote machine

Invoking a cmd command on remote machine

Scheduled Pinned Locked Moved C#
csharpsysadminregexquestion
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    CodingYoshi
    wrote on last edited by
    #1

    I need to read a file from over 200 pcs on our network using a C# application. This file might not exist so creating it is an easy process--just running a command from the command line on remote pc. I found a tool called psexec which allows running commands on remote pcs: I simply use this tool and run the command. However, it takes very long and I have to keep checking if the file exists. If I run the command on the remote pc right at the remote pc then it is instantaneous. Is there a better alternative? I simply need to do the following: 1. Check if a file exists and delete it. 2. Recreate the file by running the command on remote pc. 3. Read the file. I am sure others have had to do this before.

    CodingYoshi Artificial Intelligence is no match for Human Stupidity.

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups