General discussion

  • Creator
    Topic
  • #2316301

    Remote Distribution of single file

    Locked

    by mschlank ·

    We use W2K Professional on all PCs, and W2K Server with AD & Group Policies.

    Is there an easy way to remotely distribute a “single file”, such as a .doc, .dll, .ini, or .reg file so it’s remotely distributed to a specific location on several user’s local Hard Drives? So that the “single file” will either be new or replace an old file on the users’ local hard drives.

    With NT, we used our “copydown”, is there an easy way to do this thru W2K?

All Comments

  • Author
    Replies
    • #3380597

      Reply To: Remote Distribution of single file

      by mschlank ·

      In reply to Remote Distribution of single file

      Point value changed by question poster.

    • #3380484

      Reply To: Remote Distribution of single file

      by shmaltz ·

      In reply to Remote Distribution of single file

      Use a logon script. However keep in mind, in AD there is 2 options for Logon scripts: one is in the user properties, and the second one is in the group policy. I’m not sure about the one from the group policy (nor do I know which one is processesd first), but I don know that the one from the user properties will run in the security context of the logged on user, which means that if the user doesn’t have admin rights they cannnot delete/overwrite all the files on their machine, nor can they register dlls.

    • #3380380

      Reply To: Remote Distribution of single file

      by grzegorz_osimowicz ·

      In reply to Remote Distribution of single file

      Probably the easiest way to go about it is to write a simple batch using the “for” command.

      Eg.
      For /f %a in (c:\computers.txt) do copy c:\file-to-be-copied \\%a\C$\destination_folder

      The above line would copy a file from the local machine to c:\destination_folder folder on remote machines. All you need to do is create a file (c:\computers.txt in this case) that lists the remote computers you want to perform a given operation on.

      If a given action needs to be initialized from a remote machine you can use the “for” command together with “at”.

      Say you need to distribute a registry file.

      for /f %a in (c:\computers.txt) do at \\%a 20:00 x:\reg.bat

      The reg.bat:
      Regedit.exe /s “full path/file.reg”

      At 20:00 each machine (listed in the computers.txt) will execute the x:\reg.bat that will, in turn, import the .reg file.

      The nice thing about this approach is that you do not need to wait for your computers to restart (as would be the case if you used startup scripts)- you can quickly perform any operation any time you want. Also, there’s no need for the user logged on to a remote machine to have administrative privilidges.

      Note: As the “at” command runs in the security context of local system it will not be able to recognize any UNC paths (no access to network resources). Therefore, you need to make sure a given network share is mapped to a drive first.

      Hope this helps.

      Greg Osimowicz
      MCSE, A+, Network+

Viewing 2 reply threads