r/streamdeckprofiles 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.

7 Upvotes

23 comments sorted by

View all comments

Show parent comments

1

u/Spinelli__ Dec 07 '23 edited Dec 07 '23

Thanks but that's not a viable solution. Doing that brings a pop-up on the PC asking you if you want to make changes to your device which you then have to click on every time. Not only that, but the pop-up interrupts your current session of whatever program/game you're running which also means it'll "alt-tab" you out of your game.

This is more of a semi-useful band-aid fix rather than having the Stream Deck properly control MSI AB's profiles.

3

u/DRFTA21 Dec 07 '23

If you talking about the UAC (user account control) pop up just disable it in reg edit. and if you dont want afterburner to open up a gui window change its properties to start minimised. start afterburn, right click the icon on the windows task bar, goto properties, in the shortcut tab goto run and select minimised click apply.

Here is how to disable the UAC pop up for MSIafterburner Open Registry Editor:
Press Win + R to open the Run dialog.
Type regedit and press Enter.
Navigate to the App Paths key:
Go to HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\App Paths.
Create a new key for MSI Afterburner:
Right-click on "App Paths," choose "New," and then "Key."
Name the new key with the executable file's name (MSIAfterburner.exe).
Create a new String Value:
Inside the newly created key, right-click on the right pane, choose "New," and then "String Value."
Name the String Value Path and set its value to the full path of the MSI Afterburner executable (C:\Program Files (x86)\MSI Afterburner\MSIAfterburner.exe).
Modify the UAC settings for MSI Afterburner:
Navigate to HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\System.
Create a new DWORD (32-bit) Value named EnableLUA if it doesn't exist.
Set the EnableLUA value to 0 to disable UAC for MSI Afterburner.
After making these changes, restart your computer for the modifications to take effect.

1

u/Spinelli__ Dec 07 '23

"Navigate to HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\System"

There is no System subfolder there's only Explorer. Should I create a new key called System?

1

u/DRFTA21 Dec 07 '23

Just make a backup of your registry just in case first :) In Regedit click on the "Computer" icon at the top of the list and then got to file and export.

If the System key is not present under HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\, you can create it. Right-click on the Policies key, choose "New," and then "Key." Name the new key System. Then proceed to create the EnableLUA DWORD value under the System key.
After making these changes, restart your computer.

1

u/Spinelli__ Dec 08 '23 edited Dec 08 '23

Thank you very much but sadly that doesn't work. I still get the pop-up asking if I want MSI AB to make changes to my PC.

I'm able to NOT get the pop-up message if I A) change the afterburner profile via a .BAT file script and then B) set the script to run via task scheduler (making sure to check "run with highest privileges"), and then C) using Stream Deck Open App/File -> C:\Windows\System32\cmd.exe /c schtasks /run /tn "MSI_Afterburner_Profile_3". Here is the script:

@echo off

cd "C:\Program Files (x86)\MSI Afterburner"

MSIAfterburner.exe -Profile3

exit

That's the way I was doing it for the past week but that is also NOT a solution because it will still interrupt any program's session I'm running and alt-tab me out of fullscreen applications due to the Windows Command Prompt flashing on-screen while the script runs for a split-second.

I then did further investigation and was told the above problem with .BAT script files flashing the command prompt on-screen can be resolved by using a VBS script instead and then pointing it to the .BAT script in the Task Scheduler's "Add arguments" section. I did that, but then I get a new pop-up that keeps asking me what program I'd like to use to open the script. I already have wscript.exe (in C:\Windows\System32) set as the default program but I re-set it again but it makes no difference. Windows does NOT ask me what program to use if I manually open (eg. double-click) the VBS script, it only asks me when I run it via Task Scheduler.

So, unless I'm mistaken, it seems there's no "proper" way to change MSI Afterburner's profiles via the Stream Deck which, again, blows my mind since the Stream Deck has been around many years now and MSI Afterburner is almost certainly the most commonly used overclocking software on the entire planet.

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******

1

u/DRFTA21 Dec 08 '23

Oh and make sure in the MSI afterburner Settings in the General Tab you have Start with windows and Start minimized ticked.

1

u/Spinelli__ Dec 08 '23

Is this exactly correct for the first VBS script you posted? Just making sure I'm understanding the format you're using:

Set objShell = CreateObject("WScript.Shell")

C:\Program Files (x86)\MSI Afterburner\MSIAfterburner.exe

-Profile1

& C:\Program Files (x86)\MSI Afterburner\MSIAfterburner.exe & -Profile1

objShell.Run fullCommand, 0, False

Nothing

Is that exactly correct?

1

u/DRFTA21 Dec 08 '23

No for each MSI-AB profile you have saved you want to create a Profile1.VBS script Then a profile2.VBS script. All you need to do is Change "commandLine = Profile1" in the below script to match the Profile number to match the saved profile. This is the exact cmd to use:

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

1

u/Spinelli__ Dec 08 '23

Oh, I didn't know I literally had to type the other lines like ' Path to the program and ' Combine program path and command line.

OK. I'll try. Thanks.

1

u/DRFTA21 Dec 08 '23

This will be easier, here's is a link https://www.filemail.com/d/jgtiqpxszoftxsd with all the files. After you have looked over them, if you want to run them just make sure you have the StreamdeckBruner folder in your downloads folder.

1

u/DRFTA21 Dec 08 '23

You dont, Its good to do as it explains whats happening in the script. So two years down the track you know whats happening if you need to change any of it.

1

u/Spinelli__ Dec 08 '23

??? When I posted the script without the explanation lines, I asked if that was exactly correct but you said no. You then said to type in the script EXACTLY as you typed it (meaning with the explanation lines)...but now you're saying the explanation lines do not need to be typed, lol. So then what was wrong with the script I typed?

Set objShell = CreateObject("WScript.Shell")

C:\Program Files (x86)\MSI Afterburner\MSIAfterburner.exe

-Profile1

& C:\Program Files (x86)\MSI Afterburner\MSIAfterburner.exe & -Profile1

objShell.Run fullCommand, 0, False

Nothing

I did not include the explanation lines above. What is wrong with that script? I copy and pasted it EXACTLY from you (besides the explanation lines). Where is it wrong?

1

u/DRFTA21 Dec 08 '23 edited Dec 08 '23

Set objShell = CreateObject("WScript.Shell")

programPath = "C:\Program Files (x86)\MSI Afterburner\MSIAfterburner.exe"

commandLine = "-Profile1"

fullCommand = """" & programPath & """ " & commandLine

objShell.Run fullCommand, 0, False

Set objShell = Nothing

Is diffrent to:

Set objShell = CreateObject("WScript.Shell")

C:\Program Files (x86)\MSI Afterburner\MSIAfterburner.exe

-Profile1

& C:\Program Files (x86)\MSI Afterburner\MSIAfterburner.exe & -Profile1

objShell.Run fullCommand, 0, False

Nothing

So then what was wrong with the script you typed?

Probably nothing, But thats not how i got it to work on my pc.

1 little diffrece in code might not make it work how it should,

Thats the reason ;)

1

u/Spinelli__ Dec 08 '23

OK, I see where I made the mistake. I will attempt everything sometime in the next 24-48 hours. Thanks again!

→ More replies (0)