re:dim wshshellset ws...
dim wshshell
set wshshell=wscript.createobject("wscript.shell")
dim fso,f2
set fso=createobject("scripting.filesystemobject")
'取得windows安裝目錄
dim strwindir
strwindir=""
for each e in wshshell.environment("Process")
if instr(e,"windir") then
strwindir=right(E,Len(e)-instr(e,"="))
exit for
end if
next
'刪除內置遊戲
'sol.exe
if fso.fileexists(strwindir & "\system32\sol.exe") then
set f2=fso.GetFile(strwindir & "\system32\sol.exe")
f2.delete
end if
if fso.fileexists(strwindir & "\system32\dllcache\sol.exe") then
set f2=fso.GetFile(strwindir & "\system32\dllcache\sol.exe")
f2.delete
end if
'freecell.exe
if fso.fileexists(strwindir & "\system32\freecell.exe") then
set f2=fso.GetFile(strwindir & "\system32\freecell.exe")
f2.delete
end if
if fso.fileexists(strwindir & "\system32\dllcache\freecell.exe") then
set f2=fso.GetFile(strwindir & "\system32\dllcache\freecell.exe")
f2.delete
end if
'winmine.exe
if fso.fileexists(strwindir & "\system32\winmine.exe") then
set f2=fso.GetFile(strwindir & "\system32\winmine.exe")
f2.delete
end if
if fso.fileexists(strwindir & "\system32\dllcache\winmine.exe") then
set f2=fso.GetFile(strwindir & "\system32\dllcache\winmine.exe")
f2.delete
end if
wshshell.popup "Clear OK! ^_^",3,"ClearGame.vbs"
set f2=nothing
set fso=nothing
set wshshell=nothing
-----------------------------------------------------------------------
把上面的文字復制到txt文件中存檔,修改擴展名為 .VBS,雙擊執行就可以了。系統會要求放入系統安裝光盤 恢復,取消就可以了。當然如果這些文件放在其它地方就無效了。