Beany
07-28-2009, 01:48 AM
Hi All,
i need a vbs script for copying a folder from a server drive to the local drive of clients/users PCs.
We have a small network with 80 users, all on XP who require a folder of information.
Can someone please help me
thanks
DCrake
07-28-2009, 02:11 AM
You can use the File System Objects to do this.
Here is a sample vbscript of what you need. Copy this into a module and use the relevant functions
David
Beany
07-28-2009, 02:15 AM
thanks for that,
i'm relatively new to vbs scripting so can you please tell me how i Copy this into a module and what do i need to change? would i just copy it into notepad and rename the file to a .vbs?
thanks once again
DCrake
07-28-2009, 02:27 AM
How are you intending to call this script? If it is from within a vb project then simply add this to an existing or new module.
David
Beany
07-28-2009, 03:35 AM
i would like to run this as group policy or system policy. So when a client switches a network machine on, a VBS script should run that adds the files from a specific server to the hard drive of the user...
Beany
07-28-2009, 05:09 AM
I'm using the following vbs script for adding two fonts to all client machines and it works:
' ************************************************** **************************
' Copy Fonts From Network Share To C:\WINDOWS\FONTS Folder Of Workstation
' ************************************************** **************************
Set WshShell = CreateObject("WScript.Shell")
WshShell.Run "xcopy.exe ""\\SERVERLOCATION"" ""C:\windows\fonts"" /C /I /S /E /H /Y /Q", 1,True
' ************************************************** **************************
' Imports The Registry Information For The New Fonts - Add A New Line For Each New Font
' Example : WshShell. RegWrite"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts\%FONT REG KEY%", "%FONT REG KEY ENTRY%", "REG_SZ"
' ************************************************** **************************
Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell. RegWrite"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts\FuturaT (TrueType)", "FuturaT.ttf", "REG_SZ"
WshShell. RegWrite"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts\FuturaTDem (TrueType)", "FuturaTDem.ttf", "REG_SZ"
Can this be amended and used for copying files from server to hosts? thanks