运行时错误800A01A8
我现在陷入了困境!有人可以帮忙吗?这是我不断收到的消息:
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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
看起来很糟糕……这个;
可能应该是:
您可能只需要后一行一次,而不是所有重复。
编辑;这似乎也只是前 9 行的重复?
That looks mangled ... this;
Is probably supposed to be:
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?
objShell.NameSpace()
不喜欢两个相邻的反斜杠,即 c:\\(除非它是网络路径,即 \\192.168.0.1 \Folder)
代码的前 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:
Maybe line #9 is blowing up because
outFolder
on line #7 has ":\\" in it.outFolder
is defined on line #4.