Notice: This forum has been recovered from an old backup, so some content, links, and dates may be outdated. The forum is currently read-only while we restore sign-in and registration functionality. Details

If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.

Win7 SpeakerConfig Registry Key Batch File

If you have a question or need help, this is the place to be.
Post Reply
User avatar
zian
Site Admin
Posts: 569
Joined: Wed Jun 24, 2009 3:54 pm

Win7 SpeakerConfig Registry Key Batch File

Post by zian »

Howdy,

I want to use EG to change my speaker config when I switch monitors/sound device (via HDMI Sony Amp etc).

I found the Registry Key that changes the speaker config to 7.1... exported it.
Click it directly... it works/changes to 7.1.

I created a batch file to call up that registry key.
Click it directly... it works/changes to 7.1.

I try to call up that batch file in EG via Start Program/Application and it runs the batch file but does NOT change the speaker config.

Is there something I need to add/change to the EG Start Program parameters? Maybe command line something or other.

Thanks for any help.
eventghost.net
Be there or be square.
User avatar
wakko
Posts: 33
Joined: Sat Aug 20, 2011 9:27 pm
Location: Russia, Siberia

Re: Win7 SpeakerConfig Registry Key Batch File

Post by wakko »

First come to mind:
Try to use full paths inside bat file. Also, call your bat file with full path.
User avatar
zian
Site Admin
Posts: 569
Joined: Wed Jun 24, 2009 3:54 pm

Re: Win7 SpeakerConfig Registry Key Batch File

Post by zian »

Thanks for that wakko.
But no go yet.

Full paths.... like this...
my batch file...

Code: Select all

REGEDIT /S  "C:\Users\SSD-666\Desktop\71.reg"
I have tried moving both the batch and reg key to root of C, to different places, renaming them.
Nothing like that would help it work via EG.
eventghost.net
Be there or be square.
jonib
Plugin Developer
Posts: 1328
Joined: Thu Mar 26, 2009 9:33 pm
Location: Sweden

Re: Win7 SpeakerConfig Registry Key Batch File

Post by jonib »

zian wrote:I try to call up that batch file in EG via Start Program/Application and it runs the batch file but does NOT change the speaker config.
I'm suspecting your problem is that EG is running the 32bit version of Regedit, so the registry is update in the wrong section if you are running on a 64bit Windows.

Try this In EGs Start application, put in Executable:

Code: Select all

c:\Windows\sysnative\cmd.exe
That should run a 64bit CMD.exe. The sysnative is a virtual directory that points to the 64bit system32 when running a 32bit program.

Put in Command line options:

Code: Select all

/c start regedit.exe  /S  "C:\Users\SSD-666\Desktop\71.reg"
And that should run the 64bit Regedit.

Hope this helps.

jonib
XBMC2 plugin to control XBMC. If you want to flatter me Image
User avatar
zian
Site Admin
Posts: 569
Joined: Wed Jun 24, 2009 3:54 pm

Re: Win7 SpeakerConfig Registry Key Batch File

Post by zian »

jonib wrote:I'm suspecting your problem is that EG is running the 32bit version of Regedit, so the registry is update in the wrong section if you are running on a 64bit Windows.

Hope this helps.

jonib
Freaking Genius.
Works like a charm jonib.

Thanks much.
eventghost.net
Be there or be square.
blaher
Experienced User
Posts: 487
Joined: Thu Nov 17, 2011 1:27 am

Re: Win7 SpeakerConfig Registry Key Batch File

Post by blaher »

jonib wrote:I'm suspecting your problem is that EG is running the 32bit version of Regedit, so the registry is update in the wrong section if you are running on a 64bit Windows.
jonib
What if you use EventGhost's built in registry changer, rather than a batch file? Do you still need to use sysnative trick?
Attachments
Capture.PNG
jonib
Plugin Developer
Posts: 1328
Joined: Thu Mar 26, 2009 9:33 pm
Location: Sweden

Re: Win7 SpeakerConfig Registry Key Batch File

Post by jonib »

blaher wrote:What if you use EventGhost's built in registry changer, rather than a batch file? Do you still need to use sysnative trick?
By default a 32bit program can't access the 64bit part of the registry.

There is a parameter KEY_WOW64_64KEY that needs to be used to access the 64bit registry. I don't know if EventGhost uses that.

jonib
XBMC2 plugin to control XBMC. If you want to flatter me Image
Post Reply