我已经编写了下面的脚本,但是当我运行它(使用 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
我究竟做错了什么?