-
Notifications
You must be signed in to change notification settings - Fork 38
Open
Labels
enhancementNew feature or requestNew feature or request
Description
First nice, simple, minimal for use.
My v3 driver req PsExec using run.bat but it flash the console anytime it run and quite noise, so I write 2 vbs to disable it, here is 2 script file base on run.bat:
- for start the GUI
Set shell = CreateObject("Shell.Application")
Set fso = CreateObject("Scripting.FileSystemObject")
' Get the folder path
folder = fso.GetParentFolderName(WScript.ScriptFullName)
' Build the paths
psexec = """" & folder & "\PsExec.exe" & """"
guiApp = """" & folder & "\AsusFanControlGUI.exe" & """"
' Build the full PsExec command
cmd = psexec & " -i -s -d " & guiApp
' Run it elevated and silently
shell.ShellExecute "cmd.exe", "/c """ & cmd & """", "", "runas", 0- for set speed
Set shell = CreateObject("Shell.Application")
Set fso = CreateObject("Scripting.FileSystemObject")
' Get the script's directory
folder = fso.GetParentFolderName(WScript.ScriptFullName)
' Get argument (if any)
If WScript.Arguments.Count > 0 Then
fanSpeed = WScript.Arguments(0)
Else
fanSpeed = "0"
End If
' Paths to executables
psexec = """" & folder & "\PsExec.exe" & """"
fanctl = """" & folder & "\AsusFanControl.exe" & """"
' Commands with dynamic fan speed
cmd = psexec & " -s " & fanctl & " --set-fan-speed=0:" & fanSpeed & " && " & _
psexec & " -s " & fanctl & " --set-fan-speed=1:" & fanSpeed
' Run elevated and hidden
shell.ShellExecute "cmd.exe", "/c """ & cmd & """", "", "runas", 0And I using Task Scheduler to run both of them with user account highest privileges to trigger when logon.
It smooth and great without asking UAC anytime run script, except GUI always popup and I need to toggle into tray icon.
Maybe only set speed script run is ok but after that I want change speed and go into folder, accept UAC, too much step.
Here I wonder:
- could your GUI can receive args
- could it remember old setting or in my case just run it with tray default is ok
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request