cattywampus wrote:
having an absolute path in the 3rd argument and changing "S:\" to "Z:\" for the start dir and it does the same.
Well, I did that to try and break it, and it worked, and broke it, so that's expected

The takeaway from this is that the working directory has to be valid, or the script won't run, even if the path to the script is valid.
If I try execute the bat file using the cmd prompt, the prompt will open but not actually execute the file.
Nice one, I was going to suggest this and then I read you'd already tried it. So, you're getting closer to the problem here. What you've discovered is that this problem is actually nothing to do with voicemeeter or macro buttons. The problem is that the script just won't work, period....so, naturally it's not working in macrobuttons either
So, drill deeper on that one. Rather than trying to run the batch file from the command prompt, copy the command from the batch file, and paste that into the shell.... so from what you've said this would mean trying
In that vein, try making sure the bat file actually works
Code: Select all
"StuPC_Set_Default_Audio_Device_-_Game_(Realtek_Optical_Out).bat"
And that nircmd is actually working, by pasting those commands from the batch file into cmd.exe:
Code: Select all
nircmd setdefaultsounddevice "Game Realtek Optical GoXLR Opt In" 1
All of this is intended to be more specific in your knowledge of where it's broken. You can go the other way, too, to confirm what is not broken.
When I tested this I just made a quick test script so you may like to try that, too:
Code: Select all
foo.vbs
MsgBox("Hello, World!") ' Display message on computer screen.
This will pop up a message on screen. You can use this to make sure vbscripts are working, and if you want, you can set a macrobutton to execute this script to confirm that they are working via VM.
I also tried with a batch file:
This will create a file named foo.txt in the current directory and put some text in it. Then I guess you could try your vbscript bat file hider on that:
Code: Select all
'HideBat.vbs
CreateObject("Wscript.Shell").Run "foo.bat", 0, True
Those last three I think will just work out of the box, and confirm that there's no problem with your PC like missing components or whatever.
Not sure just yet. But you're getting close