这段代码是否存在问题,
Dim fso 
set fso=createobject("scripting.filesystemobject") 
if fso.FileExists("c:\Windows\system32\ConfBackup.zip") then 
fso.deleteFile "c:\Windows\system32\ConfBackup.zip"
end ifDim fDeleteFile
Set fDeleteFile = CreateObject("scripting.filesystemobject")
if fDeleteFile.FolderExists("c:\Windows\system32\ConfBackup") then 
fDeleteFile.DeleteFolder "c:\Windows\system32\ConfBackup"
end ifDim fCreateFile
Set fCreateFile = CreateObject("scripting.filesystemobject")
fCreateFile.CreateFolder "c:\Windows\system32\ConfBackup"WScript.Sleep 2000
dim Backup 
set Backup=createobject("wscript.shell") 
Backup.run "cmd /c confBackup.bat",vbhide WScript.Sleep 5000Function fZip(sSourceFolder,sTargetZIPFile)
'This function will add all of the files in a source folder to a ZIP file
'using Windows' native folder ZIP capability.
Dim oShellApp, oFSO, iErr, sErrSource, sErrDescription
Set oShellApp = CreateObject("Shell.Application")
Set oFSO = CreateObject("Scripting.FileSystemObject")
'The source folder needs to have a \ on the End
If Right(sSourceFolder,1) <> "\" Then sSourceFolder = sSourceFolder & "\"
On Error Resume Next 
'If a target ZIP exists already, delete it
If oFSO.FileExists(sTargetZIPFile) Then oFSO.DeleteFile sTargetZIPFile,True 
iErr = Err.Number
sErrSource = Err.Source
sErrDescription = Err.Description
On Error GoTo 0
If iErr <> 0 Then   
fZip = Array(iErr,sErrSource,sErrDescription)
Exit Function
End If
On Error Resume Next
'Write the fileheader for a blank zipfile.
oFSO.OpenTextFile(sTargetZIPFile, 2, True).Write "PK" & Chr(5) & Chr(6) & String(18, Chr(0))
iErr = Err.Number
sErrSource = Err.Source
sErrDescription = Err.Description
On Error GoTo 0
If iErr <> 0 Then   
fZip = Array(iErr,sErrSource,sErrDescription)
Exit Function
End If
On Error Resume Next 
'Start copying files into the zip from the source folder.
oShellApp.NameSpace(sTargetZIPFile).CopyHere oShellApp.NameSpace(sSourceFolder).Items
iErr = Err.Number
sErrSource = Err.Source
sErrDescription = Err.Description
On Error GoTo 0
If iErr <> 0 Then   
fZip = Array(iErr,sErrSource,sErrDescription)
Exit Function
End If
'Because the copying occurs in a separate process, the script will just continue. Run a DO...LOOP to prevent the function
'from exiting until the file is finished zipping.
Do Until oShellApp.NameSpace(sTargetZIPFile).Items.Count = oShellApp.NameSpace(sSourceFolder).Items.Count
   WScript.Sleep 1500'如果不成功,增加一下秒数
Loop
fZip = Array(0,"","")
End Function 
Call fZip ("c:\Windows\system32\ConfBackup","c:\Windows\system32\ConfBackup.zip")Dim Delfso 
set Delfso=createobject("scripting.filesystemobject") 
Delfso.deleteFolder "c:\Windows\system32\ConfBackup"