Skip to content

Instantly share code, notes, and snippets.

@sylumer
Created October 6, 2022 09:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sylumer/2a91a4563508ec97e161d9eeaa44de8a to your computer and use it in GitHub Desktop.
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.
@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"
'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
@sylumer
Copy link
Author

sylumer commented Oct 6, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment