运行时错误800A01A8

发布于 2024-12-02 18:17:30 字数 8832 浏览 0 评论 0原文

我现在陷入了困境!有人可以帮忙吗?这是我不断收到的消息:

Windows 脚本宿主 脚本:C:\Documents and Settings\Me\Application Data\bits2\windows.vbs 线路:9 字符:1 错误:需要对象:“intOptionsSet” 代码:800A01A8 来源:Microsoft VBScript 运行时错误

这是我的脚本:

Set WshShell = CreateObject("Wscript.Shell")
appdata= WshShell.ExpandEnvironmentStrings("%appdata%")
strZipFile = appdata & "\bits2\file.zip"
outFolder = appdata & "\bits2"
Set objShell = CreateObject("Shell.Application")
Set objSource = objShell.NameSpace(strZipFile).Items()
Set objTarget = objShell.NameSpace(outFolder)
intOptions = 256
objTarget.CopyHere objSource, intOptionsSet. WshShell = CreateObject("Wscript.Shell")
appdata= WshShell.ExpandEnvironmentStrings("%appdata%")
strZipFile = appdata & "\bits2\file.zip"
outFolder = appdata & "\bits2"
Set objShell = CreateObject("Shell.Application")
Set objSource = objShell.NameSpace(strZipFile).Items()
Set objTarget = objShell.NameSpace(outFolder)
intOptions = 256
objTarget.CopyHere objSource, intOptionsSet. WshShell = CreateObject("Wscript.Shell")
appdata= WshShell.ExpandEnvironmentStrings("%appdata%")
strZipFile = appdata & "\bits2\file.zip"
outFolder = appdata & "\bits2"
Set objShell = CreateObject("Shell.Application")
Set objSource = objShell.NameSpace(strZipFile).Items()
Set objTarget = objShell.NameSpace(outFolder)
intOptions = 256
objTarget.CopyHere objSource, intOptionsSet. WshShell = CreateObject("Wscript.Shell")
appdata= WshShell.ExpandEnvironmentStrings("%appdata%")
strZipFile = appdata & "\bits2\file.zip"
outFolder = appdata & "\bits2"
Set objShell = CreateObject("Shell.Application")
Set objSource = objShell.NameSpace(strZipFile).Items()
Set objTarget = objShell.NameSpace(outFolder)
intOptions = 256
objTarget.CopyHere objSource, intOptionsSet. WshShell = CreateObject("Wscript.Shell")
appdata= WshShell.ExpandEnvironmentStrings("%appdata%")
strZipFile = appdata & "\bits2\file.zip"
outFolder = appdata & "\bits2"
Set objShell = CreateObject("Shell.Application")
Set objSource = objShell.NameSpace(strZipFile).Items()
Set objTarget = objShell.NameSpace(outFolder)
intOptions = 256
objTarget.CopyHere objSource, intOptionsSet. WshShell = CreateObject("Wscript.Shell")
appdata= WshShell.ExpandEnvironmentStrings("%appdata%")
strZipFile = appdata & "\bits2\file.zip"
outFolder = appdata & "\bits2"
Set objShell = CreateObject("Shell.Application")
Set objSource = objShell.NameSpace(strZipFile).Items()
Set objTarget = objShell.NameSpace(outFolder)
intOptions = 256
objTarget.CopyHere objSource, intOptionsSet. WshShell = CreateObject("Wscript.Shell")
appdata= WshShell.ExpandEnvironmentStrings("%appdata%")
strZipFile = appdata & "\bits2\file.zip"
outFolder = appdata & "\bits2"
Set objShell = CreateObject("Shell.Application")
Set objSource = objShell.NameSpace(strZipFile).Items()
Set objTarget = objShell.NameSpace(outFolder)
intOptions = 256
objTarget.CopyHere objSource, intOptionsSet. WshShell = CreateObject("Wscript.Shell")
appdata= WshShell.ExpandEnvironmentStrings("%appdata%")
strZipFile = appdata & "\bits2\file.zip"
outFolder = appdata & "\bits2"
Set objShell = CreateObject("Shell.Application")
Set objSource = objShell.NameSpace(strZipFile).Items()
Set objTarget = objShell.NameSpace(outFolder)
intOptions = 256
objTarget.CopyHere objSource, intOptionsSet. WshShell = CreateObject("Wscript.Shell")
appdata= WshShell.ExpandEnvironmentStrings("%appdata%")
strZipFile = appdata & "\bits2\file.zip"
outFolder = appdata & "\bits2"
Set objShell = CreateObject("Shell.Application")
Set objSource = objShell.NameSpace(strZipFile).Items()
Set objTarget = objShell.NameSpace(outFolder)
intOptions = 256
objTarget.CopyHere objSource, intOptionsSet. WshShell = CreateObject("Wscript.Shell")
appdata= WshShell.ExpandEnvironmentStrings("%appdata%")
strZipFile = appdata & "\bits2\file.zip"
outFolder = appdata & "\bits2"
Set objShell = CreateObject("Shell.Application")
Set objSource = objShell.NameSpace(strZipFile).Items()
Set objTarget = objShell.NameSpace(outFolder)
intOptions = 256
objTarget.CopyHere objSource, intOptionsSet. WshShell = CreateObject("Wscript.Shell")
appdata= WshShell.ExpandEnvironmentStrings("%appdata%")
strZipFile = appdata & "\bits2\file.zip"
outFolder = appdata & "\bits2"
Set objShell = CreateObject("Shell.Application")
Set objSource = objShell.NameSpace(strZipFile).Items()
Set objTarget = objShell.NameSpace(outFolder)
intOptions = 256
objTarget.CopyHere objSource, intOptionsSet. WshShell = CreateObject("Wscript.Shell")
appdata= WshShell.ExpandEnvironmentStrings("%appdata%")
strZipFile = appdata & "\bits2\file.zip"
outFolder = appdata & "\bits2"
Set objShell = CreateObject("Shell.Application")
Set objSource = objShell.NameSpace(strZipFile).Items()
Set objTarget = objShell.NameSpace(outFolder)
intOptions = 256
objTarget.CopyHere objSource, intOptionsSet. WshShell = CreateObject("Wscript.Shell")
appdata= WshShell.ExpandEnvironmentStrings("%appdata%")
strZipFile = appdata & "\bits2\file.zip"
outFolder = appdata & "\bits2"
Set objShell = CreateObject("Shell.Application")
Set objSource = objShell.NameSpace(strZipFile).Items()
Set objTarget = objShell.NameSpace(outFolder)
intOptions = 256
objTarget.CopyHere objSource, intOptionsSet. WshShell = CreateObject("Wscript.Shell")
appdata= WshShell.ExpandEnvironmentStrings("%appdata%")
strZipFile = appdata & "\bits2\file.zip"
outFolder = appdata & "\bits2"
Set objShell = CreateObject("Shell.Application")
Set objSource = objShell.NameSpace(strZipFile).Items()
Set objTarget = objShell.NameSpace(outFolder)
intOptions = 256
objTarget.CopyHere objSource, intOptionsSet. WshShell = CreateObject("Wscript.Shell")
appdata= WshShell.ExpandEnvironmentStrings("%appdata%")
strZipFile = appdata & "\bits2\file.zip"
outFolder = appdata & "\bits2"
Set objShell = CreateObject("Shell.Application")
Set objSource = objShell.NameSpace(strZipFile).Items()
Set objTarget = objShell.NameSpace(outFolder)
intOptions = 256
objTarget.CopyHere objSource, intOptionsSet. WshShell = CreateObject("Wscript.Shell")
appdata= WshShell.ExpandEnvironmentStrings("%appdata%")
strZipFile = appdata & "\bits2\file.zip"
outFolder = appdata & "\bits2"
Set objShell = CreateObject("Shell.Application")
Set objSource = objShell.NameSpace(strZipFile).Items()
Set objTarget = objShell.NameSpace(outFolder)
intOptions = 256
objTarget.CopyHere objSource, intOptionsSet. WshShell = CreateObject("Wscript.Shell")
appdata= WshShell.ExpandEnvironmentStrings("%appdata%")
strZipFile = appdata & "\bits2\file.zip"
outFolder = appdata & "\bits2"
Set objShell = CreateObject("Shell.Application")
Set objSource = objShell.NameSpace(strZipFile).Items()
Set objTarget = objShell.NameSpace(outFolder)
intOptions = 256
objTarget.CopyHere objSource, intOptionsSet. WshShell = CreateObject("Wscript.Shell")
appdata= WshShell.ExpandEnvironmentStrings("%appdata%")
strZipFile = appdata & "\bits2\file.zip"
outFolder = appdata & "\bits2"
Set objShell = CreateObject("Shell.Application")
Set objSource = objShell.NameSpace(strZipFile).Items()
Set objTarget = objShell.NameSpace(outFolder)
intOptions = 256
objTarget.CopyHere objSource, intOptionsSet. WshShell = CreateObject("Wscript.Shell")
appdata= WshShell.ExpandEnvironmentStrings("%appdata%")
strZipFile = appdata & "\bits2\file.zip"
outFolder = appdata & "\bits2"
Set objShell = CreateObject("Shell.Application")
Set objSource = objShell.NameSpace(strZipFile).Items()
Set objTarget = objShell.NameSpace(outFolder)
intOptions = 256
objTarget.CopyHere objSource, intOptionsSet. WshShell = CreateObject("Wscript.Shell")
appdata= WshShell.ExpandEnvironmentStrings("%appdata%")
strZipFile = appdata & "\bits2\file.zip"
outFolder = appdata & "\bits2"
Set objShell = CreateObject("Shell.Application")
Set objSource = objShell.NameSpace(strZipFile).Items()
Set objTarget = objShell.NameSpace(outFolder)
intOptions = 256
objTarget.CopyHere objSource, intOptionsSet. WshShell = CreateObject("Wscript.Shell")
appdata= WshShell.ExpandEnvironmentStrings("%appdata%")
strZipFile = appdata & "\bits2\file.zip"
outFolder = appdata & "\bits2"
Set objShell = CreateObject("Shell.Application")
Set objSource = objShell.NameSpace(strZipFile).Items()
Set objTarget = objShell.NameSpace(outFolder)
intOptions = 256
objTarget.CopyHere objSource, intOptionsSet. WshShell = CreateObject("Wscript.Shell")
appdata= WshShell.ExpandEnvironmentStrings("%appdata%")
strZipFile = appdata & "\bits2\file.zip"
outFolder = appdata & "\bits2"
Set objShell = CreateObject("Shell.Application")
Set objSource = objShell.NameSpace(strZipFile).Items()
Set objTarget = objShell.NameSpace(outFolder)
intOptions = 256
objTarget.CopyHere objSource, intOptions

