Marydon20170307

windows vbs启动多个应用程序并使程序最小化(显示桌面)

CreationTime--2018年7月26日11点18分

Author:Marydon

1.应用场景

  每天开机后,都需要打开平常所需要的软件,又不想将程序设为开机启动,能不能开机后,同时启动多个程序呢?

2.代码实现

  第一步:新建一个文本文件

  桌面-->右键-->新建-->文本文档-->双击打开

  第二步:编辑命令

  语法:

  Dim shell
  Set shell = CreateObject("WScript.Shell")

  shell.Run """你的应用程序的绝对路径"""

Dim shell
Set shell = CreateObject("WScript.Shell")
\'1.启动qq
shell.Run """E:\TIM-x86\Bin\TIM.exe"""
\'2.启动chrome
shell.Run """E:\ChromePortable-65-PE\App\Google Chrome\chrome.exe"""
\'3.启动eclipse
shell.Run """D:\eclipse-2018-x86\eclipse.exe"""
\'4.启动notepad++
shell.Run """D:\Notepad++-7.3-PE\notepad++.exe"""
\'5.显示桌面
Set shell = CreateObject("Shell.Application")
shell.ToggleDesktop
\'6.将变量置空 这一步可以不要
Set shell = Nothing

  说明:虽然vbs有最小化的命令,但是效果不明显,因此,第5,6步相当于没有起作用,可以忽略。

  第三步:文件-->另存为-->vbs文件

  

  第四步:删除刚才新建的txt文件

  以后直接双击运行即可

 

分类:

技术点:

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-08-07
  • 2021-04-11
  • 2022-12-23
  • 2022-02-09
  • 2021-11-14
猜你喜欢
  • 2021-11-12
  • 2021-12-01
  • 2021-12-09
  • 2021-12-31
  • 2022-03-01
相关资源
相似解决方案