2010-07-08 56 views
1

我写了一个VB脚本打开与比原来的文件类型不同文件类型的文件(例如:从.DOC文件类型为.txt文件类型)权限被拒绝,同时运行的VB脚本

下面

是我的代码

Dim objShell 
Set objShell = CreateObject("WScript.Shell") 
objShell.Run("notepad" & "C:\OpenWith_Shell32_Doc.doc") 

上面的代码工作正常,但有一天我编辑的“记事本”到“写字板”这是给下面的error..but我撤消更改,然后也被赋予了同样的错误......

Microsoft VBScript运行时错误R“800A0046”
权限被拒绝

+0

你能告诉我们你正在运行什么操作系统? – 2010-07-08 05:53:00

+0

Duplicate post http://stackoverflow.com/questions/3200932/permission-denied-while-running-vb-script – 2010-07-08 05:55:35

+0

操作系统是Windows XP – ramesh 2010-07-08 05:59:37

回答

0

失踪“记事本”和“C:\ OpenWith_Shell32_Doc.doc”之间的空间应该用记事本,写字板(如果你把在一个空间)