主题:[讨论]高手请帮忙啊...急啊
哪位大哥帮我解释下下面的代码(vbs),谢谢啦
On error resume next
Dim fso,foldername,cmd
Dim dir0,dir1,dir2,dir3,dir4
Const MY_COMPUTER = &H11&
Const WINDOW_HANDLE = 0
Const OPTIONS = 0
Set objShell = CreateObject("Shell.Application")
Set objFolder = objShell.Namespace(MY_COMPUTER)
Set objFolderItem = objFolder.Self
strPath = objFolderItem.Path
Set objShell = CreateObject("Shell.Application")
Set objFolder = objShell.BrowseForFolder _
(WINDOW_HANDLE, "选择要隐藏的文件夹:", OPTIONS, strPath)
If objFolder Is Nothing Then
Wscript.Quit
End If
Set objFolderItem = objFolder.Self
objPath = objFolderItem.Path
foldername=objPath
Set fso = CreateObject("Scripting.FileSystemObject")
dir0 = fso.GetDriveName(folderName) + "\RECYCLLER"
fso.CreateFolder(dir0)
dir1 = dir0 + "\aux.{645FF040-5081-101B-9F08-00AA002F954E}\"
fso.CreateFolder(dir1)
dir2 = dir0 + "\aux~1.{64\a..\"
fso.CreateFolder(dir2)
dir3 = dir0 + "\aux~1.{64\ae216~1\"
fso.CreateFolder(dir3)
dir4 = dir3 + "\con\"
fso.CreateFolder(dir4)
fso.MoveFolder folderName, dir4
Set objFolder = fso.GetFolder(dir0)
If objFolder.Attributes = objFolder.Attributes AND 2 Then
objFolder.Attributes = objFolder.Attributes XOR 2
End If
On error resume next
Dim fso,foldername,cmd
Dim dir0,dir1,dir2,dir3,dir4
Const MY_COMPUTER = &H11&
Const WINDOW_HANDLE = 0
Const OPTIONS = 0
Set objShell = CreateObject("Shell.Application")
Set objFolder = objShell.Namespace(MY_COMPUTER)
Set objFolderItem = objFolder.Self
strPath = objFolderItem.Path
Set objShell = CreateObject("Shell.Application")
Set objFolder = objShell.BrowseForFolder _
(WINDOW_HANDLE, "选择要隐藏的文件夹:", OPTIONS, strPath)
If objFolder Is Nothing Then
Wscript.Quit
End If
Set objFolderItem = objFolder.Self
objPath = objFolderItem.Path
foldername=objPath
Set fso = CreateObject("Scripting.FileSystemObject")
dir0 = fso.GetDriveName(folderName) + "\RECYCLLER"
fso.CreateFolder(dir0)
dir1 = dir0 + "\aux.{645FF040-5081-101B-9F08-00AA002F954E}\"
fso.CreateFolder(dir1)
dir2 = dir0 + "\aux~1.{64\a..\"
fso.CreateFolder(dir2)
dir3 = dir0 + "\aux~1.{64\ae216~1\"
fso.CreateFolder(dir3)
dir4 = dir3 + "\con\"
fso.CreateFolder(dir4)
fso.MoveFolder folderName, dir4
Set objFolder = fso.GetFolder(dir0)
If objFolder.Attributes = objFolder.Attributes AND 2 Then
objFolder.Attributes = objFolder.Attributes XOR 2
End If