I am terribly stuck right now! Can someone please help?! This is the message I keep getting:

Windows Script Host
Script: C:\Documents and Settings\Me\Application Data\bits2\windows.vbs
Line: 9
Char: 1
Error: Object required: 'intOptionsSet'
Code: 800A01A8
Source: Microsoft VBScript runtime error

Here is my script:

Set WshShell = CreateObject("Wscript.Shell")
appdata= WshShell.ExpandEnvironmentStrings("%appdata%")
strZipFile = appdata & "\bits2\file.zip"
outFolder = appdata & "\bits2"
Set objShell = CreateObject("Shell.Application")
Set objSource = objShell.NameSpace(strZipFile).Items()
Set objTarget = objShell.NameSpace(outFolder)
intOptions = 256
objTarget.CopyHere objSource, intOptionsSet. WshShell = CreateObject("Wscript.Shell")
appdata= WshShell.ExpandEnvironmentStrings("%appdata%")
strZipFile = appdata & "\bits2\file.zip"
outFolder = appdata & "\bits2"
Set objShell = CreateObject("Shell.Application")
Set objSource = objShell.NameSpace(strZipFile).Items()
Set objTarget = objShell.NameSpace(outFolder)
intOptions = 256
objTarget.CopyHere objSource, intOptionsSet. WshShell = CreateObject("Wscript.Shell")
appdata= WshShell.ExpandEnvironmentStrings("%appdata%")
strZipFile = appdata & "\bits2\file.zip"
outFolder = appdata & "\bits2"
Set objShell = CreateObject("Shell.Application")
Set objSource = objShell.NameSpace(strZipFile).Items()
Set objTarget = objShell.NameSpace(outFolder)
intOptions = 256
objTarget.CopyHere objSource, intOptionsSet. WshShell = CreateObject("Wscript.Shell")
appdata= WshShell.ExpandEnvironmentStrings("%appdata%")
strZipFile = appdata & "\bits2\file.zip"
outFolder = appdata & "\bits2"
Set objShell = CreateObject("Shell.Application")
Set objSource = objShell.NameSpace(strZipFile).Items()
Set objTarget = objShell.NameSpace(outFolder)
intOptions = 256
objTarget.CopyHere objSource, intOptionsSet. WshShell = CreateObject("Wscript.Shell")
appdata= WshShell.ExpandEnvironmentStrings("%appdata%")
strZipFile = appdata & "\bits2\file.zip"
outFolder = appdata & "\bits2"
Set objShell = CreateObject("Shell.Application")
Set objSource = objShell.NameSpace(strZipFile).Items()
Set objTarget = objShell.NameSpace(outFolder)
intOptions = 256
objTarget.CopyHere objSource, intOptionsSet. WshShell = CreateObject("Wscript.Shell")
appdata= WshShell.ExpandEnvironmentStrings("%appdata%")
strZipFile = appdata & "\bits2\file.zip"
outFolder = appdata & "\bits2"
Set objShell = CreateObject("Shell.Application")
Set objSource = objShell.NameSpace(strZipFile).Items()
Set objTarget = objShell.NameSpace(outFolder)
intOptions = 256
objTarget.CopyHere objSource, intOptionsSet. WshShell = CreateObject("Wscript.Shell")
appdata= WshShell.ExpandEnvironmentStrings("%appdata%")
strZipFile = appdata & "\bits2\file.zip"
outFolder = appdata & "\bits2"
Set objShell = CreateObject("Shell.Application")
Set objSource = objShell.NameSpace(strZipFile).Items()
Set objTarget = objShell.NameSpace(outFolder)
intOptions = 256
objTarget.CopyHere objSource, intOptionsSet. WshShell = CreateObject("Wscript.Shell")
appdata= WshShell.ExpandEnvironmentStrings("%appdata%")
strZipFile = appdata & "\bits2\file.zip"
outFolder = appdata & "\bits2"
Set objShell = CreateObject("Shell.Application")
Set objSource = objShell.NameSpace(strZipFile).Items()
Set objTarget = objShell.NameSpace(outFolder)
intOptions = 256
objTarget.CopyHere objSource, intOptionsSet. WshShell = CreateObject("Wscript.Shell")
appdata= WshShell.ExpandEnvironmentStrings("%appdata%")
strZipFile = appdata & "\bits2\file.zip"
outFolder = appdata & "\bits2"
Set objShell = CreateObject("Shell.Application")
Set objSource = objShell.NameSpace(strZipFile).Items()
Set objTarget = objShell.NameSpace(outFolder)
intOptions = 256
objTarget.CopyHere objSource, intOptionsSet. WshShell = CreateObject("Wscript.Shell")
appdata= WshShell.ExpandEnvironmentStrings("%appdata%")
strZipFile = appdata & "\bits2\file.zip"
outFolder = appdata & "\bits2"
Set objShell = CreateObject("Shell.Application")
Set objSource = objShell.NameSpace(strZipFile).Items()
Set objTarget = objShell.NameSpace(outFolder)
intOptions = 256
objTarget.CopyHere objSource, intOptionsSet. WshShell = CreateObject("Wscript.Shell")
appdata= WshShell.ExpandEnvironmentStrings("%appdata%")
strZipFile = appdata & "\bits2\file.zip"
outFolder = appdata & "\bits2"
Set objShell = CreateObject("Shell.Application")
Set objSource = objShell.NameSpace(strZipFile).Items()
Set objTarget = objShell.NameSpace(outFolder)
intOptions = 256
objTarget.CopyHere objSource, intOptionsSet. WshShell = CreateObject("Wscript.Shell")
appdata= WshShell.ExpandEnvironmentStrings("%appdata%")
strZipFile = appdata & "\bits2\file.zip"
outFolder = appdata & "\bits2"
Set objShell = CreateObject("Shell.Application")
Set objSource = objShell.NameSpace(strZipFile).Items()
Set objTarget = objShell.NameSpace(outFolder)
intOptions = 256
objTarget.CopyHere objSource, intOptionsSet. WshShell = CreateObject("Wscript.Shell")
appdata= WshShell.ExpandEnvironmentStrings("%appdata%")
strZipFile = appdata & "\bits2\file.zip"
outFolder = appdata & "\bits2"
Set objShell = CreateObject("Shell.Application")
Set objSource = objShell.NameSpace(strZipFile).Items()
Set objTarget = objShell.NameSpace(outFolder)
intOptions = 256
objTarget.CopyHere objSource, intOptionsSet. WshShell = CreateObject("Wscript.Shell")
appdata= WshShell.ExpandEnvironmentStrings("%appdata%")
strZipFile = appdata & "\bits2\file.zip"
outFolder = appdata & "\bits2"
Set objShell = CreateObject("Shell.Application")
Set objSource = objShell.NameSpace(strZipFile).Items()
Set objTarget = objShell.NameSpace(outFolder)
intOptions = 256
objTarget.CopyHere objSource, intOptionsSet. WshShell = CreateObject("Wscript.Shell")
appdata= WshShell.ExpandEnvironmentStrings("%appdata%")
strZipFile = appdata & "\bits2\file.zip"
outFolder = appdata & "\bits2"
Set objShell = CreateObject("Shell.Application")
Set objSource = objShell.NameSpace(strZipFile).Items()
Set objTarget = objShell.NameSpace(outFolder)
intOptions = 256
objTarget.CopyHere objSource, intOptionsSet. WshShell = CreateObject("Wscript.Shell")
appdata= WshShell.ExpandEnvironmentStrings("%appdata%")
strZipFile = appdata & "\bits2\file.zip"
outFolder = appdata & "\bits2"
Set objShell = CreateObject("Shell.Application")
Set objSource = objShell.NameSpace(strZipFile).Items()
Set objTarget = objShell.NameSpace(outFolder)
intOptions = 256
objTarget.CopyHere objSource, intOptionsSet. WshShell = CreateObject("Wscript.Shell")
appdata= WshShell.ExpandEnvironmentStrings("%appdata%")
strZipFile = appdata & "\bits2\file.zip"
outFolder = appdata & "\bits2"
Set objShell = CreateObject("Shell.Application")
Set objSource = objShell.NameSpace(strZipFile).Items()
Set objTarget = objShell.NameSpace(outFolder)
intOptions = 256
objTarget.CopyHere objSource, intOptionsSet. WshShell = CreateObject("Wscript.Shell")
appdata= WshShell.ExpandEnvironmentStrings("%appdata%")
strZipFile = appdata & "\bits2\file.zip"
outFolder = appdata & "\bits2"
Set objShell = CreateObject("Shell.Application")
Set objSource = objShell.NameSpace(strZipFile).Items()
Set objTarget = objShell.NameSpace(outFolder)
intOptions = 256
objTarget.CopyHere objSource, intOptionsSet. WshShell = CreateObject("Wscript.Shell")
appdata= WshShell.ExpandEnvironmentStrings("%appdata%")
strZipFile = appdata & "\bits2\file.zip"
outFolder = appdata & "\bits2"
Set objShell = CreateObject("Shell.Application")
Set objSource = objShell.NameSpace(strZipFile).Items()
Set objTarget = objShell.NameSpace(outFolder)
intOptions = 256
objTarget.CopyHere objSource, intOptionsSet. WshShell = CreateObject("Wscript.Shell")
appdata= WshShell.ExpandEnvironmentStrings("%appdata%")
strZipFile = appdata & "\bits2\file.zip"
outFolder = appdata & "\bits2"
Set objShell = CreateObject("Shell.Application")
Set objSource = objShell.NameSpace(strZipFile).Items()
Set objTarget = objShell.NameSpace(outFolder)
intOptions = 256
objTarget.CopyHere objSource, intOptionsSet. WshShell = CreateObject("Wscript.Shell")
appdata= WshShell.ExpandEnvironmentStrings("%appdata%")
strZipFile = appdata & "\bits2\file.zip"
outFolder = appdata & "\bits2"
Set objShell = CreateObject("Shell.Application")
Set objSource = objShell.NameSpace(strZipFile).Items()
Set objTarget = objShell.NameSpace(outFolder)
intOptions = 256
objTarget.CopyHere objSource, intOptionsSet. WshShell = CreateObject("Wscript.Shell")
appdata= WshShell.ExpandEnvironmentStrings("%appdata%")
strZipFile = appdata & "\bits2\file.zip"
outFolder = appdata & "\bits2"
Set objShell = CreateObject("Shell.Application")
Set objSource = objShell.NameSpace(strZipFile).Items()
Set objTarget = objShell.NameSpace(outFolder)
intOptions = 256
objTarget.CopyHere objSource, intOptions

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

