开发者

Permission Denied while running vb script

开发者 https://www.devze.com 2023-01-05 22:31 出处:网络
I have written a vb script to open a file with different filetype other than the original filetype(eg : from .doc filetype to .txt filetype)

I have written a vb script to open a file with different filetype other than the original filetype(eg : from .doc filetype to .txt filetype)

below is my code

Dim objShell
Set objShell = CreateObject("WScript.Shell")
objShell.Run("notepad" & "C:\OpenWith_Shell3开发者_开发知识库2_Doc.doc")

the above code was working fine but one day i edited the 'notepad' to 'wordpad' it is giving the below error..but i undo the changes then also it is giving the same error...

Microsoft VBScript runtime error '800a0046'

Permission denied


missing space between "notepad" and "C:\OpenWith_Shell32_Doc.doc" should work with notepad and wordpad (if you put a space in)

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号