Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Make registry change at startup 3

Status
Not open for further replies.

Nelviticus

Programmer
Sep 9, 2003
1,819
GB
I have 5.1 surround sound speakers connected to my PC but every time I re-start Windows the sound settings get changed back to stereo. I can manually change them to 5.1 and everything works fine - the speaker test successfully plays sounds from each one - but when I re-boot it's back to stereo again.

After a bit of experimenting with exporting registry keys before and after changing settings then running a differencing tool on the output, I have come up with a small .reg file with the 5.1 settings. If I manually merge this back into the registry after a re-boot it sets the speakers back to 5.1 again.

The problem is how to merge it automatically, since this triggers a UAC prompt. I tried creating a batch file to do it (regedit /s myfile.reg), then creating a shortcut to the batch file in the StartUp folder and giving the shortcut 'run as administrator' permissions (which itself required a registry entry). However this didn't work; the changes weren't merged in.

Any idea how this can be done? You can probably do it with Group Policy but I know absolutely zero about how that works.

Thanks

Nelviticus
 
Cam you set it up via Task Scheduler to run at Startup?

This talks about setting the program up as a scheduled task which is launched manually via a shortcut by any user without knowing the Admin password. The initial setup to create the shortcut must be done by an Administrator.

How to Create a Elevated Program Shortcut without a UAC Prompt


I suppose you have already checked for updated sound drivers to fix the original problem with the Settings?
 
What version of Win7 do you have? If Pro or Ultimate, you can use your registry change in a group policy startup script (which runs elevated).
 
I run Ultimate but don't know my way around group policy at all. Now's a good time to start learning though and I'm sure Google will help me out.

Thanks for the replies. I'll look into both methods tonight.

Regards

Nelviticus
 
Have you tried to log in as the Administrator, not as Nelveticus with Admin rights, and then change the registry setting?

eventually even taking ownership and basically denying anything else from changing the setting?

Ben
"If it works don't fix it! If it doesn't use a sledgehammer..."
How to ask a question, when posting them to a professional forum.
Only ask questions with yes/no answers if you want "yes" or "no"
 
I think the same registry key also stores settings like volume levels, so if I deny access ordinary users won't be able to change the volume. But I'll try logging in as admin and changing the setting, then see what happens.

Regards

Nelviticus
 
I should have mentioned this before, but If the key(s) in question are in HKEY_CURRENT_USER, they can not not be modified/accessed by anything other than the current user.
 
Well what d'ya know, I normally rely on Windows update for drivers but last night I checked the Creative site and a new driver came out two weeks ago (the last one was about a year ago). I installed it and ... it's worse.

Now, even if I manually change to 5.1 speakers, it gets set back to stereo right before my eyes.

There are three ways of changing the settings: merging in a reg key, using the 'configure' button on Windows' playback devices control panel, or using the Creative applet (can't remember what that's called.

If I do it the Windows way and click one of the rear speakers to test it, the sound starts to play from the rear then switches to the front part-way through. Lo and behold, if I click through to 'finish' then go back into 'configure', it's back to stereo.

If I do it the Creative way I choose 5/5.1 from the speaker config drop-down and within a second or two, before my very eyes, the drop-down selection changes back to 2/2.1.

Those that have Creative sound hardware will know that several cryptically-named Creative processes always run in the background, doing goodness-knows-what but generally not being harmful or taking up any CPU time. My hunch is that one of these checks whether you have an incorrect speaker configuration and is wrongly deciding that I don't have rear speakers plugged in, so is changing my settings accordingly.

This changes the nature of my problem - I no longer need to figure out how to get the changes applied, I need to figure out how to stop them from being reversed. Even if I did manage to get that .reg file silently merged in at start-up the settings would get changed within seconds anyway.

Thanks for the help people, I think I need to try the Creative forums and/or try out those alternative SoundBlaster drivers that I remember reading about (Creative originally refused to release Win7 drivers for older sound cards until a disgruntled user wrote and released some very good ones themselves).

Regards

Nelviticus
 
Ah, good idea. I've used that before but not for a long time - hopefully it can identify which process is amending the registry.

Regards

Nelviticus
 
Well I've finally cracked it - I disabled the inappropriately-named 'CTHelper.exe' process in MSConfig. This is a Creative app that's supposed to be used by third parties to integrate their apps with Creative's hardware. Like much of Creative's software it's rather buggy.

Thanks for your help!

Nelviticus
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top