Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

script for clear type

Status
Not open for further replies.

Briandr

MIS
Jul 11, 2003
177
US
Hi,

I found this code sample from another forum. The post was old (5+ years). I think this was designed for XP, but it should work with W7.

Dim WsShell, Path, Key, Value, Type
Set WsShell = WScript.CreateObject("Wscript.Shell")
Path = "HKCU\Control Panel\Desktop\"
Key = "FontSmoothing"
Value = "2"
Type = "REG_DWORD"
WsShell.RegWrite Path & Key, Value, Type
Set WsShell = nothing

It is throwing a line 1, char 32, error, expected identifier. Can someone tell me what is missing?

Thank you.
 
Just a guess, but it may be you're trying to use a keyword as a variable name (I noticed char 32 is the T in Type). Try using more specific variable names and that may clear the error (e.g. regType).
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top