Execute batch file cmd prompt

Discussion in 'Software' started by MILLWALLFC, Mar 13, 2005.

  1. MILLWALLFC

    MILLWALLFC Bit Poster

    31
    0
    2
    Help required

    I have admin rights on the network and wish to execute a program, I can gain access to the c:/

    by using the run cmd on my pc.

    \\computername c:\$

    I have then put a batch file in the c:\ drive on the other pc.

    However I want to execute this file, can this be done through cmd prompt.

    i.e. is there a command line like .

    run this batch file on COMPUTER NAME

    or is there any other way to execute this program on demand, I know you could just put in the startup, however if the program is exited I would want to restart.

    I have tried double clicking it but it just executes on my pc, and not the other one.

    Thanks in advance.
     
  2. Phil
    Honorary Member

    Phil Gigabyte Poster

    1,680
    7
    87
    you could use PSexec from sysinternals, that will execute a program on a remote PC

    http://www.sysinternals.com/ntw2k/freeware/psexec.shtml
     
    Certifications: MCSE:M & S MCSA:M CCNA CNA
    WIP: 2003 Upgrade, CCNA Upgrade
  3. MILLWALLFC

    MILLWALLFC Bit Poster

    31
    0
    2
    Thanks i will give this a try tomorrow.
     
  4. MILLWALLFC

    MILLWALLFC Bit Poster

    31
    0
    2
    I have had a little play and cannot even get working on this pc, im not sure what im doing wrong where do i put the:

    PSexec file

    This is the line i would liek to use:

    This command copies the program test.exe to the remote system and executes it interactively:

    psexec \\marklap -c test.exe

    but what are the command lines i need to wirte do i do in notepad and call it .bat

    say this for an example

    I want to copy from:

    PC 1
    to
    PC2 and execute

    im not sure what cmd i should be typing in, any help

    Thanks
     
  5. AJ

    AJ 01000001 01100100 01101101 01101001 01101110 Administrator

    6,897
    182
    221
    If its an XP machine why not use the remote desktop facility and execute the file that way. Or you could use VNC. :biggrin
     
    Certifications: MCSE, MCSA (messaging), ITIL Foundation v3
    WIP: Breathing in and out, but not out and in, that's just wrong
  6. MILLWALLFC

    MILLWALLFC Bit Poster

    31
    0
    2
    Yeah XP machine, however want to get used to using batch files, or command prompts.
     

Share This Page

Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.