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
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)
Please log in to answer
Posted by:
oreillyr
12 years ago
Posted by:
Varaprasad
12 years ago
Posted by:
anonymous_9363
12 years ago
Posted by:
itworkedyesterday
12 years ago
Posted by:
Varaprasad
12 years ago
Posted by:
SandeepPanat
12 years ago
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
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.
so that the conversation will remain readable.