General discussion


Remote Distribution of single file

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?

This conversation is currently closed to new comments.

3 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

by mschlank In reply to Remote Distribution of si ...

Point value changed by question poster.

Collapse -

by shmaltz In reply to Remote Distribution of si ...

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.

Collapse -

by Grzegorz_Osimowicz In reply to Remote Distribution of si ...

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

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+

Back to Windows Forum
3 total posts (Page 1 of 1)  

Related Discussions

Related Forums