FontSubsitutes.

M

Mark

Hey guys I know this issue has been visited before, but I am having a
different issue. When my Images is created I have a bunch of Values in
the Font Substitutes key that have for example Times New Roman,0. I
noticed that if I replace them with the values that are in a standard
windows XP image, most of my dialog issues disappear. So I created a
script to write it to the registry.

This is where the problem is. The script is supposed to delete the
entire registry key and recreate it with the values that I need.
However, it simply adds the values, never deletes, so I have both sets
of values, good and bad. I have it in a component as a generic FBA
command at 8505.

Attached is the script. Can anyone recommend anything?



Set WshShell = Wscript.CreateObject("Wscript.Shell")

WshShell.RegDelete "HKLM\SOFTWARE\Microsoft\Windows
NT\CurrentVersion\FontSubstitutes\"

WshShell.RegWrite "HKLM\SOFTWARE\Microsoft\Windows
NT\CurrentVersion\FontSubstitutes\Arial CE,238","Arial,238","REG_SZ"
WshShell.RegWrite "HKLM\SOFTWARE\Microsoft\Windows
NT\CurrentVersion\FontSubstitutes\Arial CYR,204","Arial,204","REG_SZ"
WshShell.RegWrite "HKLM\SOFTWARE\Microsoft\Windows
NT\CurrentVersion\FontSubstitutes\Arial Greek,161","Arial,161","REG_SZ"
WshShell.RegWrite "HKLM\SOFTWARE\Microsoft\Windows
NT\CurrentVersion\FontSubstitutes\Arial TUR,162","Arial,162","REG_SZ"
WshShell.RegWrite "HKLM\SOFTWARE\Microsoft\Windows
NT\CurrentVersion\FontSubstitutes\Courier New CE,238","Courier
New,238","REG_SZ"
WshShell.RegWrite "HKLM\SOFTWARE\Microsoft\Windows
NT\CurrentVersion\FontSubstitutes\Courier New CYR,204","Courier
New,204","REG_SZ"
WshShell.RegWrite "HKLM\SOFTWARE\Microsoft\Windows
NT\CurrentVersion\FontSubstitutes\Courier New Greek,161","Courier
New,161","REG_SZ"
WshShell.RegWrite "HKLM\SOFTWARE\Microsoft\Windows
NT\CurrentVersion\FontSubstitutes\Courier New TUR,162","Courier
New,162","REG_SZ"
WshShell.RegWrite "HKLM\SOFTWARE\Microsoft\Windows
NT\CurrentVersion\FontSubstitutes\Helv","MS Sans Serif","REG_SZ"
WshShell.RegWrite "HKLM\SOFTWARE\Microsoft\Windows
NT\CurrentVersion\FontSubstitutes\Helvetica","Arial","REG_SZ"
WshShell.RegWrite "HKLM\SOFTWARE\Microsoft\Windows
NT\CurrentVersion\FontSubstitutes\MS Shell Dlg 2","Tahoma","REG_SZ"
WshShell.RegWrite "HKLM\SOFTWARE\Microsoft\Windows
NT\CurrentVersion\FontSubstitutes\Times","Times New Roman","REG_SZ"
WshShell.RegWrite "HKLM\SOFTWARE\Microsoft\Windows
NT\CurrentVersion\FontSubstitutes\Times New Roman CE,238","Times New
Roman,238", "REG_SZ"
WshShell.RegWrite "HKLM\SOFTWARE\Microsoft\Windows
NT\CurrentVersion\FontSubstitutes\Times New Roman CYR,204","Times New
Roman,204","REG_SZ"
WshShell.RegWrite "HKLM\SOFTWARE\Microsoft\Windows
NT\CurrentVersion\FontSubstitutes\Times New Roman Greek,161","Times New
Roman,161","REG_SZ"
WshShell.RegWrite "HKLM\SOFTWARE\Microsoft\Windows
NT\CurrentVersion\FontSubstitutes\Times New Roman TUR,162","Times New
Roman,162","REG_SZ"
WshShell.RegWrite "HKLM\SOFTWARE\Microsoft\Windows
NT\CurrentVersion\FontSubstitutes\Tms Rmn","MS Serif", "REG_SZ"
WshShell.RegWrite "HKLM\SOFTWARE\Microsoft\Windows
NT\CurrentVersion\FontSubstitutes\Arial Baltic,186","Arial,186","REG_SZ"
WshShell.RegWrite "HKLM\SOFTWARE\Microsoft\Windows
NT\CurrentVersion\FontSubstitutes\Courier New Baltic,186","Courier
New,186","REG_SZ"
WshShell.RegWrite "HKLM\SOFTWARE\Microsoft\Windows
NT\CurrentVersion\FontSubstitutes\Times New Roman Baltic,186","Times New
Roman,186","REG_SZ"
WshShell.RegWrite "HKLM\SOFTWARE\Microsoft\Windows
NT\CurrentVersion\FontSubstitutes\MS Shell Dlg","Microsoft Sans
Serif","REG_SZ"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top