我制作了一个执行EXE的脚本,该脚本改变了笔记本电脑的风扇速度。但是在启动时,我会看到烦人的控制台弹出窗口,如何使它消失?
vbscript:
Set objShell = CreateObject("Shell.Application")
objShell.ShellExecute "DellFanCmd", "ec-disable-nofanchg", "", "runas", 1
objShell.ShellExecute "DellFanCmd", "fan1-level1", "", "runas", 1
谢谢
答案 0 :(得分:2)
语法
.ShellExecute "application", "parameters", "dir", "verb", window
.ShellExecute 'some program.exe', '"some parameters with spaces"', , "runas", 1
密钥
application The file to execute (required)
parameters Arguments for the executable
dir Working directory
verb The operation to execute (runas/open/edit/print)
window View mode application window (normal=1, hide=0, 2=Min, 3=max, 4=restore, 5=current, 7=min/inactive, 10=default)
因此,可以通过将1
更改为0
Set objShell = CreateObject("Shell.Application")
objShell.ShellExecute "DellFanCmd", "ec-disable-nofanchg", "", "runas", 0
objShell.ShellExecute "DellFanCmd", "fan1-level1", "", "runas", 0