Hi,

I am trying copy some .otf files from my source location to C:\Windows\Fonts folder through Wscript.
The script is working fine and copying .otf files to C:\Windows\Fonts folder in XP machine but in Windows 7 the files are not getting copied. The below is the source code. Kindly let me know what is the issue.

item: Get Environment Variable
Variable=SYSTEMROOT
Environment=SystemRoot
end
item: Copy Local File
Source=%INST%\*.otf
Destination=%SYSTEMROOT%\Fonts\
Flags=0000000111100010
end
0 Comments   [ + ] Show Comments

Comments

Please log in to comment

Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.

Answers

0
I always use the predefined [FontsFolder] when dealing with fonts. sorry, not applicable for wscript
Maybe
FontsFolder
The full path of the System Fonts folder.

FOLDERID_Fonts (CSIDL_FONTS)
Answered 11/22/2011 by: oreillyr
Fifth Degree Brown Belt

Please log in to comment
0
I always use the predefined [FontsFolder] when dealing with fonts. sorry, not applicable for wscript
Maybe
FontsFolder
The full path of the System Fonts folder.

FOLDERID_Fonts (CSIDL_FONTS)
Answered 11/22/2011 by: itworkedyesterday
Senior Yellow Belt

Please log in to comment
0
Try running it with right click, "run as admin".
Answered 11/22/2011 by: jmaclaurin
Third Degree Blue Belt

Please log in to comment
0
Tried running as administrator but still fonts files are not copied to C:\windows\Fonts folder.
Answered 11/22/2011 by: Varaprasad
Yellow Belt

Please log in to comment
0
To avoid any confusion, what you have here is WiseScript, not WScript.

Do you have UAC enabled?
Answered 11/23/2011 by: VBScab
Red Belt

Please log in to comment
0
I tried copying font files manually then i found that only few font files are copied rest are not.
Could you tell whether can we copy to fonts folder in windows 7 or we have to register the fonts?
Answered 11/23/2011 by: Varaprasad
Yellow Belt

Please log in to comment
0
Yes. When copying to C:\Windows\Fonts, it does require administrator rights.
You may want to perform the below steps through your script, this solution is offered on technet article.

Log on as administrator. Open command prompt as admin.
attrib -r -s %systemroot%\fonts
takeown /f "%systemroot%\fonts" /r /d n
(optional - gives administrators full rights on the fonts folder): icacls "%systemroot%\fonts" /grant administrators:F /t
You can now add or change permissions on the Fonts folder like any regular folder.
Give user(s) modify access to %systemroot%\Fonts
icacls "%systemroot%\fonts" /grant USERNAMEorGROUP:M /t
Give user(s) modify access to %systemroot%\system32\FNTCACHE.dat
icacls "%systemroot%\system32\FNTCACHE.dat" /grant USERNAMEorGROUP:M /t
Give user(s) modify access to HKLM\Software\Microsoft\Windows NT\Current Version\Fonts
Answered 11/24/2011 by: SandeepPanat
Orange Senior Belt

Please log in to comment
Answer this question or Comment on this question for clarity