VBS Script (1 Viewer)

Beany

Registered User.
Local time
Today, 11:15
Joined
Nov 12, 2006
Messages
155
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

Remembered
Local time
Today, 11:15
Joined
Jun 8, 2005
Messages
8,626
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
 

Attachments

  • ModFSO.txt
    2.6 KB · Views: 232

Beany

Registered User.
Local time
Today, 11:15
Joined
Nov 12, 2006
Messages
155
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

Remembered
Local time
Today, 11:15
Joined
Jun 8, 2005
Messages
8,626
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

Registered User.
Local time
Today, 11:15
Joined
Nov 12, 2006
Messages
155
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

Registered User.
Local time
Today, 11:15
Joined
Nov 12, 2006
Messages
155
I'm using the following vbs script for adding two fonts to all client machines and it works:

Code:
' ****************************************************************************

' 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
 
Last edited:

Users who are viewing this thread

Top Bottom