Board logo

标题: [系统相关] 请问下前辈怎么用mshta执行VBS脚本? [打印本页]

作者: a5321    时间: 2019-8-16 16:55     标题: 请问下前辈怎么用mshta执行VBS脚本?

本帖最后由 a5321 于 2019-8-20 16:00 编辑

代码如下,是关闭 文件夹的代码,现在想通过 mshta 直接在cmd里运行,请问下如何改呢 ,谢谢各位了

Set wins = CreateObject("Shell.Application").Windows
If not IsNull(wins) Then
    For Each w In wins
        If InStr(LCase(w.FullName), "\explorer.exe") >0 Then w.Quit
    Next
End If
作者: a5321    时间: 2019-8-20 16:00

有前辈能帮忙看看吗?
作者: a5321    时间: 2019-8-28 17:51

老大可以看下吗? 研究了好多天没有进展
作者: WHY    时间: 2019-8-28 18:23

  1. mshta VBScript:Execute("Set wins=CreateObject(""Shell.Application"").Windows:For Each w In wins:If LCase(Right(w.FullName,13))=""\explorer.exe"" Then:w.Quit:End If:Next:close")
复制代码





欢迎光临 批处理之家 (http://www.bathome.net/) Powered by Discuz! 7.2