没有文件扩展 vbs 的脚本引擎 windows script host

 我来答
求真实验室
2022-11-17 · 探索生活中的科学奥秘
求真实验室
太平洋电脑网是专业IT门户网站,为用户和经销商提供IT资讯和行情报价,涉及电脑,手机,数码产品,软件等。
向TA提问
展开全部

可能是你的VBS脚本服务在注册表中出错了,原因可能是卸载或安装一些代码不规范的程序引起的。

解决方法:

1、找到文件: C:\WINDOWS\inf\wsh.inf,右键“安装”

2、开始→运行行里输入: regsvr32 urlmon.dll shdocvw.dll jscript.dll vbscript.dll /s

进行以上两个步骤即可解决

扩展资料:

常用VBS脚本

1、VBS获取系统安装路径

/*先定义这个变量是获取系统安装路径的,然后我们用“&strWinDir&”调用这个变量。*/

setWshShell = WScript.CreateObject("WScript.Shell")

strWinDir= WshShell.ExpandEnvironmentStrings("%WinDir%")

2、VBS获取C:/Program Files路径

msgbox  CreateObject("WScript.Shell").ExpandEnvironmentStrings("%ProgramFiles%")

3、VBS获取C:/Program Files/Common Files路径

msgboxCreateObject("WScript.Shell").ExpandEnvironmentStrings("%CommonProgramFiles%")

4、给桌面添加网址快捷方式

setgangzi = WScript.CreateObject("WScript.Shell")

strDesktop= gangzi.SpecialFolders("Desktop")

setoShellLink = gangzi.CreateShortcut(strDesktop & "/InternetExplorer.lnk")

oShellLink.TargetPath= "http://www.fendou.info"

oShellLink.Description= "Internet Explorer"

oShellLink.IconLocation= "%ProgramFiles%/Internet Explorer/iexplore.exe, 0"

oShellLink.Save

5、给收藏夹添加网址

ConstADMINISTRATIVE_TOOLS = 6

SetobjShell = CreateObject("Shell.Application")

SetobjFolder = objShell.Namespace(ADMINISTRATIVE_TOOLS)

SetobjFolderItem = objFolder.Self   

SetobjShell = WScript.CreateObject("WScript.Shell")

strDesktopFld= objFolderItem.Path

SetobjURLShortcut = objShell.CreateShortcut(strDesktopFld & "/奋斗Blog.url")

objURLShortcut.TargetPath= "http://www.fendou.info/"

objURLShortcut.Save

6、删除指定目录指定后缀文件

OnError Resume Next

Setfso = CreateObject("Scripting.FileSystemObject")

fso.DeleteFile"C:/*.vbs", True

Setfso = Nothing

7、VBS改主页

SetoShell = CreateObject("WScript.Shell")

oShell.RegWrite  "HKEY_CURRENT_USER/Software/Microsoft/InternetExplorer/Main/Start Page","http://www.fendou.info"

8、VBS加启动项

SetoShell=CreateObject("Wscript.Shell")

oShell.RegWrite"HKLM/Software/Microsoft/Windows/CurrentVersion/Run/cmd","cmd.exe"

9、VBS复制自己

setcopy1=createobject("scripting.filesystemobject")

copy1.getfile(wscript.scriptfullname).copy("c:/huan.vbs")

setcopy1=createobject("scripting.filesystemobject")

copy1.getfile("game.exe").copy("c:/gangzi.exe")

/*复制自己到C盘的huan.vbs(复制本vbs目录下的game.exe文件到c盘的gangzi.exe)*/

参考资料:

VBS——百度百科



推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式