【发布时间】:2015-12-18 06:02:37
【问题描述】:
我已经编写了下面的脚本,但是当我运行它(使用 PrimalScript 进行故障排除)时,我收到错误“权限被拒绝”。 我是这台设备的管理员,运行提升的脚本时遇到同样的错误。
这是脚本:
Dim WshShell, strCurDir, File, strDesktop
Set WshShell = CreateObject("WScript.Shell")
strDesktop = WshShell.SpecialFolders("AllUsersDesktop")
Set ofso = CreateObject("Scripting.FileSystemObject")
strPath = ofso.GetParentFolderName(WScript.ScriptFullName)
File = "pwsafe.psafe3"
strCurDir = ofso.BuildPath(strPath, File)
ofso.CopyFile strCurDir , strDesktop , OverwriteExisting
我做错了什么?
【问题讨论】: