我正在使用以下vbscript来备份我的文档:
If strMessage = vbYes Then
Dim FSO
Dim objShell
Dim strDesktop
Dim strDocuments
Set FSO = CreateObject("Scripting.FileSystemObject")
Set objShell = WScript.CreateObject("Wscript.Shell")
strDesktop = objShell.SpecialFolders("Desktop")
strDocuments = objShell.SpecialFolders("MyDocuments")
If FSO.DriveExists("H") Then
FSO.CopyFolder strDesktop, "H:\Desktop", True
FSO.CopyFolder strDocuments, "H:\Documents", True
Else
MsgBox("Your personal folder is not mapped. Please contact IT to have it mapped or created.")
End if
Else
MsgBox("You will be reminded again in 30 days")
End if
它工作正常,除了我在复制我的文档时遇到“权限被拒绝”错误。我想不出有什么理由不能复制我自己的文件....是否与Windows Script Host有关?