How can I update the registry values every time Windows starts?











up vote
0
down vote

favorite












There's this annoyance in windows where applications are constantly stealing your focus. I find it very very annoying because I need to work on parallel tasks.



However, I found some registry values that can be updated in windows so that the focus steal is disabled. The problem is that this only works until windows is restarted the next time. After that it reverts back to its default behavior.



How can I ensure that the following keys are updated in windows after every restart (without any manual intervention).




HKEY_CURRENT_USERControl PanelDesktop Edit UserPreferenceMask value
to be 9F 3E 07 80 12 00 00 00 (there are many numbers in here, I only
had to update the 9F 3E 07 parts and the rest of the value remained)



HKEY_CURRENT_USERControl PanelDesktop Edit ActiveWndTrkTimeout,
change to 150 in decimal



HKEY_CURRENT_USERControl PanelDesktop Edit ForegroundFlashCount,
change to something like 7000 in decimal



and finally, I set this though from what I read it may/likely not do
anything in Windows Vista+ (this was the first thing I tried and it
didn't work, but I left it):



HKEY_CURRENT_USERControl PanelDesktop Edit ForegroundLockTimeout
to something very large (e.g. 9999999 in decimal)



Log off and log back in; so far programs that I KNOW steal focus are
silently resting in the background now and flashing me on the taskbar,
patiently waiting for me... AHHHHHHHH!











share|improve this question






















  • Create cmd file and put there command reg (run it as reg /? to get info how to use it) with keys you want to update, then put this cmd file in the Startup folder located in C:UsersUsernameAppDataRoamingMicrosoftWindowsStart MenuProgramsStartup
    – Alex
    Nov 19 at 15:05












  • @Alex You mean a batch file, right? Also, it's still pretty complicated for me. I'll try searching tomorrow. I'm done for the day.
    – Mugen
    Nov 19 at 17:03










  • @Alex I tried out your suggestion and spent some time figuring out how to create a bat/cmd file. However, it needs administrator level to make changes to the registry. Any ideas about how to solve that problem?
    – Mugen
    Nov 20 at 5:10















up vote
0
down vote

favorite












There's this annoyance in windows where applications are constantly stealing your focus. I find it very very annoying because I need to work on parallel tasks.



However, I found some registry values that can be updated in windows so that the focus steal is disabled. The problem is that this only works until windows is restarted the next time. After that it reverts back to its default behavior.



How can I ensure that the following keys are updated in windows after every restart (without any manual intervention).




HKEY_CURRENT_USERControl PanelDesktop Edit UserPreferenceMask value
to be 9F 3E 07 80 12 00 00 00 (there are many numbers in here, I only
had to update the 9F 3E 07 parts and the rest of the value remained)



HKEY_CURRENT_USERControl PanelDesktop Edit ActiveWndTrkTimeout,
change to 150 in decimal



HKEY_CURRENT_USERControl PanelDesktop Edit ForegroundFlashCount,
change to something like 7000 in decimal



and finally, I set this though from what I read it may/likely not do
anything in Windows Vista+ (this was the first thing I tried and it
didn't work, but I left it):



HKEY_CURRENT_USERControl PanelDesktop Edit ForegroundLockTimeout
to something very large (e.g. 9999999 in decimal)



Log off and log back in; so far programs that I KNOW steal focus are
silently resting in the background now and flashing me on the taskbar,
patiently waiting for me... AHHHHHHHH!











share|improve this question






















  • Create cmd file and put there command reg (run it as reg /? to get info how to use it) with keys you want to update, then put this cmd file in the Startup folder located in C:UsersUsernameAppDataRoamingMicrosoftWindowsStart MenuProgramsStartup
    – Alex
    Nov 19 at 15:05












  • @Alex You mean a batch file, right? Also, it's still pretty complicated for me. I'll try searching tomorrow. I'm done for the day.
    – Mugen
    Nov 19 at 17:03










  • @Alex I tried out your suggestion and spent some time figuring out how to create a bat/cmd file. However, it needs administrator level to make changes to the registry. Any ideas about how to solve that problem?
    – Mugen
    Nov 20 at 5:10













up vote
0
down vote

favorite









up vote
0
down vote

favorite











There's this annoyance in windows where applications are constantly stealing your focus. I find it very very annoying because I need to work on parallel tasks.



However, I found some registry values that can be updated in windows so that the focus steal is disabled. The problem is that this only works until windows is restarted the next time. After that it reverts back to its default behavior.



How can I ensure that the following keys are updated in windows after every restart (without any manual intervention).




HKEY_CURRENT_USERControl PanelDesktop Edit UserPreferenceMask value
to be 9F 3E 07 80 12 00 00 00 (there are many numbers in here, I only
had to update the 9F 3E 07 parts and the rest of the value remained)



HKEY_CURRENT_USERControl PanelDesktop Edit ActiveWndTrkTimeout,
change to 150 in decimal



HKEY_CURRENT_USERControl PanelDesktop Edit ForegroundFlashCount,
change to something like 7000 in decimal



and finally, I set this though from what I read it may/likely not do
anything in Windows Vista+ (this was the first thing I tried and it
didn't work, but I left it):



HKEY_CURRENT_USERControl PanelDesktop Edit ForegroundLockTimeout
to something very large (e.g. 9999999 in decimal)



Log off and log back in; so far programs that I KNOW steal focus are
silently resting in the background now and flashing me on the taskbar,
patiently waiting for me... AHHHHHHHH!











share|improve this question













There's this annoyance in windows where applications are constantly stealing your focus. I find it very very annoying because I need to work on parallel tasks.



However, I found some registry values that can be updated in windows so that the focus steal is disabled. The problem is that this only works until windows is restarted the next time. After that it reverts back to its default behavior.



How can I ensure that the following keys are updated in windows after every restart (without any manual intervention).




HKEY_CURRENT_USERControl PanelDesktop Edit UserPreferenceMask value
to be 9F 3E 07 80 12 00 00 00 (there are many numbers in here, I only
had to update the 9F 3E 07 parts and the rest of the value remained)



HKEY_CURRENT_USERControl PanelDesktop Edit ActiveWndTrkTimeout,
change to 150 in decimal



HKEY_CURRENT_USERControl PanelDesktop Edit ForegroundFlashCount,
change to something like 7000 in decimal



and finally, I set this though from what I read it may/likely not do
anything in Windows Vista+ (this was the first thing I tried and it
didn't work, but I left it):



HKEY_CURRENT_USERControl PanelDesktop Edit ForegroundLockTimeout
to something very large (e.g. 9999999 in decimal)



Log off and log back in; so far programs that I KNOW steal focus are
silently resting in the background now and flashing me on the taskbar,
patiently waiting for me... AHHHHHHHH!








windows-10 windows-registry






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 19 at 11:32









Mugen

3432620




3432620












  • Create cmd file and put there command reg (run it as reg /? to get info how to use it) with keys you want to update, then put this cmd file in the Startup folder located in C:UsersUsernameAppDataRoamingMicrosoftWindowsStart MenuProgramsStartup
    – Alex
    Nov 19 at 15:05












  • @Alex You mean a batch file, right? Also, it's still pretty complicated for me. I'll try searching tomorrow. I'm done for the day.
    – Mugen
    Nov 19 at 17:03










  • @Alex I tried out your suggestion and spent some time figuring out how to create a bat/cmd file. However, it needs administrator level to make changes to the registry. Any ideas about how to solve that problem?
    – Mugen
    Nov 20 at 5:10


















  • Create cmd file and put there command reg (run it as reg /? to get info how to use it) with keys you want to update, then put this cmd file in the Startup folder located in C:UsersUsernameAppDataRoamingMicrosoftWindowsStart MenuProgramsStartup
    – Alex
    Nov 19 at 15:05












  • @Alex You mean a batch file, right? Also, it's still pretty complicated for me. I'll try searching tomorrow. I'm done for the day.
    – Mugen
    Nov 19 at 17:03










  • @Alex I tried out your suggestion and spent some time figuring out how to create a bat/cmd file. However, it needs administrator level to make changes to the registry. Any ideas about how to solve that problem?
    – Mugen
    Nov 20 at 5:10
















Create cmd file and put there command reg (run it as reg /? to get info how to use it) with keys you want to update, then put this cmd file in the Startup folder located in C:UsersUsernameAppDataRoamingMicrosoftWindowsStart MenuProgramsStartup
– Alex
Nov 19 at 15:05






Create cmd file and put there command reg (run it as reg /? to get info how to use it) with keys you want to update, then put this cmd file in the Startup folder located in C:UsersUsernameAppDataRoamingMicrosoftWindowsStart MenuProgramsStartup
– Alex
Nov 19 at 15:05














@Alex You mean a batch file, right? Also, it's still pretty complicated for me. I'll try searching tomorrow. I'm done for the day.
– Mugen
Nov 19 at 17:03




@Alex You mean a batch file, right? Also, it's still pretty complicated for me. I'll try searching tomorrow. I'm done for the day.
– Mugen
Nov 19 at 17:03












@Alex I tried out your suggestion and spent some time figuring out how to create a bat/cmd file. However, it needs administrator level to make changes to the registry. Any ideas about how to solve that problem?
– Mugen
Nov 20 at 5:10




@Alex I tried out your suggestion and spent some time figuring out how to create a bat/cmd file. However, it needs administrator level to make changes to the registry. Any ideas about how to solve that problem?
– Mugen
Nov 20 at 5:10










1 Answer
1






active

oldest

votes

















up vote
0
down vote



accepted










I worked on the direction suggested by Alex and arrived at the following solution:




  1. Create .bat file on windows

  2. Enter the following code into the file:



@Echo Off echo 'success' Title Reg Converter v1.2 & Color 1A cd
%systemroot%system32 call :IsAdmin



Reg.exe add "HKCUControl PanelDesktop" /v "ActiveWndTrackTimeout" /t
REG_DWORD /d "150" /f Reg.exe add "HKCUControl PanelDesktop" /v
"ForegroundFlashCount" /t REG_DWORD /d "7000" /f Reg.exe add
"HKCUControl PanelDesktop" /v "ForegroundLockTimeout" /t REG_DWORD
/d "9999999" /f Reg.exe add "HKCUControl PanelDesktop" /v
"UserPreferencesMask" /t REG_BINARY /d "9f3e078012000000" /f Exit



:IsAdmin Reg.exe query "HKUS-1-5-19Environment" If Not %ERRORLEVEL%
EQU 0 ( Cls & Echo You must have administrator rights to continue ...
Pause & Exit ) Cls goto:eof





  1. Add this to Windows Task scheduler to run at startup (Note that adding it to startup causes problems because the script needs admin access).


  2. While creating the Task be sure to check the elevated privileges checkbox







share|improve this answer





















    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "3"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1376680%2fhow-can-i-update-the-registry-values-every-time-windows-starts%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    0
    down vote



    accepted










    I worked on the direction suggested by Alex and arrived at the following solution:




    1. Create .bat file on windows

    2. Enter the following code into the file:



    @Echo Off echo 'success' Title Reg Converter v1.2 & Color 1A cd
    %systemroot%system32 call :IsAdmin



    Reg.exe add "HKCUControl PanelDesktop" /v "ActiveWndTrackTimeout" /t
    REG_DWORD /d "150" /f Reg.exe add "HKCUControl PanelDesktop" /v
    "ForegroundFlashCount" /t REG_DWORD /d "7000" /f Reg.exe add
    "HKCUControl PanelDesktop" /v "ForegroundLockTimeout" /t REG_DWORD
    /d "9999999" /f Reg.exe add "HKCUControl PanelDesktop" /v
    "UserPreferencesMask" /t REG_BINARY /d "9f3e078012000000" /f Exit



    :IsAdmin Reg.exe query "HKUS-1-5-19Environment" If Not %ERRORLEVEL%
    EQU 0 ( Cls & Echo You must have administrator rights to continue ...
    Pause & Exit ) Cls goto:eof





    1. Add this to Windows Task scheduler to run at startup (Note that adding it to startup causes problems because the script needs admin access).


    2. While creating the Task be sure to check the elevated privileges checkbox







    share|improve this answer

























      up vote
      0
      down vote



      accepted










      I worked on the direction suggested by Alex and arrived at the following solution:




      1. Create .bat file on windows

      2. Enter the following code into the file:



      @Echo Off echo 'success' Title Reg Converter v1.2 & Color 1A cd
      %systemroot%system32 call :IsAdmin



      Reg.exe add "HKCUControl PanelDesktop" /v "ActiveWndTrackTimeout" /t
      REG_DWORD /d "150" /f Reg.exe add "HKCUControl PanelDesktop" /v
      "ForegroundFlashCount" /t REG_DWORD /d "7000" /f Reg.exe add
      "HKCUControl PanelDesktop" /v "ForegroundLockTimeout" /t REG_DWORD
      /d "9999999" /f Reg.exe add "HKCUControl PanelDesktop" /v
      "UserPreferencesMask" /t REG_BINARY /d "9f3e078012000000" /f Exit



      :IsAdmin Reg.exe query "HKUS-1-5-19Environment" If Not %ERRORLEVEL%
      EQU 0 ( Cls & Echo You must have administrator rights to continue ...
      Pause & Exit ) Cls goto:eof





      1. Add this to Windows Task scheduler to run at startup (Note that adding it to startup causes problems because the script needs admin access).


      2. While creating the Task be sure to check the elevated privileges checkbox







      share|improve this answer























        up vote
        0
        down vote



        accepted







        up vote
        0
        down vote



        accepted






        I worked on the direction suggested by Alex and arrived at the following solution:




        1. Create .bat file on windows

        2. Enter the following code into the file:



        @Echo Off echo 'success' Title Reg Converter v1.2 & Color 1A cd
        %systemroot%system32 call :IsAdmin



        Reg.exe add "HKCUControl PanelDesktop" /v "ActiveWndTrackTimeout" /t
        REG_DWORD /d "150" /f Reg.exe add "HKCUControl PanelDesktop" /v
        "ForegroundFlashCount" /t REG_DWORD /d "7000" /f Reg.exe add
        "HKCUControl PanelDesktop" /v "ForegroundLockTimeout" /t REG_DWORD
        /d "9999999" /f Reg.exe add "HKCUControl PanelDesktop" /v
        "UserPreferencesMask" /t REG_BINARY /d "9f3e078012000000" /f Exit



        :IsAdmin Reg.exe query "HKUS-1-5-19Environment" If Not %ERRORLEVEL%
        EQU 0 ( Cls & Echo You must have administrator rights to continue ...
        Pause & Exit ) Cls goto:eof





        1. Add this to Windows Task scheduler to run at startup (Note that adding it to startup causes problems because the script needs admin access).


        2. While creating the Task be sure to check the elevated privileges checkbox







        share|improve this answer












        I worked on the direction suggested by Alex and arrived at the following solution:




        1. Create .bat file on windows

        2. Enter the following code into the file:



        @Echo Off echo 'success' Title Reg Converter v1.2 & Color 1A cd
        %systemroot%system32 call :IsAdmin



        Reg.exe add "HKCUControl PanelDesktop" /v "ActiveWndTrackTimeout" /t
        REG_DWORD /d "150" /f Reg.exe add "HKCUControl PanelDesktop" /v
        "ForegroundFlashCount" /t REG_DWORD /d "7000" /f Reg.exe add
        "HKCUControl PanelDesktop" /v "ForegroundLockTimeout" /t REG_DWORD
        /d "9999999" /f Reg.exe add "HKCUControl PanelDesktop" /v
        "UserPreferencesMask" /t REG_BINARY /d "9f3e078012000000" /f Exit



        :IsAdmin Reg.exe query "HKUS-1-5-19Environment" If Not %ERRORLEVEL%
        EQU 0 ( Cls & Echo You must have administrator rights to continue ...
        Pause & Exit ) Cls goto:eof





        1. Add this to Windows Task scheduler to run at startup (Note that adding it to startup causes problems because the script needs admin access).


        2. While creating the Task be sure to check the elevated privileges checkbox








        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Nov 20 at 9:25









        Mugen

        3432620




        3432620






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Super User!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.





            Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


            Please pay close attention to the following guidance:


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1376680%2fhow-can-i-update-the-registry-values-every-time-windows-starts%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Plaza Victoria

            Puebla de Zaragoza

            Musa