Jump to content

Hello all and help please.....


Recommended Posts

Posted

Hello Guys n girls

how are you doing?

 

i have been lurking for a while and wanted to join and say hi, and now i have a problem

why not say hi today...

 

 

ok my problem.

 

i want to copy a normal.dotm on a fileserver

to all the users on a winxp machine during office2007 install process.

 

i have created an xcopy batch file but it doesnt seem to work.

 

So ....how do i copy normal.dotm to all the profiles (appdata\microsoft\templates) using a batch file.

 

 

oh and the gpo is broken so not an option at the moment :)

any help is greatly appreciated

 

Neal

Posted
It being a template file, would a course of action not be to modify the pointing of the application to a central location for all template files. This still requires work, but makes templates more centrally managed.
Posted

Hi Greed,

 

thanks for your response.

the workgroup templates are covered thats fine, its just copying the normal.dotm down to the c:\documents and settings\username or profile\application data\msoft\templates

whilst logged in as administrator im having probs with.

Posted
by being given a office (new role ive only just joined the firm) with 50+ pcs all imaged in such a way that they do not pick up the gpo :)
Posted
Hi Greed,

 

thanks for your response.

the workgroup templates are covered thats fine, its just copying the normal.dotm down to the c:\documents and settings\username or profile\application data\msoft\templates

whilst logged in as administrator im having probs with.

 

I have found the answer to my problems

 

The below script works needed a tweak or two but works well

 

 

 

Dim fso

Dim oFolder1, objFolder, oFolder

Dim path

Dim WSHShell

Dim colFolders

Dim sDocsAndSettings

Dim strComputer

 

strComputer = "."

 

Set WSHShell = CreateObject("WScript.Shell")

Set fso = createobject("Scripting.FileSystemObject")

 

'SPECIFY THE PATH OF THE FOLDER IN WHICH SOURCE FILES RESIDE

Set oFolder1 = fso.GetFolder("q:\Templates\normal.dotm")

 

'COPY FILES TO USER PROFILES

sDocsAndSettings = "C:\Documents and Settings\"

Set colFolders = fso.GetFolder(sDocsAndSettings)

 

For Each oFolder In colFolders.SubFolders

Select Case LCase(oFolder.Name)

Case "admin", "administrator", "newuser", "all users", "default user.original", "localservice", "networkservice"

'LEAVE THE DEFAULT PROFILES ON THE MACHINE

Case Else

' Check for the path

If fso.FolderExists(sDocsAndSettings & oFolder.Name & "\Application Data") Then

'COPY FOLDER TO USER PROFILE

fso.CopyFolder oFolder1, sDocsAndSettings & oFolder.Name & "\Application Data\Microsoft\Templates" ,True

End If

End Select

Next

 

Set fso = Nothing

Set WSHShell = Nothing

 

far be it for me to take all the credit, original code from below

Script to Copy Files/Folders to All the User Profiles on the Machine | Symantec Connect

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...