Set Firefox as Standard Browser via Powershell












0















I'm currently creating a deployment image (Win 10 x64). Since I have to use a FOG-Server, I created an Install-user with my powershell script in autostart. The user will be deleted after the script has been executed.
Script is working, however, the customer requires Firefox as Standard Browser. As mentioned I'm using an install user, so I can't go over registry and use the HKCU keys. Also, the tablets won't join a domain.



I thought about a local GPO, but I got no experiences in doing so. I saw this but I don't know where the command has been executed.



Does anyone have any idea, how I could manage this problem?










share|improve this question





























    0















    I'm currently creating a deployment image (Win 10 x64). Since I have to use a FOG-Server, I created an Install-user with my powershell script in autostart. The user will be deleted after the script has been executed.
    Script is working, however, the customer requires Firefox as Standard Browser. As mentioned I'm using an install user, so I can't go over registry and use the HKCU keys. Also, the tablets won't join a domain.



    I thought about a local GPO, but I got no experiences in doing so. I saw this but I don't know where the command has been executed.



    Does anyone have any idea, how I could manage this problem?










    share|improve this question



























      0












      0








      0








      I'm currently creating a deployment image (Win 10 x64). Since I have to use a FOG-Server, I created an Install-user with my powershell script in autostart. The user will be deleted after the script has been executed.
      Script is working, however, the customer requires Firefox as Standard Browser. As mentioned I'm using an install user, so I can't go over registry and use the HKCU keys. Also, the tablets won't join a domain.



      I thought about a local GPO, but I got no experiences in doing so. I saw this but I don't know where the command has been executed.



      Does anyone have any idea, how I could manage this problem?










      share|improve this question
















      I'm currently creating a deployment image (Win 10 x64). Since I have to use a FOG-Server, I created an Install-user with my powershell script in autostart. The user will be deleted after the script has been executed.
      Script is working, however, the customer requires Firefox as Standard Browser. As mentioned I'm using an install user, so I can't go over registry and use the HKCU keys. Also, the tablets won't join a domain.



      I thought about a local GPO, but I got no experiences in doing so. I saw this but I don't know where the command has been executed.



      Does anyone have any idea, how I could manage this problem?







      firefox powershell group-policy






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Mar 20 '17 at 10:17









      Community

      1




      1










      asked Jul 5 '16 at 12:46









      ShadowjerkShadowjerk

      612




      612






















          1 Answer
          1






          active

          oldest

          votes


















          0














          EDIT Not-so-recent Windows updates now prevent a program to set itself as default for anything, so the snippet below won't work anymore. Thanks to janv8000 for pointing it out.





          The command you mention has to be run by the user who needs Firefox as default browser. You can create a batch file and put it in the startup folder of the user's Start menu, making sure it's a self-deleting file. It should look like:



          @echo off
          firefox.exe -silent -nosplash -setDefaultBrowser
          erase %0


          (obviously you can add more commands as needed)



          Otherwise, the Start-process powershell cmdlet has a -Credentials parameter, but from what I see it will prompt you for a password (not suited for a script).






          share|improve this answer


























          • Thanks for your answer. However, it doesn't seem to be an favourable way since I'm creating the user within the script and thus, they won't have a folder.

            – Shadowjerk
            Jul 5 '16 at 13:07













          • Wait to see if it work before thanking me ^^

            – Nathan.Eilisha Shiraini
            Jul 5 '16 at 13:07











          • I forgot to shift enter. This solution won't work for me. It must be within a powershell script.

            – Shadowjerk
            Jul 5 '16 at 13:09











          • Then you can try Start-process with the crendentials argument, I think I saw a convoluted way to use it without a prompt (creating variables with the name & password of the user). I'm not sure though, it needs confirmation.

            – Nathan.Eilisha Shiraini
            Jul 5 '16 at 13:15






          • 1





            Doesn't work anymore, Windows 10 version 1703 and FF 57.0. It just brings up the "Choose default app" UI.

            – janv8000
            Oct 5 '17 at 6:06











          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',
          autoActivateHeartbeat: false,
          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%2f1097115%2fset-firefox-as-standard-browser-via-powershell%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









          0














          EDIT Not-so-recent Windows updates now prevent a program to set itself as default for anything, so the snippet below won't work anymore. Thanks to janv8000 for pointing it out.





          The command you mention has to be run by the user who needs Firefox as default browser. You can create a batch file and put it in the startup folder of the user's Start menu, making sure it's a self-deleting file. It should look like:



          @echo off
          firefox.exe -silent -nosplash -setDefaultBrowser
          erase %0


          (obviously you can add more commands as needed)



          Otherwise, the Start-process powershell cmdlet has a -Credentials parameter, but from what I see it will prompt you for a password (not suited for a script).






          share|improve this answer


























          • Thanks for your answer. However, it doesn't seem to be an favourable way since I'm creating the user within the script and thus, they won't have a folder.

            – Shadowjerk
            Jul 5 '16 at 13:07













          • Wait to see if it work before thanking me ^^

            – Nathan.Eilisha Shiraini
            Jul 5 '16 at 13:07











          • I forgot to shift enter. This solution won't work for me. It must be within a powershell script.

            – Shadowjerk
            Jul 5 '16 at 13:09











          • Then you can try Start-process with the crendentials argument, I think I saw a convoluted way to use it without a prompt (creating variables with the name & password of the user). I'm not sure though, it needs confirmation.

            – Nathan.Eilisha Shiraini
            Jul 5 '16 at 13:15






          • 1





            Doesn't work anymore, Windows 10 version 1703 and FF 57.0. It just brings up the "Choose default app" UI.

            – janv8000
            Oct 5 '17 at 6:06
















          0














          EDIT Not-so-recent Windows updates now prevent a program to set itself as default for anything, so the snippet below won't work anymore. Thanks to janv8000 for pointing it out.





          The command you mention has to be run by the user who needs Firefox as default browser. You can create a batch file and put it in the startup folder of the user's Start menu, making sure it's a self-deleting file. It should look like:



          @echo off
          firefox.exe -silent -nosplash -setDefaultBrowser
          erase %0


          (obviously you can add more commands as needed)



          Otherwise, the Start-process powershell cmdlet has a -Credentials parameter, but from what I see it will prompt you for a password (not suited for a script).






          share|improve this answer


























          • Thanks for your answer. However, it doesn't seem to be an favourable way since I'm creating the user within the script and thus, they won't have a folder.

            – Shadowjerk
            Jul 5 '16 at 13:07













          • Wait to see if it work before thanking me ^^

            – Nathan.Eilisha Shiraini
            Jul 5 '16 at 13:07











          • I forgot to shift enter. This solution won't work for me. It must be within a powershell script.

            – Shadowjerk
            Jul 5 '16 at 13:09











          • Then you can try Start-process with the crendentials argument, I think I saw a convoluted way to use it without a prompt (creating variables with the name & password of the user). I'm not sure though, it needs confirmation.

            – Nathan.Eilisha Shiraini
            Jul 5 '16 at 13:15






          • 1





            Doesn't work anymore, Windows 10 version 1703 and FF 57.0. It just brings up the "Choose default app" UI.

            – janv8000
            Oct 5 '17 at 6:06














          0












          0








          0







          EDIT Not-so-recent Windows updates now prevent a program to set itself as default for anything, so the snippet below won't work anymore. Thanks to janv8000 for pointing it out.





          The command you mention has to be run by the user who needs Firefox as default browser. You can create a batch file and put it in the startup folder of the user's Start menu, making sure it's a self-deleting file. It should look like:



          @echo off
          firefox.exe -silent -nosplash -setDefaultBrowser
          erase %0


          (obviously you can add more commands as needed)



          Otherwise, the Start-process powershell cmdlet has a -Credentials parameter, but from what I see it will prompt you for a password (not suited for a script).






          share|improve this answer















          EDIT Not-so-recent Windows updates now prevent a program to set itself as default for anything, so the snippet below won't work anymore. Thanks to janv8000 for pointing it out.





          The command you mention has to be run by the user who needs Firefox as default browser. You can create a batch file and put it in the startup folder of the user's Start menu, making sure it's a self-deleting file. It should look like:



          @echo off
          firefox.exe -silent -nosplash -setDefaultBrowser
          erase %0


          (obviously you can add more commands as needed)



          Otherwise, the Start-process powershell cmdlet has a -Credentials parameter, but from what I see it will prompt you for a password (not suited for a script).







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Jul 11 '18 at 14:48

























          answered Jul 5 '16 at 13:04









          Nathan.Eilisha ShirainiNathan.Eilisha Shiraini

          2,4331923




          2,4331923













          • Thanks for your answer. However, it doesn't seem to be an favourable way since I'm creating the user within the script and thus, they won't have a folder.

            – Shadowjerk
            Jul 5 '16 at 13:07













          • Wait to see if it work before thanking me ^^

            – Nathan.Eilisha Shiraini
            Jul 5 '16 at 13:07











          • I forgot to shift enter. This solution won't work for me. It must be within a powershell script.

            – Shadowjerk
            Jul 5 '16 at 13:09











          • Then you can try Start-process with the crendentials argument, I think I saw a convoluted way to use it without a prompt (creating variables with the name & password of the user). I'm not sure though, it needs confirmation.

            – Nathan.Eilisha Shiraini
            Jul 5 '16 at 13:15






          • 1





            Doesn't work anymore, Windows 10 version 1703 and FF 57.0. It just brings up the "Choose default app" UI.

            – janv8000
            Oct 5 '17 at 6:06



















          • Thanks for your answer. However, it doesn't seem to be an favourable way since I'm creating the user within the script and thus, they won't have a folder.

            – Shadowjerk
            Jul 5 '16 at 13:07













          • Wait to see if it work before thanking me ^^

            – Nathan.Eilisha Shiraini
            Jul 5 '16 at 13:07











          • I forgot to shift enter. This solution won't work for me. It must be within a powershell script.

            – Shadowjerk
            Jul 5 '16 at 13:09











          • Then you can try Start-process with the crendentials argument, I think I saw a convoluted way to use it without a prompt (creating variables with the name & password of the user). I'm not sure though, it needs confirmation.

            – Nathan.Eilisha Shiraini
            Jul 5 '16 at 13:15






          • 1





            Doesn't work anymore, Windows 10 version 1703 and FF 57.0. It just brings up the "Choose default app" UI.

            – janv8000
            Oct 5 '17 at 6:06

















          Thanks for your answer. However, it doesn't seem to be an favourable way since I'm creating the user within the script and thus, they won't have a folder.

          – Shadowjerk
          Jul 5 '16 at 13:07







          Thanks for your answer. However, it doesn't seem to be an favourable way since I'm creating the user within the script and thus, they won't have a folder.

          – Shadowjerk
          Jul 5 '16 at 13:07















          Wait to see if it work before thanking me ^^

          – Nathan.Eilisha Shiraini
          Jul 5 '16 at 13:07





          Wait to see if it work before thanking me ^^

          – Nathan.Eilisha Shiraini
          Jul 5 '16 at 13:07













          I forgot to shift enter. This solution won't work for me. It must be within a powershell script.

          – Shadowjerk
          Jul 5 '16 at 13:09





          I forgot to shift enter. This solution won't work for me. It must be within a powershell script.

          – Shadowjerk
          Jul 5 '16 at 13:09













          Then you can try Start-process with the crendentials argument, I think I saw a convoluted way to use it without a prompt (creating variables with the name & password of the user). I'm not sure though, it needs confirmation.

          – Nathan.Eilisha Shiraini
          Jul 5 '16 at 13:15





          Then you can try Start-process with the crendentials argument, I think I saw a convoluted way to use it without a prompt (creating variables with the name & password of the user). I'm not sure though, it needs confirmation.

          – Nathan.Eilisha Shiraini
          Jul 5 '16 at 13:15




          1




          1





          Doesn't work anymore, Windows 10 version 1703 and FF 57.0. It just brings up the "Choose default app" UI.

          – janv8000
          Oct 5 '17 at 6:06





          Doesn't work anymore, Windows 10 version 1703 and FF 57.0. It just brings up the "Choose default app" UI.

          – janv8000
          Oct 5 '17 at 6:06


















          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.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1097115%2fset-firefox-as-standard-browser-via-powershell%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

          How to make a Squid Proxy server?

          Is this a new Fibonacci Identity?

          19世紀