Run the patch again to automatically reverse the aforementioned process and turn the auto power saver function back ON.
Code: Select all
;<=======================================================================================================>
;<=========================================== G930 Power Fix ============================================>
;<=======================================================================================================>
#SingleInstance Force
If Not A_IsAdmin
{ MsgBox,
(
This will turn OFF the annoying auto power saver function for the G930 by:
1. Closes LCore.exe (Logitech Gaming Software)
2. Opens path C:\Program Files\Logitech Gaming Software\Resources\G930\Manifest so you can see the files.
3. Makes a backup copy of Device_Manifest.xml and renames it Original_Device_Manifest.xml
4. Changes line 10 in Device_Manifest.xml from (turnOffInterval="900") to (turnOffInterval="0")
5. Starts LCore.exe again
6. It's Done.
7. Run the patch again to automatically reverse the aforementioned process and turn the auto power saver function back ON.
No Reboot Required!
)
Run, *RunAs "%A_ScriptFullPath%"
ExitApp
} If A_IsAdmin
{ Process, Close, LCore.exe
WinWaitClose, ahk_exe LCore.exe
IfExist, C:\Program Files\Logitech Gaming Software\Resources\G930\Manifest
{ IfExist, C:\Program Files\Logitech Gaming Software\Resources\G930\Manifest\Original_Device_Manifest.xml
{ ToolTip, Restoring Defaults. Pleas wait.
SetTimer, RemoveToolTip, 2000
v := ComObjCreate("SAPI.SpVoice")
v.Voice := v.GetVoices().Item(1)
v.Speak("Restoring Defaults, Pleas wait.")
FileDelete, C:\Program Files\Logitech Gaming Software\Resources\G930\Manifest\Device_Manifest.xml
Loop,
{ Sleep, 700
IfNotExist, C:\Program Files\Logitech Gaming Software\Resources\G930\Manifest\Device_Manifest.xml
{ GoSub, UnDo
} } } Else IfNotExist, C:\Program Files\Logitech Gaming Software\Resources\G930\Manifest\Original_Device_Manifest.xml
{ IfNotExist, C:\Program Files\Logitech Gaming Software\Resources\G930\Manifest\Device_Manifest.xml
{ GoSub, InsToC
} Else IfExist, C:\Program Files\Logitech Gaming Software\Resources\G930\Manifest\Device_Manifest.xml
{ ToolTip, Installing update. Pleas wait.
SetTimer, RemoveToolTip, 2000
v := ComObjCreate("SAPI.SpVoice")
v.Voice := v.GetVoices().Item(1)
v.Speak("Installing update, Pleas wait.")
GoSub, Fixer
} } IfExist, C:\Program Files\Logitech Gaming Software\Resources\G930\Manifest\Device_Manifest.xml
{ GoSub, Fixer
} } Else
{ GoSub, InsToC
} } Return
Fixer:
{ Run, "C:\Program Files\Logitech Gaming Software\Resources\G930\Manifest"
WinWait, Manifest
SetWorkingDir C:\Program Files\Logitech Gaming Software\Resources\G930\Manifest
FileCopy, C:\Program Files\Logitech Gaming Software\Resources\G930\Manifest\Device_Manifest.xml, C:\Program Files\Logitech Gaming Software\Resources\G930\Manifest\Original_Device_Manifest.xml
FileRead, OldStr, Device_Manifest.xml
StringReplace, NewStr, OldStr, turnOffInterval="900", turnOffInterval="0", All
FileDelete, Device_Manifest.xml
FileAppend, %NewStr%, Device_Manifest.xml
Run, "C:\Program Files\Logitech Gaming Software\LCore.exe"
WinWait, ahk_exe LCore.exe
ToolTip, Update applied suck-dick-cessfully! `nG930 power save timer is OFF and is now ready for use!!
SetTimer, RemoveToolTip, 2000
v := ComObjCreate("SAPI.SpVoice")
v.Voice := v.GetVoices().Item(1)
v.Speak("Update applied suck-dick-cessfully! G930 power save timer is OFF and is now ready for use!")
ExitApp
} Return ;<<< Fixer
UnDo:
{ Run, "C:\Program Files\Logitech Gaming Software\Resources\G930\Manifest"
WinWait, Manifest
FileMove, C:\Program Files\Logitech Gaming Software\Resources\G930\Manifest\Original_Device_Manifest.xml, C:\Program Files\Logitech Gaming Software\Resources\G930\Manifest\Device_Manifest.xml
Run, "C:\Program Files\Logitech Gaming Software\LCore.exe"
WinWait, ahk_exe LCore.exe
ToolTip, Defaults successfully restored! `nG930 power save timer is now set back to the default 15min. `nand is now ready for use!
SetTimer, RemoveToolTip, 2000
v := ComObjCreate("SAPI.SpVoice")
v.Voice := v.GetVoices().Item(1)
v.Speak("Defaults successfully restored! G930 power save timer is now set back to the default 15min. and is now ready for use!")
ExitApp
} Return ;<<< UnDo
InsToC:
{ BlockInput, ON
Run, Notepad.exe, C:\My Documents
WinWait, Untitled - Notepad
WinActivate, Untitled - Notepad
WinWaitActive, Untitled - Notepad
WinMove, 10, 10
clipboard :=
(
"8===D~~8===D~~8===D~~8===D~~8===D~~8===D~~8===D~~8===D~~8===D~~8===D~~8===D~~8===D~~
Device_Manifest.xml is missing!
C:\Program Files\Logitech Gaming Software\Resources\G930\Manifest\Device_Manifest.xml
Please install Logitech G930 to drive C:\
And try again!
8===D~~8===D~~8===D~~8===D~~8===D~~8===D~~8===D~~8===D~~8===D~~8===D~~8===D~~8===D~~
"
)
Send, ^v
Send, {Enter}
clipboard := "8===D~~"
BlockInput, OFF
v := ComObjCreate("SAPI.SpVoice")
v.Voice := v.GetVoices().Item(1)
v.Speak("Device_Manifest.xml is missing! Please install Logitech G930 to drive C and try again")
ExitApp
} Return ;<<< InsToC
;<============================================ RemoveToolTip ============================================>
RemoveToolTip:
{ SetTimer, RemoveToolTip, OFF
ToolTip
} Return ;<<< RemoveToolTip
;<============================================== E N D ================================================>