0

I see in this doc (https://learn.microsoft.com/en-us/windows/win32/shell/folder-copyhere ) that we can pass flag to remove this type of modal :

enter image description here

But actually nothing works, the modals don't go away

My code to install font, that I want without alert modal:


Set objFSO = CreateObject("Scripting.FileSystemObject")

objStartFolder = CStr(WScript.Arguments.Item(0))
Const FONTS = &H14&

Set objShell = CreateObject("Shell.Application")

Set objFontFolder = objShell.Namespace(FONTS)
Set objFolder = objFSO.GetFolder(objStartFolder)

Set colFiles = objFolder.Files
For Each objFile in colFiles
    objFontFolder.CopyHere objFile.Path, 16
Next

Geert Bellekens
  • 12,788
  • 2
  • 23
  • 50
  • This might help point you in the right direction - [How do I pass option flags to Folder.CopyHere in PowerShell?](https://stackoverflow.com/a/19391007) – user692942 Dec 07 '22 at 16:27
  • Might also be useful - [How to implement Bit Flags in VBScript](https://stackoverflow.com/a/70747551) – user692942 Dec 07 '22 at 16:27
  • You might be better off just [using FSO to copy the folders](https://serverfault.com/a/362265/199051). – user692942 Dec 07 '22 at 16:35
  • Does this answer your question? [Windows Boxes should be hidden or confirm per vbs](https://stackoverflow.com/questions/70173260/windows-boxes-should-be-hidden-or-confirm-per-vbs) – LesFerch Dec 07 '22 at 16:49
  • Maybe this [answer](https://stackoverflow.com/a/70178761/15764378) will help? – LesFerch Dec 07 '22 at 16:50

0 Answers0