Announcement

Collapse
No announcement yet.

Run Attrib command line on remote share

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

  • Run Attrib command line on remote share

    I would like to run the Attrib command on a remote share through Hyena. I would like to be able to select the share from the share list in the Right window in Hyena and run the Attrib command line tool against the share.

    Here's the command the works from the command line.

    Attrib -s -h -r *.* /s /d

    I must be on the computer/server and change to the directory in command line window for this to work.

    I was thinking there should be a way to pass the directory path to Attrib in a tool that would allow me to run this though Hyena without having to actually be on the server/computer.

    Anyone got an idea.

    I have this tool setup in Hyena

    %E% cmd /k Attrib -s -h -r *.* /s /d

    but I get an "access denied" error when I run it. I have full privileges on remote system with my logon credentials so I don't think this is what is causing the error.

  • #2
    Re: Run Attrib command line on remote share

    This won't run the application remotely, but rather will run it locally on your computer. Try using the free Psexec tool from Sysinternals.com and see if it will get this working for you.

    Comment


    • #3
      Re: Run Attrib command line on remote share

      So what's the command line format to use to get it to run with PSEXEC? Does the remote server/computer have to have PSEXEC installed? Can PSEXEC be run against a directory or must it run against a server/computer name?

      Comment


      • #4
        Re: Run Attrib command line on remote share

        No idea unfortunately. Search these boards for psexec and you should find some examples of how to use it. Beyond that it should have a help file of some sort with syntax and such.

        Comment


        • #5
          Re: Run Attrib command line on remote share

          You should be able to make a batch file with the commands you need to do. Then have psexec run it.
          So something like this.
          \\servername\HyenaTools\Pstools\psexec.exe \\%E% -u domain\username -p password -c -f \\servername\HyenaTools\Scripts\attrib.bat
          Then have the batch file append to a text file on a network share.

          Comment


          • #6
            Re: Run Attrib command line on remote share

            The prioblem is the directory that I want to run Attrib against is not always the same. It varies based on where I find a problem.

            Comment


            • #7
              Re: Run Attrib command line on remote share

              oooo tough one.

              Comment


              • #8
                Re: Run Attrib command line on remote share

                Indeed...this is why I posted on the forum. I was hoping someone would be able to help. You have helped greatly with the batch file solution but this unfortunately doesn't give me the flexibility I need. I suppose I could look into a scripting solution but I was hoping to avoid this. I'm not the best script writer in the world.

                Comment


                • #9
                  Re: Run Attrib command line on remote share

                  Sounds like a job for the Supply Guy

                  Comment


                  • #10
                    Re: Run Attrib command line on remote share

                    Sorry Trammel...I'm not here to "save the day"...

                    But I'm here to shine a light:
                    http://www.microsoft.com/technet/scr...5/hey0823.mspx

                    This should start you on the right path MSD_GUY.

                    I'd love to help here, but this one seems a bit intense, considering my workload right now...

                    Hope it helps!

                    Joel

                    Comment

                    Working...
                    X