Created
October 6, 2022 09:04
-
-
Save sylumer/2a91a4563508ec97e161d9eeaa44de8a to your computer and use it in GitHub Desktop.
Script to run on Windows when the scroll wheel on a Logitech mouse stops working in Chrome, etc.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@ECHO off | |
REM Kill the rogue Logitech Options Manager process | |
TASKKILL /f /t /im "LogiOptionsMgr.exe" | |
REM Force a wait (*ignore key presses*) | |
TIMEOUT /t 2 /nobreak | |
REM Restart the Logitech Options Manager | |
START "Logitech Options Manager" /D "C:\ProgramData\Logishrd\LogiOptions\Software\Current\" "LogiOptionsMgr.exe" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'Initialise | |
Set objShell = CreateObject ("Wscript.Shell") | |
Dim strCommand | |
Const HIDDEN = 0 | |
'Kill the rogue Logitech Options Manager process | |
strCommand = "cmd /c TASKKILL /f /t /im ""LogiOptionsMgr.exe""" | |
objShell.Run strCommand, HIDDEN, false | |
'Force a two second wait | |
WScript.Sleep 2000 | |
'Restart the Logitech Options Manager | |
strCommand = "cmd /c START ""Logitech Options Manager"" /D ""C:\ProgramData\Logishrd\LogiOptions\Software\Current\"" ""LogiOptionsMgr.exe""" | |
objShell.Run strCommand, HIDDEN, false |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
BAT script will briefly show a command prompt window.
VBS script is effectively runnign the same commands in the background, but handles the pause externally to the command line and hides the command prompt window that is running the command line instructions. This version is just intended to be used if you need/want to hide the fact you are running things on the command line.