Announcement

Collapse
No announcement yet.

Running Type command remotely

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Running Type command remotely

    Can someone help.

    We are trying to write a custom tool that will run the typ command on the host file of a remote pc.

    On a local machine the command:

    type %windir%\systems32\driver\etc\hosts

    Should display the host file in a command prompt.

    We want a tool that will display the host file of a server on the admin pc in a command prompt

    we have tryed using psexec to do this with the syntax: cmd /x /c m:\hyena\hostfile.bat %E% &pause

    hostfile.bat cconatins:

    M:
    cd \PSEXEC
    psexec.exe \\%1 "type %windir%\systems32\driver\etc\hosts"
    pause

    this and several other variations have been tryed and it always falls over.

    Any Ideas?

  • #2
    Re: Running Type command remotely

    Here is my command from Hyena Tools Settings.
    Command name:<span style="font-weight: bold">Remote Command Prompt</span>
    Command:<span style="font-weight: bold">cmd /c cls & \\servername\scripts\Hyenatools\PsTools\psexec \\%E% cmd & pause</span>

    I use the pstools from a central shared folder because I share the tools with other admins. You could do it localy if you wish.

    Comment

    Working...
    X