VBScript:WshShell对象

一个本地的windows shell对象,可以执行本地程序。

文档:https://docs.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/windows-scripting/aew9yb99(v%3Dvs.84)

获取:

Wscript.CreateObject("wscript.shell")

属性

CurrentDirectory Property | Environment Property | SpecialFolders Property

方法

AppActivate Method | CreateShortcut Method | Exec Method | ExpandEnvironmentStrings Method | LogEvent Method | Popup Method | RegDelete Method | RegRead Method | RegWrite Method | Run Method | SendKeys Method

属性SpecialFolders返回字符串,如:

desktop = Wscript.CreateObject("wscript.shell").SpecialFolders("Desktop")
'desktop为:"C:\Users\xjb\Desktop"
posted @ 2019-01-02 15:02  xuejianbest  阅读(278)  评论(0编辑  收藏  举报