如何解决错误:权限被拒绝代码:800A0046源:Microsoft vbscript运行时错误 [英] How do I resolve error: permission denied code: 800A0046 source: Microsoft vbscript runtime error
问题描述
内置的桌面和文档文件夹备份到本地外部设备上的根文件夹。每次必须删除包含内置桌面和折叠文档的子节点文件夹,以便保持容量完整性为了完成这个任务,设计并实现了一个vbscript。内置的Desktop文件夹及其子文件夹,文件及其内容被删除成功。但是,内置的Documents文件夹不会被删除只有它的子文件夹。 - 文件夹,文件和内容正在被成功删除。我对pc和外部备份设备上的所有文件夹都拥有完全管理员权限.PC不是任何域的分开,也不是共享。这是一段代码
if(objFSO.FolderExists(strBackupFoldToDelete& strInternationalDate))then
objFSO.DeleteFolder(strBackupFoldToDelete& strInternationalDate)
strBackUpStart = strBackUpStart + 1
'检查多个实例
其他
strBackUpStart = strBackUpStart + 1
结束如果
遇到的错误是
行:10
字符:1
错误:权限被拒绝
代码:800A0046
来源:Microsoft VBScript运行时错误
我一直试图解决这个异常数周,但是没有用。任何帮助都会得到最好的赞赏
我尝试过的事情:
所有f olders具有管理员的完全控制权限
The built-in Desktop and Documents folders are backed up to root folder on a locally external device.Periodically,the child node folder containing the built-in Desktop and Documents folded has has to be deleted in order that capacity integrity is maintained.In order to accomplish this task a vbscript was designed and implemented.The built-in Desktop folder along with its sub-folders,files and its contents are deleted successfully.However, the built-in Documents folder is not being deleted only its sub-folders,files and contents are being successfully deleted. I have full Administrator's privileges on all folders on both pc and external backup device.The pc is not apart of any domain and it is also not shared.Here is a snippet of the code
if (objFSO.FolderExists(strBackupFoldToDelete & strInternationalDate)) then
objFSO.DeleteFolder(strBackupFoldToDelete & strInternationalDate)
strBackUpStart = strBackUpStart + 1
'checking for several instances
else
strBackUpStart = strBackUpStart + 1
end if
The error encountered is
Line: 10
Char: 1
Error: Permission denied
Code: 800A0046
Source: Microsoft VBScript runtime error
I have been attempting to resolve this anomaly for several weeks but to no avail.Any assistance would be most graciously appreciated
What I have tried:
All folders have Administrator's full control permission
推荐答案
我不知道,但有一种猜测是有些东西正在持有根文件夹。也许浏览器窗口打开文件夹。也许命令提示符将它作为当前目录。或许您自己的应用程序将其作为当前目录。猜猜......
I do not know but one guess is that something is holding on to the root folder. Maybe an explorer window is has the folder open. Maybe a command prompt has it as current directory. Or perhaps your own application has it as "current dir". Just guessing...
这篇关于如何解决错误:权限被拒绝代码:800A0046源:Microsoft vbscript运行时错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!