vbs Shell.Application

前端之家收集整理的这篇文章主要介绍了vbs Shell.Application前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
Set objShellApp = CreateObject("Shell.Application") Set objFolder = objShellApp.NameSpace("c:\") objFolder.Items().item("demo.exe").invokeverb '方法1 objFolder.Items().item("demo.exe").InvokeVerbEx'方法2 objShellApp.Open("C:\demo.exe") '方法3 objShellApp.ShellExecute "demo.exe","","c:\","1" '方法4,可以加参数和设置参数值 '方法5 Set objFolderItem = objShellApp.NameSpace("C:\").Items().item("demo.exe") Set objFIVs = objFolderItem.Verbs() For i=0 To objFIVs.Count - 1 'MsgBox objFIVs.Item(i) Set objFIV = objFIVs.Item(i) If objFIV.Name = "打开(&O)" Then '右键菜单中在中文系统是"打开(&O)",英文自己改 objFIV.DoIt Exit For End IF Next '获取网络适配器名称 For Each i In CreateObject("Shell.Application").NameSpace(49).Items msgBox i.name Next
原文链接:https://www.f2er.com/bash/388731.html

猜你在找的Bash相关文章