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