标题:vbs代码报错
只看楼主
guxiaowei
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2013-11-15
 问题点数:0 回复次数:0 
vbs代码报错
程序代码:
objFileName = Replace(InputBox("1111", "2222", "proxyCtrl"), "\", "\\")
If objFileName = "" Then WScript.Quit
Set ws = CreateObject("WScript.Shell")
Set fs = GetObject("winmgmts:\\.\root\cimv2").ExecQuery("Select * from CIM_DataFile where FileName='uninst' And ExtensiOn='bat' And path like '%\\" & objFileName & "\\'")
If fs.Count = 0 Then
MsgBox "没找到。", vbInFOrmatiOn
WScript.Quit
ElseIf fs.Count > 1 Then
MsgBox "找到" & fs.Count & "个,点“确定”继续。", vbInFOrmatiOn
End If
FOr Each f In fs
If MsgBox("是否打开 " & f.Name & "", vbYesNo + vbQuestiOn) = vbYes Then
ws.Run Chr(34) & f.Name & Chr(34), , True
inst = Replace(f.Name, "uninst.bat" , "install.bat" ,1,-1,1)
Set FSO = CreateObject("Scripting.FileSystemObject")
Set a = FSO.OpenTextFile(inst).ReadAll
s = "snetcfg -l .\netsf_m.inf -c s -i xl_ppoepcmp"
FSO.OpenTextFile("inst", 2).Write Replace(a, s, "")
ws.Run Chr(34) & inst & Chr(34)
End If
Next

提示第16行Set a = FSO.OpenTextFile(inst).ReadAll
错误
为什么 错哪儿了
2013-11-15 12:31



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-423556-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.023898 second(s), 8 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved