I'm trying to create a logon script (vbs) to install some fonts. If the fonts are installed I get a prompt saying "There's already a file with the same name in this location".
How can I force the files to be replaced without the prompt?
My script looks like this:
Const FONTS = &H14&
Const FOF_SILENT = &H4&
Const FOF_RENAMEONCOLLISION = &H8&
Const FOF_NOCONFIRMATION = &H10&
Const FOF_ALLOWUNDO = &H40&
Const FOF_FILESONLY = &H80&
Const FOF_SIMPLEPROGRESS = &H100&
Const FOF_NOCONFIRMMKDIR = &H200&
Const FOF_NOERRORUI = &H400&
Const FOF_NOCOPYSECURITYATTRIBS = &H800&
Const FOF_NORECURSION = &H1000&
Const FOF_NO_CONNECTED_ELEMENTS = &H2000&
cFlags = FOF_SILENT + FOF_NOCONFIRMATION + FOF_NOERRORUI
Set objShell = CreateObject("Shell.Application")
Set objFolder = objShell.Namespace(FONTS)
objFolder.CopyHere "\\SERVER01\Fonts\*", cFlags
MSDN suggest (16) Respond with "Yes to All" for any dialog box that is displayed.
but doesn't prevent the prompt.
(I'm using Windows Server 2008)
http://msdn.microsoft.com/en-us/library/windows/desktop/bb787866(v=vs.85).aspx