Announcement

Collapse
No announcement yet.

Running batch file on remote system

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

  • Running batch file on remote system

    Hello,

    I am having a problem that I cannot figure out.

    If I run "N:\Hyena\HyenaTools\Pstools\psexec \\wks1018 -s -c trackituninstall_from_support.bat" from the command line, it works perfectly. However, when I use this as a custom tool, it just flashes by real quick but does not work.

    I don't know if it is the syntax of the tool or what. Any advice is appreciated.

    Thank you

    Matt

    [This message has been edited by mattwray (edited 10-18-2005).]

  • #2
    Re: Running batch file on remote system

    What is the exact syntax of the tool you created in Hyena?

    Comment


    • #3
      Re: Running batch file on remote system

      N:\Hyena\HyenaTools\Pstools\psexec.exe \\%E% -s -c trackituninstall_from_support.bat

      Comment


      • #4
        Re: Running batch file on remote system

        Change it to this and see what that does:

        cmd /x /c N:\Hyena\HyenaTools\Pstools\psexec.exe \\%E% -s -c trackituninstall_from_support.bat

        If that doesn't work, add &pause to the end to see if you can stop the command window to see what error you are getting. You may need to give the full path to the batch file itself too.

        Comment


        • #5
          Re: Running batch file on remote system

          All of my custom tools have a full path to the batch file needing to run. In my case it's a shared folder where Hyena tools reside. Seeing as how the psexec is using your creditials as well it can access the share point. It also makes it easier to share your tools with other admins or rebuilding your system.

          Comment


          • #6
            Re: Running batch file on remote system

            I have tried the way cmcollough posted and also shared out the directory as trammel suggested, but still no.

            This is what I get when I add the & pause:

            PsExec v1.31 - execute processes remotely
            Copyright (C) 2001-2002 Mark Russinovich www.sysinternals.com

            The specified application is not on the path.

            Press any key to continue . . .


            Any ideas? I thought by using the -c it would copy the batch file to the local drive and then run it...

            Comment


            • #7
              Re: Running batch file on remote system

              Something that seems related...

              When I run the command, I get the same application error unless I cd into the directory where psexec resides...

              Comment


              • #8
                Re: Running batch file on remote system

                Try moving this to a batch file so you can add your change directory to it. Call it hyena.bat and see if this format helps:

                cmd /x /c c:\hyena.bat %E%

                Then hyena.bat would look like:

                N:
                cd \Hyena\HyenaTools\Pstools
                psexec.exe \\%1 -s -c trackituninstall_from_support.bat
                pause

                See where you get from there.

                Comment


                • #9
                  Re: Running batch file on remote system

                  Thank you! That did the trick.

                  I have a related issue unfortunately. When I do his buddy, trackitunc.bat (the installer) it fails with no output.

                  All I did was edit the uninstall batch file to reflect the other file name, but no dice.

                  My friend gave me a vb script that works also from command line, but I cannot run it from hyena. Either way is fine, whichever is easier for help with.

                  I call the vb with C:\cscripts hyena.vbs

                  thanks again

                  Comment


                  • #10
                    Re: Running batch file on remote system

                    I'm not sure on that one. I have no way of knowing what your script is looking for, etc.

                    Comment

                    Working...
                    X