Skip to content
⌘ NSIS Forum Archive

How to get FontDir?

4 posts

F. Heidenreich#
Hi Peter,

yes, I think the fonts system folder is located at $WINDIR\Fonts on all versions of Windows.

To be safe, you could check it at runtime of your app by using the shell function
SHGetSpecialFolderLocation
with the param CSIDL_FONTS.

Regards,
~ Flo
FreeNsisTweaker#
Find Font's Folder

If you wanna find the Font-Folder use this:

InstallDirRegKey HKCU "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" "Fonts"
Put this in one line with (!!!) the quotes.
justin#
Re: Find Font's Folder

Originally posted by FreeNsisTweaker
If you wanna find the Font-Folder use this:

InstallDirRegKey HKCU "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" "Fonts"
Put this in one line with (!!!) the quotes.


Err, if you want to just drop a file off in the fonts dir, you could do:


ReadRegStr $OUTDIR HKCU "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" "Fonts"
StrCmp $OUTDIR "" NoFonts
File myfont.ttf
NoFonts:
-Justin