' Windows 2000/XP のアプリケーションと追加と削除に '「アクセサリ」などを表示させるスクリプト ' ' (C) Windows.FAQ 1999-2001 ' http://homepage2.nifty.com/winfaq/ On Error Resume Next Set FS = CreateObject("Scripting.FileSystemObject") SysRoot = FS.GetSpecialFolder(WindowsFolder) If FS.FileExists("C:\Sysoc.inf") then msgrc = msgbox("以前にこのプログラムを実行した形跡があります。"+chr(10)+"処理を中止します。",,"実行できません。") Else msgbox "処理を開始します。"+chr(10)+"オリジナルの Sysoc.inf は C:\ にバックアップされます。",,"開始" ' Sysoc.inf を読み取り Set Sysoc = FS.OpenTextFile(SysRoot+"\inf\Sysoc.inf",1,,-1) SysocText1 = Sysoc.ReadAll SysocText2 = Replace(SysocText1,"HIDE","") ' アクセサリ以外の非表示コンポーネントも表示する場合 ' 下の行のコメントを解除 ' SysocText2 = Replace(SysocText2,"hide","") Sysoc.Close ' オリジナル inf をバックアップ FS.MoveFile SysRoot+"\inf\Sysoc.inf","C:\" ' Sysoc.inf を書き換え Set Sysoc = FS.OpenTextFile(SysRoot+"\inf\Sysoc.inf",2,true,-1) Sysoc.Write SysocText2 Sysoc.Close msgbox "処理が終了しました。",,"終了" End if