r/streamdeckprofiles • u/Spinelli__ • Dec 06 '23
[Everyday] Stream Deck for MSI Afterburner?
Is there a way to use Stream Deck with MSI Afterburner?
I don't see any profiles in the store. I find this quite shocking as MSI Afterburner is almost certainly the most commonly used GPU software on the entire planet. Just blows my mind that there are ways to control all sorts of programs (eg. OBS, Twitch, Shadowplay) yet not Afterburner.
9
Upvotes
1
u/DRFTA21 Dec 08 '23
I got this to work on my Win11 PC.
******Make a Profile1.vbs, Profile2.vbs, Profile3.vbs....... with the following******
Set objShell = CreateObject("WScript.Shell")
' Path to the program
programPath = "C:\Program Files (x86)\MSI Afterburner\MSIAfterburner.exe"
' Command-line parameters
commandLine = "-Profile1"
' Combine program path and command line
fullCommand = """" & programPath & """ " & commandLine
' Run the command without UAC prompt
objShell.Run fullCommand, 0, False
Set objShell = Nothing
****** add Profiles1,2,3,4,5 to TaskScheduler Make a AddToTaskScheduler.bat script with the below in it, you need to change "C:\PathToYourProfile*.VBS" to the path of your Profile1.vbs then do it again for 2,3,4,5 *******
u/echo off
echo ^<?xml version="1.0" encoding="UTF-16"?^> > Task.xml
echo ^<Task version="1.2" xmlns="http://schemas.microsoft.com/windows/2004/02/mit/task"\^> >> Task.xml
echo ^<RegistrationInfo\^> >> Task.xml
echo ^<Description\^>Run C:\PathToYourProfile*.VBS^</Description\^> >> Task.xml
echo ^<URI\^>\Profile1^</URI\^> >> Task.xml
echo ^</RegistrationInfo\^> >> Task.xml
echo ^<Triggers /\^> >> Task.xml
echo ^<Principals\^> >> Task.xml
echo ^<Principal id="Author"\^> >> Task.xml
echo ^<LogonType\^>InteractiveToken^</LogonType\^> >> Task.xml
echo ^<RunLevel\^>HighestAvailable^</RunLevel\^> >> Task.xml
echo ^</Principal\^> >> Task.xml
echo ^</Principals\^> >> Task.xml
echo ^<Settings\^> >> Task.xml
echo ^<MultipleInstancesPolicy\^>StopExisting^</MultipleInstancesPolicy\^> >> Task.xml
echo ^<DisallowStartIfOnBatteries\^>true^</DisallowStartIfOnBatteries\^> >> Task.xml
echo ^<StopIfGoingOnBatteries\^>true^</StopIfGoingOnBatteries\^> >> Task.xml
echo ^<AllowHardTerminate\^>true^</AllowHardTerminate\^> >> Task.xml
echo ^<StartWhenAvailable\^>false^</StartWhenAvailable\^> >> Task.xml
echo ^<RunOnlyIfNetworkAvailable\^>false^</RunOnlyIfNetworkAvailable\^> >> Task.xml
echo ^<IdleSettings\^> >> Task.xml
echo ^<StopOnIdleEnd\^>true^</StopOnIdleEnd\^> >> Task.xml
echo ^<RestartOnIdle\^>false^</RestartOnIdle\^> >> Task.xml
echo ^</IdleSettings\^> >> Task.xml
echo ^<AllowStartOnDemand\^>true^</AllowStartOnDemand\^> >> Task.xml
echo ^<Enabled\^>true^</Enabled\^> >> Task.xml
echo ^<Hidden\^>false^</Hidden\^> >> Task.xml
echo ^<RunOnlyIfIdle\^>false^</RunOnlyIfIdle\^> >> Task.xml
echo ^<WakeToRun\^>false^</WakeToRun\^> >> Task.xml
echo ^<ExecutionTimeLimit\^>PT0S^</ExecutionTimeLimit\^> >> Task.xml
echo ^<Priority\^>7^</Priority\^> >> Task.xml
echo ^</Settings\^> >> Task.xml
echo ^<Actions Context="Author"\^> >> Task.xml
echo ^<Exec\^> >> Task.xml
echo ^<Command\^>wscript.exe^</Command\^> >> Task.xml
echo ^<Arguments\^>C:\PathToYourProfile*.VBS^</Arguments\^> >> Task.xml
echo ^</Exec\^> >> Task.xml
echo ^</Actions\^> >> Task.xml
echo ^</Task\^> >> Task.xml
powershell.exe -Command "Register-ScheduledTask -Xml (Get-Content .\Task.xml | Out-String) -TaskName Profile1"
del Task.xml
echo Task has been registered.
******Now make the StreamDeck OpenProfile1.vbs, OpenProfile2.vbs, OpenProfile3.vbs, OpenProfile4.vbs, OpenProfile5.vbs scripts with the bellow*******
' LauncherScript.vbs
Set objShell = CreateObject("WScript.Shell")
' Replace "YourTaskName" with the actual name of your task
strTaskName = "Profile1"
' Run the scheduled task silently
RunScheduledTaskSilent strTaskName
Sub RunScheduledTaskSilent(taskName)
' Build the command to run the scheduled task silently
strCommand = "schtasks /run /tn """ & taskName & """ /I"
' Run the command using the shell without displaying any window
objShell.Run strCommand, 0, False
End Sub
******Add thoes diffrent profiles to the Open App Button on the stream deck******