If u are using Novell Network then u can copy ur file in the working directory and add the copy command in the host file. When ever the computer boots it shall run the host file and copy the file onto the computer. This might be possible in other networks also, but i am not sure about that.
I hope this is useful.
Sac
Main Topics
Browse All Topics





by: ScrptMastaPosted on 2004-02-14 at 20:56:32ID: 10363949
Try and see if this doesn't help your cause any. I had to use this for a similar task in the past. What is going on here may be more then you need and you can take out or add what you need to fit for you. Basically what is happening here is as follows:
,70,72,73, 74,79,80,8 1)
l") leSystemOb ject")
I'm going to update a file called myfile.txt on a bunch of computers.
Computers are all in the same subnet 10.1.1.0/24.
1. First thing we do is map a drive to the computer to copy the file.
2. Then we set our object and change its read-only attribute.
3. Then we copy the new file over.
4. Change the file back to read-only
5. Delete the mapped drive
Const OverwriteExisting = True
dim ip, myip
myip = Array(63,64,65,66,67,68,69
For Each ip in myip
Set WshShell = CreateObject("WScript.Shel
Set FSO = CreateObject("Scripting.Fi
WshShell.Run ("cmd /c net use y: \\10.1.1." & ip & "\d$ /user:admin password")
wscript.sleep 2000
set f = FSO.GetFile ("y:\myfolder\myfile.txt")
f.attributes = f.attributes - 1
WshShell.Run ("cmd /c copy /Y c:\myfile.txt y:\myfolder")
wscript.sleep 5000
f.attributes = f.attributes + 1
msgbox "Check and Go Next"
WshShell.Run ("cmd /c net use y: /d")
wscript.sleep 2000
Next
The array consists of the last octet of each computers address. It will map a drive to each one, change the attribute, copy the file, change the attribute back and then kill the connection for each pc.
Now the con with using a script is that there isn't much for error and exception handling. In my example I had to make sure that the file did indeed copy so I kind of set a break by putting the message box in there so I could check before it killed the drive. You can just remove that if you want but if for some reason it errors you wont know where it left off. You can write a log file to send info to or something. You could add "On Error Resume Next" to the top but then you will still need a piece to run after to verify all of the copies took place.