Windows 7 拒绝复制我自己的文档?(胜利7)

Windows 7 拒绝复制我自己的文档?(胜利7),windows-7,vbscript,Windows 7,Vbscript,我正在使用以下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

我正在使用以下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脚本主机有关吗?

为什么您没有权限复制自己的文档?你没有试图访问它们,你的脚本是。我不确定Windows如何再次处理所有这些问题,但您感兴趣的是您的脚本在哪个帐户下运行,而不是“您”。我在自己的帐户下运行脚本。对我有用。您的文档文件夹是否已重定向?它是否有锁定文件或您无权访问的文件?我完全控制所有文件,但没有一个文件在使用中。我不相信文件夹被重定向了,我没有以任何方式修改它。