Archive: How to get FontDir?


How to get FontDir?
How can I get the FontDir Path?

Must I use $WINDIR\Fonts ?

-- Peter


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

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.


Re: Find Font's Folder
Quote:



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

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.