hello
i want to delete font in the font's folder.
in my script to install font, i use this:
ReadRegStr $R1 \
HKCU "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" "Fonts"
SetOutPath "$R1"
file "..\tools\fonts\*.*"
for me it's good
after in the uninstall section, i write:
Delete "$R1\N01bc*.*"
Delete "$R1\Ocrb.ttf"
when i uninstall nothing happened, fonts remain in font's folder.
can you help me
sorry for my english
delete fonts
8 posts
The Uninstall and Install sections are completely seperate executables.
Therefore, the value of $R1 in the install section will be fine, but in the uninstall section it will be blank "" because you need to read the fonts directory value from the registry again.
-Stu
Therefore, the value of $R1 in the install section will be fine, but in the uninstall section it will be blank "" because you need to read the fonts directory value from the registry again.
-Stu
i added in uninstall section
ReadRegStr $R1 \
HKCU "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" "Fonts"
Delete "$R1\N01bc*.*"
Delete "$R1\Ocrb.ttf"
but nothing happen again. is it not necessary to uninstall font with registry??
and i want to know if i put delete "$R1\N01bc*.ttf", it del all files who begin by "N01bc" because i have lot of font like N01bc72n.ttf, N01bc54n.ttf...
thanks
ReadRegStr $R1 \
HKCU "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" "Fonts"
Delete "$R1\N01bc*.*"
Delete "$R1\Ocrb.ttf"
but nothing happen again. is it not necessary to uninstall font with registry??
and i want to know if i put delete "$R1\N01bc*.ttf", it del all files who begin by "N01bc" because i have lot of font like N01bc72n.ttf, N01bc54n.ttf...
thanks
Ah ok, maybe windows isn't letting you delete the files.
You should delete them on a PC reboot maybe.
I'm not sure how that's done (I've never been in that area.)
-Stu
You should delete them on a PC reboot maybe.
I'm not sure how that's done (I've never been in that area.)
-Stu
Does it works when you do this? :
Delete "$WINDIR\Fonts\font.ttf"
i tried the reboot, and whem i go one time on font's folder, my fonts are in folder but theirs sizes are at 0kb. but if i'm going to another folder and i back in font's folder, my fonts disappeared.
for me it's good.
thanks
for me it's good.
thanks
You probably need to unregister them first. See this thread about registering and unregistering fonts:
BTW, the function call mentioned in that page won't work with wildcards (* and ?) so you'll have to enumerate all of the fonts that you want to delete using FindFirst, FindNext and FindClose.
Are you a developer who uses NSIS to distribute your application? Are you a Winamp plug-in developer who wants to use NSIS to distribute your plug-in? Have suggestions for other people like you? This is the place.
BTW, the function call mentioned in that page won't work with wildcards (* and ?) so you'll have to enumerate all of the fonts that you want to delete using FindFirst, FindNext and FindClose.
E.g.
-StuFindOpen $0 $1 "C:\blah\*.txt"
loop:
Delete $1
ClearErrors
FindNext $0 $1
IfErrors done
Goto loop
done:
FindClose $0