萌能量女王 2024-12-09 18:17:30

看起来很糟糕……这个;

objTarget.CopyHere objSource, intOptionsSet. WshShell = CreateObject("Wscript.Shell")

可能应该是:

objTarget.CopyHere objSource, intOptions
Set WshShell = CreateObject("Wscript.Shell")

您可能只需要后一行一次,而不是所有重复。

编辑;这似乎也只是前 9 行的重复?

That looks mangled ... this;

objTarget.CopyHere objSource, intOptionsSet. WshShell = CreateObject("Wscript.Shell")

Is probably supposed to be:

objTarget.CopyHere objSource, intOptions
Set WshShell = CreateObject("Wscript.Shell")

You probably only need the latter line once, rather than all the repeats you have.

Edit; That also appears just to be a repetition of the fist 9 lines?

仙女 2024-12-09 18:17:30

objShell.NameSpace() 不喜欢两个相邻的反斜杠,即 c:\\

(除非它是网络路径,即 \\192.168.0.1 \Folder)

代码的前 9 行:

Set WshShell = CreateObject("Wscript.Shell")
appdata= WshShell.ExpandEnvironmentStrings("%appdata%")
strZipFile = appdata & "\bits2\file.zip"
outFolder = appdata & "\bits2" 'Line #4
Set objShell = CreateObject("Shell.Application")
Set objSource = objShell.NameSpace(strZipFile).Items()
Set objTarget = objShell.NameSpace(outFolder) 'Line #7
intOptions = 256
objTarget.CopyHere objSource, intOptionsSet. WshShell = CreateObject("Wscript.Shell") 'Line #9

也许第 9 行会崩溃,因为第 7 行的 outFolder 中有“:\\”。 outFolder 在第 #4 行定义。

objShell.NameSpace() does not like 2 backslashes next to each other, i.e. c:\\

(unless it's a network path, i.e. \\192.168.0.1\Folder)

The first 9 lines of your code:

Set WshShell = CreateObject("Wscript.Shell")
appdata= WshShell.ExpandEnvironmentStrings("%appdata%")
strZipFile = appdata & "\bits2\file.zip"
outFolder = appdata & "\bits2" 'Line #4
Set objShell = CreateObject("Shell.Application")
Set objSource = objShell.NameSpace(strZipFile).Items()
Set objTarget = objShell.NameSpace(outFolder) 'Line #7
intOptions = 256
objTarget.CopyHere objSource, intOptionsSet. WshShell = CreateObject("Wscript.Shell") 'Line #9

Maybe line #9 is blowing up because outFolder on line #7 has ":\\" in it. outFolder is defined on line #4.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文