What are the methods of executing commands in Shell.Application
This article will explain in detail the methods of executing commands in Shell.Application. The editor thinks it is very practical, so I share it for you as a reference. I hope you can get something after reading this article.
The code is as follows:
Set objShellApp = CreateObject ("Shell.Application") Set objFolder = objShellApp.NameSpace ("c:\") objFolder.Items (). Item ("demo.exe"). Invokeverb 'method 1 objFolder.Items (). Item ("demo.exe"). InvokeVerbEx' method 2 objShellApp.Open ("C:\ demo.exe")' method 3 objShellApp.ShellExecute "demo.exe", "," c:\ ",", "1" 'method 4 You can add parameters and set parameter values' method 5 Set objFolderItem = objShellApp.NameSpace ("C:\"). Item ("demo.exe") Set objFIVs = objFolderItem.Verbs () For iTuno To objFIVs.Count-1 'MsgBox objFIVs.Item (I) Set objFIV = objFIVs.Item (I) If objFIV.Name = "Open (& O)" Then' right-click menu in the Chinese system is "Open (& O)" This is the end of the article on "what are the methods of executing Shell.Application commands in objFIV.DoIt Exit For End IF Next?". I hope the above content can be helpful to you, so that you can learn more knowledge. if you think the article is good, please share it for more people to see.