Link to home
Start Free TrialLog in
Avatar of Chris99
Chris99

asked on

Registry value changing

I'm having an annoying problem of having a little popup internet window (which I want to be there) pushing its way in front of everything and stealing focus from the application I'm working on.  I want the window to be there, but I don't want it to STEAL FOCUS as this is terribly terribly annoying.  Every sixty seconds it refreshes (as it is designed to), but this apparently causes it to pop to the front of all my open windows.

I searched for answers and found that Tweak UI has a setting, "Prevent Applications from Stealing Focus".  I installed it and checked this box.  It solved the problem....

However, when I restart, the box magically unchecks itself, and I have to open TweakUI and check it again.

I did more research and found that the Registry key that TweakUI is changing when I click that box is called ForegroundLockTimeout, in the HKCU\Control Panel\Desktop section, and when you check the box, TweakUI sets this value to 200000 (which is apparently the XP default anyway, I dunno why it changed from the default in the first place).  This number apparently is the number of milliseconds that Windows will not let focus be stolen from the application currently in use; i.e., for 200 seconds after you last click something in your current application, any other application trying to steal focus will not be allowed to.

But after restarting, this number is inexplicably set to 0.  Which means that any other application trying to steal focus will be allowed to after zero milliseconds (in other words, immediately).

So I manually changed this value from zero within the registry (several times), and it worked, but when I restarted, the number still went back to zero.

I even searched for other instances of ForegroundLockTimeout within the registry, found about four or five, and changed them ALL from zero.  But the one
in HKCU\Control Panel\Desktop is apparently the one that counts, and it changes back to 0.

So long story short...whenever I restart, the value of ForegroundLockTimeout reverts to 0.  If I could get this number to STOP changing, the problem would be solved.  Why won't Windows remember my stupid little setting?

Here I am at Experts Exchange, my last resort when I can't solve a problem on my own.  If you guys can solve this, you guys are good.  This is worth 500 simply because it's difficult TO ME, plus because you had to read all this.  :-)

Chris
Avatar of jkr
jkr
Flag of Germany image

>>But after restarting, this number is inexplicably set to 0.

Use RegMon (http://www.sysinternals.com/ntw2k/source/regmon.shtml) to see which application is changing that value on startup.
Avatar of dgroscost
dgroscost

Might be able to get away with removing WRITE ACCESS to that particular key/value in the registry - ie; remove YOUR access.
Avatar of Chris99

ASKER

Actually, I found other information pointing me to RegMon, so I diligently installed it and tried to log changes at startup...doing this however caused XP to CRASH HARD...it's very rare for me to see a blue screen in XP, but I saw at least 5 when I tried to run RegMon.  I had to remove it (manually, no uninstall feature) and then search through the registry to get rid of references to it before my system was back to normal.  So needless to say I'm not anxious to try RegMon again.

How would you remove write access?  I hadn't heard of that...and how would you restore write access, in case I ever needed to change it back?
If XP Pro, set an Audit Policy to know which process is changing the value.

http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&c2coff=1&selm=eOLMZy9YEHA.1692%40TK2MSFTNGP10.phx.gbl
RegMon has always worked for me - that's strange.

Load up Registry Editor (regedit.exe)

Navigate to the specific KEY that is changing all the time.  Highlight it.
Fix the value first if needed.
Click Edit.
Click Permissions.
Click Advanced.
Click Add.
Enter your username and hit ENTER or press Check Names.
Press Enter.
Click the check mark on "DENY - Set Value"
Change the "Apply onto" to SUBKEYS ONLY.
Click OK, OK, OK.

Note - you are denying access to set the registry value to yourself, not the local administrator.  If you need it back, log in as Admin and reverse the changes.
Avatar of Chris99

ASKER

Hmmm...what if I log in as Administrator exclusively anyway?  (I know, I know, that's a bad thing to do.)
Or - just get XP to reset the value on boot/logon..  

Just "RUN"  (heck, even "STARTUP") a little scriptie to inject the numeric value back in there each and every time you startup/logon..  (Use Kixtart -- http://www.kixtart.org)


I know -- it's less than perfect, but it'll do the task, right?

Uggh.

-- Scott.

Avatar of Chris99

ASKER

...Thanks Scott, I may end up doing just that if I can't find a way to prevent it changing.

Have I been excommunicated for always logging in as Administrator?  Look I'm sorry!  I tried changing the DENY-SET VALUE thing that dgroscost posted, but the button for 'check names' was greyed out, and in screwing around with the registry I didn't really feel up for experimentation.

Any other suggestions?  Any clarifications on what to do if you're logged in as Administrator?
Chris,

This isn't a unix, or unix-like OS.  The expectations of ROOT access are not the same as "admin" access under any recent Win O/S.  So, stop worrying about that.


I think the simple explanation is - none of us think the "perfect answer" is going to be given to you by one of us -- perhaps your expectations are a bit too high.

So, dig in, decide which of us has provided the most useful advice..  and give us the points, if you think any of us deserve 'em..


No offense -- you sound like an experienced unix-y admin that expects the "perfect" answer.  Guess what..?  This is Windows admining..  The perfect answer is unlikely to be found -- because the registry is essentially a "closed" source database, when ya get down to the "root" details -- such as you're asking about.


Okay?

Best wishes.

-- Scott.

My sympathy, Chris - we're seeing *Exactly* the same problem. Is your IE page in a browser window or it's own container (Our is in a little win32 wrapper)?

As far as we can make out, it's not XP that's the problem but a combo of XP and Office XP. More irritatingly, it appears intermittently with a variable period.

How are you doing your refresh META Refresh, Javascript or something else? I'd happily throw in a similar numebr of points to nail this one!
Avatar of Chris99

ASKER

The page is just a silly little popup from a website, it acts like a slot machine and every sixty seconds "spins" again; and that's what I mean by 'refreshes'--when it starts spinning, it pops to the front unless I have switched off this behavior using Tweak UI.  I'm not physically refreshing anything myself, it just runs in the background.

So I'm not sure how the program itself works, I'd assume javascript.

And yes, I DO have Office XP...although I can't really understand why having that would affect a setting like the one I'm dealing with.  But then again, yes I can...it's a Microsoft thing.  I'm very glad for you to try to throw light on the problem, although from what I see here it seems insoluble...

Chris

PS.  I know nothing about unix...and I've left the question open in hopes that someone will be able to stop the value from changing, rather than me figuring out a workaround, although if it goes on forever without an answer I'm sure I'll award points to the most helpful answer, that's what I usually do.
PPS.  There goes the popup again >:-(  Maybe it's activated by me talking about it.
Forgot about this - Chris, any Java on that page of yours? the MSVM was screwing us around...
Avatar of Chris99

ASKER

I can't really see the source because the menu bar is hidden, so I'm not sure...there is a flash animation...
Avatar of Chris99

ASKER

(...and I dunno what an MSVM is, by the way)
It's Microsoft's Java virtual machine - the flash may have a similar behaviour. Is this a page you have contol of?
Avatar of Chris99

ASKER

by control...do you mean is it a website of mine?  no...like i said before, just a silly little slot-machine themed popup.
Guess you're out of options then! Like I said - it was the Java VM causing our problems and took us ages to get to the bottom of it - Can we just close the question and refund the points, Mr Admin? Think this is useful info...
ASKER CERTIFIED SOLUTION
Avatar of modulo
modulo

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial