/build/static/layout/Breadcrumb_cap_w.png

Copying .otf files to C:\windows\Fonts in Windows 7

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

Answers (7)

Posted by: oreillyr 12 years ago
Fifth Degree Brown Belt
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)
Posted by: jmaclaurin 12 years ago
Third Degree Blue Belt
0
Try running it with right click, "run as admin".
Posted by: Varaprasad 12 years ago
Yellow Belt
0
Tried running as administrator but still fonts files are not copied to C:\windows\Fonts folder.
Posted by: anonymous_9363 12 years ago
Red Belt
0
To avoid any confusion, what you have here is WiseScript, not WScript.

Do you have UAC enabled?
Posted by: itworkedyesterday 12 years ago
Senior Yellow Belt
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)
Posted by: Varaprasad 12 years ago
Yellow Belt
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?
Posted by: SandeepPanat 12 years ago
Orange Senior Belt
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
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