' ttfCacheの削除 ' http://www.kikky.net/ WScript.Echo "フォントキャッシュを削除します。" Set FS = CreateObject("Scripting.FileSystemObject") Set WShell = CreateObject("WScript.Shell") SysRootPath = FS.GetSpecialFolder(WindowsFolder) CachePath = SysRootPath+"\ttfCache" initpath = SysRootPath+"\wininit.ini" if FS.FileExists(CachePath) then Set Cachef = FS.GetFile(CachePath) Cachef.Attributes = 0 else WScript.echo "フォントキャッシュのファイルがないので、この操作は必要ありません。" WScript.Quit end if if FS.FileExists(initpath) then WScript.echo "パソコンを再起動して、もう1度実行してください。" WScript.Quit end if Set Inifile = FS.CreateTextFile(initpath,true) inittxt = "[Rename]" + vbCrLf inittxt = inittxt + "NUL=" + CachePath + vbCrLf Inifile.Write(inittxt) Inifile.Close if WShell.popup("パソコンの再起動が必要です。"+vbCrlf+"自動的に再起動しますか?",0,"確認",4+32) = 6 then Wshell.Run(SysRootPath+"\rundll32.exe "+SysRootPath+"\System\Shell32.dll,SHExitWindowsEx 2") else WScript.echo "再起動後に、設定が反映されます。" end if