Run as Administrator greyed out on shortcut












18















I have a shortcut to a program that only works when run as administrator but in the shortcuts advanced options "always run as administrator" is greyed out. I've looked at the other similar questions but none apply to my issue. UAC is enabled, I am an administrator and i have no idea how to run it in cmd.










share|improve this question




















  • 1





    The program is in a network? Programs in a network won't run as administrator.

    – Franchesco
    Feb 20 '15 at 9:51











  • Of course you would prefer to set & forget "always run as administrator", but, until you get that working, you can right click the icon and select "run as administrator,", although you will have to do that every time that your want to run it.

    – Mawg
    Feb 20 '15 at 10:00











  • @Earendul The program isnt in a network.

    – man-qa
    Feb 20 '15 at 11:51











  • @Mawg I'm not sure why but right click the shortcut doesn't bring up the option to run as admin, even though i can click the original .exe and run that as admin

    – man-qa
    Feb 20 '15 at 11:52






  • 1





    @man-qa - Sounds like you are not actually an Administrator domain permissions overrule your local permissions.

    – Ramhound
    Feb 25 '15 at 15:42
















18















I have a shortcut to a program that only works when run as administrator but in the shortcuts advanced options "always run as administrator" is greyed out. I've looked at the other similar questions but none apply to my issue. UAC is enabled, I am an administrator and i have no idea how to run it in cmd.










share|improve this question




















  • 1





    The program is in a network? Programs in a network won't run as administrator.

    – Franchesco
    Feb 20 '15 at 9:51











  • Of course you would prefer to set & forget "always run as administrator", but, until you get that working, you can right click the icon and select "run as administrator,", although you will have to do that every time that your want to run it.

    – Mawg
    Feb 20 '15 at 10:00











  • @Earendul The program isnt in a network.

    – man-qa
    Feb 20 '15 at 11:51











  • @Mawg I'm not sure why but right click the shortcut doesn't bring up the option to run as admin, even though i can click the original .exe and run that as admin

    – man-qa
    Feb 20 '15 at 11:52






  • 1





    @man-qa - Sounds like you are not actually an Administrator domain permissions overrule your local permissions.

    – Ramhound
    Feb 25 '15 at 15:42














18












18








18


0






I have a shortcut to a program that only works when run as administrator but in the shortcuts advanced options "always run as administrator" is greyed out. I've looked at the other similar questions but none apply to my issue. UAC is enabled, I am an administrator and i have no idea how to run it in cmd.










share|improve this question
















I have a shortcut to a program that only works when run as administrator but in the shortcuts advanced options "always run as administrator" is greyed out. I've looked at the other similar questions but none apply to my issue. UAC is enabled, I am an administrator and i have no idea how to run it in cmd.







windows-7 shortcuts administrator






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jul 29 '15 at 11:34









Hennes

59k792141




59k792141










asked Feb 20 '15 at 9:46









man-qaman-qa

1071115




1071115








  • 1





    The program is in a network? Programs in a network won't run as administrator.

    – Franchesco
    Feb 20 '15 at 9:51











  • Of course you would prefer to set & forget "always run as administrator", but, until you get that working, you can right click the icon and select "run as administrator,", although you will have to do that every time that your want to run it.

    – Mawg
    Feb 20 '15 at 10:00











  • @Earendul The program isnt in a network.

    – man-qa
    Feb 20 '15 at 11:51











  • @Mawg I'm not sure why but right click the shortcut doesn't bring up the option to run as admin, even though i can click the original .exe and run that as admin

    – man-qa
    Feb 20 '15 at 11:52






  • 1





    @man-qa - Sounds like you are not actually an Administrator domain permissions overrule your local permissions.

    – Ramhound
    Feb 25 '15 at 15:42














  • 1





    The program is in a network? Programs in a network won't run as administrator.

    – Franchesco
    Feb 20 '15 at 9:51











  • Of course you would prefer to set & forget "always run as administrator", but, until you get that working, you can right click the icon and select "run as administrator,", although you will have to do that every time that your want to run it.

    – Mawg
    Feb 20 '15 at 10:00











  • @Earendul The program isnt in a network.

    – man-qa
    Feb 20 '15 at 11:51











  • @Mawg I'm not sure why but right click the shortcut doesn't bring up the option to run as admin, even though i can click the original .exe and run that as admin

    – man-qa
    Feb 20 '15 at 11:52






  • 1





    @man-qa - Sounds like you are not actually an Administrator domain permissions overrule your local permissions.

    – Ramhound
    Feb 25 '15 at 15:42








1




1





The program is in a network? Programs in a network won't run as administrator.

– Franchesco
Feb 20 '15 at 9:51





The program is in a network? Programs in a network won't run as administrator.

– Franchesco
Feb 20 '15 at 9:51













Of course you would prefer to set & forget "always run as administrator", but, until you get that working, you can right click the icon and select "run as administrator,", although you will have to do that every time that your want to run it.

– Mawg
Feb 20 '15 at 10:00





Of course you would prefer to set & forget "always run as administrator", but, until you get that working, you can right click the icon and select "run as administrator,", although you will have to do that every time that your want to run it.

– Mawg
Feb 20 '15 at 10:00













@Earendul The program isnt in a network.

– man-qa
Feb 20 '15 at 11:51





@Earendul The program isnt in a network.

– man-qa
Feb 20 '15 at 11:51













@Mawg I'm not sure why but right click the shortcut doesn't bring up the option to run as admin, even though i can click the original .exe and run that as admin

– man-qa
Feb 20 '15 at 11:52





@Mawg I'm not sure why but right click the shortcut doesn't bring up the option to run as admin, even though i can click the original .exe and run that as admin

– man-qa
Feb 20 '15 at 11:52




1




1





@man-qa - Sounds like you are not actually an Administrator domain permissions overrule your local permissions.

– Ramhound
Feb 25 '15 at 15:42





@man-qa - Sounds like you are not actually an Administrator domain permissions overrule your local permissions.

– Ramhound
Feb 25 '15 at 15:42










8 Answers
8






active

oldest

votes


















3














You may be able to use the run as administrator available on the compatibility tab.



One way third party way would be with nircmd.
http://www.nirsoft.net/utils/nircmd2.html#elevate






share|improve this answer
























  • The author indicated this option is grayed out.

    – Ramhound
    Feb 25 '15 at 15:27






  • 2





    No they did not. They stated the option was greyed out on the advanced options on the shortcut tab. I was referring to the spot on the compatibility tab.

    – birdman3131
    Feb 25 '15 at 18:58











  • @birdman3131 Wow i didn't expect this to work but it did. Thanks birdman :)

    – man-qa
    Feb 26 '15 at 11:53



















2














This seems to happen when a shortcut points to an object identifier rather than a directory path.



You can tell if this is the case because the target in the shortcut properties is something like {0AFACED1-E828-11D1-9187-B532F1E9575D} instead of a directory path.



If you want to create a shortcut to something in C:WindowsSystem32, create the shortcut directly off an item in that folder, rather than trying to create it from an existing shortcut on the start menu.






share|improve this answer


























  • That's not the only way this can happen; I think it can also happen when you need admin in order to modify the shortcut file. At any rate, I'm seeing this with a path-based shortcut that was put on my start menu by an installer. Oh, it could also be because the target is an .ini file, not an executable...

    – SamB
    Dec 14 '15 at 18:50













  • When I try creating a shortcut to hosts, it says cannot create shortcut here, would you like it on the desktop instead; but why am I suffering through this even when I am admin on this box ??

    – killjoy
    May 2 '17 at 11:21











  • I have this problem on a python script shortcut

    – JinSnow
    Oct 15 '18 at 14:37



















1














It seems as though the "run as administrator" context menu option and/or shortcut checkbox are unavailable for batch files/scripts.
This was answered for PowerShell here:
How to run script as administrator?



I don't have an answer yet for running a common batch file.






share|improve this answer

































    1














    The fix is to create a shortcut to the executable that needs to be run as admin (if you want to workaround the ugly code for invoking the UAC prompt). After creating the new shortcut, right-click on it and select Properties, then click the Shortcut tab, then the Advanced... button and finally check the Run as Administrator checkbox.






    share|improve this answer


























    • This is a nice little workaround. I was able to make a shortcut to my "hosts" file using this technique with Visual Studio Code. Example shortcut: "C:UsersquantasticalAppDataLocalProgramsMicrosoft VS CodeCode.exe" "C:Windowssystem32driversetchosts"

      – Quantastical
      Jan 3 at 2:38



















    1















    It works if you add the executable to the shortcut target.
    For example:



    Right-click on the shortcut and change the target from:



    C:Scriptshelloworld.js



    to



    wscript.exe C:Scriptshelloworld.js



    (or)



    cscript.exe C:Scriptshelloworld.js



    Then the Run as Administrator checkbox is activated in properties.




    I had the problem with a python script:
    I needed to add in the target:
    "C:Users......Python36python.exe" "C:Users......test.py"



    All the glory to Ramesh Srinivasan






    share|improve this answer































      0














      BrianD gave the best answer and Ross in How to run script as administrator? explained it:




      Instead of using the compatibility tab (where the option is greyed out
      ) use the Advanced button on the Shortcut Tab




      This is valid for Windows7 at least.






      share|improve this answer































        -1














        I had this issues on a Windows Server 2008 R2 SP1 system when running shortcuts to run batch files/VBScripts to sync and eject USB disks, or to shutdown Hyper-V systems in preparation for staff to reboot the server cleanly.



        Found when I right-clicked the icon, selected properties, then selected the Advanced button next to Change Icon. Select the Run As Administrator option then Save. If UAC is enabled, it will still ask for permission to run, but it will now run properly.






        share|improve this answer

































          -1














          My icon was copied to the quick launch bar. The option to run as administrator was greyed out. So I started again and I deleted the shortcut i had previously tried to set.



          This is how i solved the issue.



          Opened my start menu, found the icon I wanted, properties, open file location.
          (This opened the file location of the shortcut from my start menu - perfect).



          Now I selected the shortcut icon and copied it.



          I then right click on my quick launch bar, "Open Folder" and pasted a copy of my shortcut there.



          Now I have access to set it to run as administrator.






          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',
            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%2f880290%2frun-as-administrator-greyed-out-on-shortcut%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            8 Answers
            8






            active

            oldest

            votes








            8 Answers
            8






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            3














            You may be able to use the run as administrator available on the compatibility tab.



            One way third party way would be with nircmd.
            http://www.nirsoft.net/utils/nircmd2.html#elevate






            share|improve this answer
























            • The author indicated this option is grayed out.

              – Ramhound
              Feb 25 '15 at 15:27






            • 2





              No they did not. They stated the option was greyed out on the advanced options on the shortcut tab. I was referring to the spot on the compatibility tab.

              – birdman3131
              Feb 25 '15 at 18:58











            • @birdman3131 Wow i didn't expect this to work but it did. Thanks birdman :)

              – man-qa
              Feb 26 '15 at 11:53
















            3














            You may be able to use the run as administrator available on the compatibility tab.



            One way third party way would be with nircmd.
            http://www.nirsoft.net/utils/nircmd2.html#elevate






            share|improve this answer
























            • The author indicated this option is grayed out.

              – Ramhound
              Feb 25 '15 at 15:27






            • 2





              No they did not. They stated the option was greyed out on the advanced options on the shortcut tab. I was referring to the spot on the compatibility tab.

              – birdman3131
              Feb 25 '15 at 18:58











            • @birdman3131 Wow i didn't expect this to work but it did. Thanks birdman :)

              – man-qa
              Feb 26 '15 at 11:53














            3












            3








            3







            You may be able to use the run as administrator available on the compatibility tab.



            One way third party way would be with nircmd.
            http://www.nirsoft.net/utils/nircmd2.html#elevate






            share|improve this answer













            You may be able to use the run as administrator available on the compatibility tab.



            One way third party way would be with nircmd.
            http://www.nirsoft.net/utils/nircmd2.html#elevate







            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Feb 25 '15 at 14:00









            birdman3131birdman3131

            537314




            537314













            • The author indicated this option is grayed out.

              – Ramhound
              Feb 25 '15 at 15:27






            • 2





              No they did not. They stated the option was greyed out on the advanced options on the shortcut tab. I was referring to the spot on the compatibility tab.

              – birdman3131
              Feb 25 '15 at 18:58











            • @birdman3131 Wow i didn't expect this to work but it did. Thanks birdman :)

              – man-qa
              Feb 26 '15 at 11:53



















            • The author indicated this option is grayed out.

              – Ramhound
              Feb 25 '15 at 15:27






            • 2





              No they did not. They stated the option was greyed out on the advanced options on the shortcut tab. I was referring to the spot on the compatibility tab.

              – birdman3131
              Feb 25 '15 at 18:58











            • @birdman3131 Wow i didn't expect this to work but it did. Thanks birdman :)

              – man-qa
              Feb 26 '15 at 11:53

















            The author indicated this option is grayed out.

            – Ramhound
            Feb 25 '15 at 15:27





            The author indicated this option is grayed out.

            – Ramhound
            Feb 25 '15 at 15:27




            2




            2





            No they did not. They stated the option was greyed out on the advanced options on the shortcut tab. I was referring to the spot on the compatibility tab.

            – birdman3131
            Feb 25 '15 at 18:58





            No they did not. They stated the option was greyed out on the advanced options on the shortcut tab. I was referring to the spot on the compatibility tab.

            – birdman3131
            Feb 25 '15 at 18:58













            @birdman3131 Wow i didn't expect this to work but it did. Thanks birdman :)

            – man-qa
            Feb 26 '15 at 11:53





            @birdman3131 Wow i didn't expect this to work but it did. Thanks birdman :)

            – man-qa
            Feb 26 '15 at 11:53













            2














            This seems to happen when a shortcut points to an object identifier rather than a directory path.



            You can tell if this is the case because the target in the shortcut properties is something like {0AFACED1-E828-11D1-9187-B532F1E9575D} instead of a directory path.



            If you want to create a shortcut to something in C:WindowsSystem32, create the shortcut directly off an item in that folder, rather than trying to create it from an existing shortcut on the start menu.






            share|improve this answer


























            • That's not the only way this can happen; I think it can also happen when you need admin in order to modify the shortcut file. At any rate, I'm seeing this with a path-based shortcut that was put on my start menu by an installer. Oh, it could also be because the target is an .ini file, not an executable...

              – SamB
              Dec 14 '15 at 18:50













            • When I try creating a shortcut to hosts, it says cannot create shortcut here, would you like it on the desktop instead; but why am I suffering through this even when I am admin on this box ??

              – killjoy
              May 2 '17 at 11:21











            • I have this problem on a python script shortcut

              – JinSnow
              Oct 15 '18 at 14:37
















            2














            This seems to happen when a shortcut points to an object identifier rather than a directory path.



            You can tell if this is the case because the target in the shortcut properties is something like {0AFACED1-E828-11D1-9187-B532F1E9575D} instead of a directory path.



            If you want to create a shortcut to something in C:WindowsSystem32, create the shortcut directly off an item in that folder, rather than trying to create it from an existing shortcut on the start menu.






            share|improve this answer


























            • That's not the only way this can happen; I think it can also happen when you need admin in order to modify the shortcut file. At any rate, I'm seeing this with a path-based shortcut that was put on my start menu by an installer. Oh, it could also be because the target is an .ini file, not an executable...

              – SamB
              Dec 14 '15 at 18:50













            • When I try creating a shortcut to hosts, it says cannot create shortcut here, would you like it on the desktop instead; but why am I suffering through this even when I am admin on this box ??

              – killjoy
              May 2 '17 at 11:21











            • I have this problem on a python script shortcut

              – JinSnow
              Oct 15 '18 at 14:37














            2












            2








            2







            This seems to happen when a shortcut points to an object identifier rather than a directory path.



            You can tell if this is the case because the target in the shortcut properties is something like {0AFACED1-E828-11D1-9187-B532F1E9575D} instead of a directory path.



            If you want to create a shortcut to something in C:WindowsSystem32, create the shortcut directly off an item in that folder, rather than trying to create it from an existing shortcut on the start menu.






            share|improve this answer















            This seems to happen when a shortcut points to an object identifier rather than a directory path.



            You can tell if this is the case because the target in the shortcut properties is something like {0AFACED1-E828-11D1-9187-B532F1E9575D} instead of a directory path.



            If you want to create a shortcut to something in C:WindowsSystem32, create the shortcut directly off an item in that folder, rather than trying to create it from an existing shortcut on the start menu.







            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited Sep 6 '15 at 17:26









            JakeGould

            31.2k1095138




            31.2k1095138










            answered Sep 6 '15 at 17:01









            MagellanMagellan

            211




            211













            • That's not the only way this can happen; I think it can also happen when you need admin in order to modify the shortcut file. At any rate, I'm seeing this with a path-based shortcut that was put on my start menu by an installer. Oh, it could also be because the target is an .ini file, not an executable...

              – SamB
              Dec 14 '15 at 18:50













            • When I try creating a shortcut to hosts, it says cannot create shortcut here, would you like it on the desktop instead; but why am I suffering through this even when I am admin on this box ??

              – killjoy
              May 2 '17 at 11:21











            • I have this problem on a python script shortcut

              – JinSnow
              Oct 15 '18 at 14:37



















            • That's not the only way this can happen; I think it can also happen when you need admin in order to modify the shortcut file. At any rate, I'm seeing this with a path-based shortcut that was put on my start menu by an installer. Oh, it could also be because the target is an .ini file, not an executable...

              – SamB
              Dec 14 '15 at 18:50













            • When I try creating a shortcut to hosts, it says cannot create shortcut here, would you like it on the desktop instead; but why am I suffering through this even when I am admin on this box ??

              – killjoy
              May 2 '17 at 11:21











            • I have this problem on a python script shortcut

              – JinSnow
              Oct 15 '18 at 14:37

















            That's not the only way this can happen; I think it can also happen when you need admin in order to modify the shortcut file. At any rate, I'm seeing this with a path-based shortcut that was put on my start menu by an installer. Oh, it could also be because the target is an .ini file, not an executable...

            – SamB
            Dec 14 '15 at 18:50







            That's not the only way this can happen; I think it can also happen when you need admin in order to modify the shortcut file. At any rate, I'm seeing this with a path-based shortcut that was put on my start menu by an installer. Oh, it could also be because the target is an .ini file, not an executable...

            – SamB
            Dec 14 '15 at 18:50















            When I try creating a shortcut to hosts, it says cannot create shortcut here, would you like it on the desktop instead; but why am I suffering through this even when I am admin on this box ??

            – killjoy
            May 2 '17 at 11:21





            When I try creating a shortcut to hosts, it says cannot create shortcut here, would you like it on the desktop instead; but why am I suffering through this even when I am admin on this box ??

            – killjoy
            May 2 '17 at 11:21













            I have this problem on a python script shortcut

            – JinSnow
            Oct 15 '18 at 14:37





            I have this problem on a python script shortcut

            – JinSnow
            Oct 15 '18 at 14:37











            1














            It seems as though the "run as administrator" context menu option and/or shortcut checkbox are unavailable for batch files/scripts.
            This was answered for PowerShell here:
            How to run script as administrator?



            I don't have an answer yet for running a common batch file.






            share|improve this answer






























              1














              It seems as though the "run as administrator" context menu option and/or shortcut checkbox are unavailable for batch files/scripts.
              This was answered for PowerShell here:
              How to run script as administrator?



              I don't have an answer yet for running a common batch file.






              share|improve this answer




























                1












                1








                1







                It seems as though the "run as administrator" context menu option and/or shortcut checkbox are unavailable for batch files/scripts.
                This was answered for PowerShell here:
                How to run script as administrator?



                I don't have an answer yet for running a common batch file.






                share|improve this answer















                It seems as though the "run as administrator" context menu option and/or shortcut checkbox are unavailable for batch files/scripts.
                This was answered for PowerShell here:
                How to run script as administrator?



                I don't have an answer yet for running a common batch file.







                share|improve this answer














                share|improve this answer



                share|improve this answer








                edited Mar 20 '17 at 10:17









                Community

                1




                1










                answered Aug 25 '15 at 23:06









                user488386user488386

                111




                111























                    1














                    The fix is to create a shortcut to the executable that needs to be run as admin (if you want to workaround the ugly code for invoking the UAC prompt). After creating the new shortcut, right-click on it and select Properties, then click the Shortcut tab, then the Advanced... button and finally check the Run as Administrator checkbox.






                    share|improve this answer


























                    • This is a nice little workaround. I was able to make a shortcut to my "hosts" file using this technique with Visual Studio Code. Example shortcut: "C:UsersquantasticalAppDataLocalProgramsMicrosoft VS CodeCode.exe" "C:Windowssystem32driversetchosts"

                      – Quantastical
                      Jan 3 at 2:38
















                    1














                    The fix is to create a shortcut to the executable that needs to be run as admin (if you want to workaround the ugly code for invoking the UAC prompt). After creating the new shortcut, right-click on it and select Properties, then click the Shortcut tab, then the Advanced... button and finally check the Run as Administrator checkbox.






                    share|improve this answer


























                    • This is a nice little workaround. I was able to make a shortcut to my "hosts" file using this technique with Visual Studio Code. Example shortcut: "C:UsersquantasticalAppDataLocalProgramsMicrosoft VS CodeCode.exe" "C:Windowssystem32driversetchosts"

                      – Quantastical
                      Jan 3 at 2:38














                    1












                    1








                    1







                    The fix is to create a shortcut to the executable that needs to be run as admin (if you want to workaround the ugly code for invoking the UAC prompt). After creating the new shortcut, right-click on it and select Properties, then click the Shortcut tab, then the Advanced... button and finally check the Run as Administrator checkbox.






                    share|improve this answer















                    The fix is to create a shortcut to the executable that needs to be run as admin (if you want to workaround the ugly code for invoking the UAC prompt). After creating the new shortcut, right-click on it and select Properties, then click the Shortcut tab, then the Advanced... button and finally check the Run as Administrator checkbox.







                    share|improve this answer














                    share|improve this answer



                    share|improve this answer








                    edited Feb 17 '18 at 16:51









                    drws

                    32




                    32










                    answered Mar 15 '16 at 14:14









                    BrianDBrianD

                    211




                    211













                    • This is a nice little workaround. I was able to make a shortcut to my "hosts" file using this technique with Visual Studio Code. Example shortcut: "C:UsersquantasticalAppDataLocalProgramsMicrosoft VS CodeCode.exe" "C:Windowssystem32driversetchosts"

                      – Quantastical
                      Jan 3 at 2:38



















                    • This is a nice little workaround. I was able to make a shortcut to my "hosts" file using this technique with Visual Studio Code. Example shortcut: "C:UsersquantasticalAppDataLocalProgramsMicrosoft VS CodeCode.exe" "C:Windowssystem32driversetchosts"

                      – Quantastical
                      Jan 3 at 2:38

















                    This is a nice little workaround. I was able to make a shortcut to my "hosts" file using this technique with Visual Studio Code. Example shortcut: "C:UsersquantasticalAppDataLocalProgramsMicrosoft VS CodeCode.exe" "C:Windowssystem32driversetchosts"

                    – Quantastical
                    Jan 3 at 2:38





                    This is a nice little workaround. I was able to make a shortcut to my "hosts" file using this technique with Visual Studio Code. Example shortcut: "C:UsersquantasticalAppDataLocalProgramsMicrosoft VS CodeCode.exe" "C:Windowssystem32driversetchosts"

                    – Quantastical
                    Jan 3 at 2:38











                    1















                    It works if you add the executable to the shortcut target.
                    For example:



                    Right-click on the shortcut and change the target from:



                    C:Scriptshelloworld.js



                    to



                    wscript.exe C:Scriptshelloworld.js



                    (or)



                    cscript.exe C:Scriptshelloworld.js



                    Then the Run as Administrator checkbox is activated in properties.




                    I had the problem with a python script:
                    I needed to add in the target:
                    "C:Users......Python36python.exe" "C:Users......test.py"



                    All the glory to Ramesh Srinivasan






                    share|improve this answer




























                      1















                      It works if you add the executable to the shortcut target.
                      For example:



                      Right-click on the shortcut and change the target from:



                      C:Scriptshelloworld.js



                      to



                      wscript.exe C:Scriptshelloworld.js



                      (or)



                      cscript.exe C:Scriptshelloworld.js



                      Then the Run as Administrator checkbox is activated in properties.




                      I had the problem with a python script:
                      I needed to add in the target:
                      "C:Users......Python36python.exe" "C:Users......test.py"



                      All the glory to Ramesh Srinivasan






                      share|improve this answer


























                        1












                        1








                        1








                        It works if you add the executable to the shortcut target.
                        For example:



                        Right-click on the shortcut and change the target from:



                        C:Scriptshelloworld.js



                        to



                        wscript.exe C:Scriptshelloworld.js



                        (or)



                        cscript.exe C:Scriptshelloworld.js



                        Then the Run as Administrator checkbox is activated in properties.




                        I had the problem with a python script:
                        I needed to add in the target:
                        "C:Users......Python36python.exe" "C:Users......test.py"



                        All the glory to Ramesh Srinivasan






                        share|improve this answer














                        It works if you add the executable to the shortcut target.
                        For example:



                        Right-click on the shortcut and change the target from:



                        C:Scriptshelloworld.js



                        to



                        wscript.exe C:Scriptshelloworld.js



                        (or)



                        cscript.exe C:Scriptshelloworld.js



                        Then the Run as Administrator checkbox is activated in properties.




                        I had the problem with a python script:
                        I needed to add in the target:
                        "C:Users......Python36python.exe" "C:Users......test.py"



                        All the glory to Ramesh Srinivasan







                        share|improve this answer












                        share|improve this answer



                        share|improve this answer










                        answered Oct 15 '18 at 14:46









                        JinSnowJinSnow

                        256316




                        256316























                            0














                            BrianD gave the best answer and Ross in How to run script as administrator? explained it:




                            Instead of using the compatibility tab (where the option is greyed out
                            ) use the Advanced button on the Shortcut Tab




                            This is valid for Windows7 at least.






                            share|improve this answer




























                              0














                              BrianD gave the best answer and Ross in How to run script as administrator? explained it:




                              Instead of using the compatibility tab (where the option is greyed out
                              ) use the Advanced button on the Shortcut Tab




                              This is valid for Windows7 at least.






                              share|improve this answer


























                                0












                                0








                                0







                                BrianD gave the best answer and Ross in How to run script as administrator? explained it:




                                Instead of using the compatibility tab (where the option is greyed out
                                ) use the Advanced button on the Shortcut Tab




                                This is valid for Windows7 at least.






                                share|improve this answer













                                BrianD gave the best answer and Ross in How to run script as administrator? explained it:




                                Instead of using the compatibility tab (where the option is greyed out
                                ) use the Advanced button on the Shortcut Tab




                                This is valid for Windows7 at least.







                                share|improve this answer












                                share|improve this answer



                                share|improve this answer










                                answered May 7 '18 at 13:39









                                user3603546user3603546

                                1455




                                1455























                                    -1














                                    I had this issues on a Windows Server 2008 R2 SP1 system when running shortcuts to run batch files/VBScripts to sync and eject USB disks, or to shutdown Hyper-V systems in preparation for staff to reboot the server cleanly.



                                    Found when I right-clicked the icon, selected properties, then selected the Advanced button next to Change Icon. Select the Run As Administrator option then Save. If UAC is enabled, it will still ask for permission to run, but it will now run properly.






                                    share|improve this answer






























                                      -1














                                      I had this issues on a Windows Server 2008 R2 SP1 system when running shortcuts to run batch files/VBScripts to sync and eject USB disks, or to shutdown Hyper-V systems in preparation for staff to reboot the server cleanly.



                                      Found when I right-clicked the icon, selected properties, then selected the Advanced button next to Change Icon. Select the Run As Administrator option then Save. If UAC is enabled, it will still ask for permission to run, but it will now run properly.






                                      share|improve this answer




























                                        -1












                                        -1








                                        -1







                                        I had this issues on a Windows Server 2008 R2 SP1 system when running shortcuts to run batch files/VBScripts to sync and eject USB disks, or to shutdown Hyper-V systems in preparation for staff to reboot the server cleanly.



                                        Found when I right-clicked the icon, selected properties, then selected the Advanced button next to Change Icon. Select the Run As Administrator option then Save. If UAC is enabled, it will still ask for permission to run, but it will now run properly.






                                        share|improve this answer















                                        I had this issues on a Windows Server 2008 R2 SP1 system when running shortcuts to run batch files/VBScripts to sync and eject USB disks, or to shutdown Hyper-V systems in preparation for staff to reboot the server cleanly.



                                        Found when I right-clicked the icon, selected properties, then selected the Advanced button next to Change Icon. Select the Run As Administrator option then Save. If UAC is enabled, it will still ask for permission to run, but it will now run properly.







                                        share|improve this answer














                                        share|improve this answer



                                        share|improve this answer








                                        edited Nov 16 '15 at 7:20









                                        Larssend

                                        2,34121830




                                        2,34121830










                                        answered Nov 15 '15 at 12:11









                                        DenisDenis

                                        1




                                        1























                                            -1














                                            My icon was copied to the quick launch bar. The option to run as administrator was greyed out. So I started again and I deleted the shortcut i had previously tried to set.



                                            This is how i solved the issue.



                                            Opened my start menu, found the icon I wanted, properties, open file location.
                                            (This opened the file location of the shortcut from my start menu - perfect).



                                            Now I selected the shortcut icon and copied it.



                                            I then right click on my quick launch bar, "Open Folder" and pasted a copy of my shortcut there.



                                            Now I have access to set it to run as administrator.






                                            share|improve this answer




























                                              -1














                                              My icon was copied to the quick launch bar. The option to run as administrator was greyed out. So I started again and I deleted the shortcut i had previously tried to set.



                                              This is how i solved the issue.



                                              Opened my start menu, found the icon I wanted, properties, open file location.
                                              (This opened the file location of the shortcut from my start menu - perfect).



                                              Now I selected the shortcut icon and copied it.



                                              I then right click on my quick launch bar, "Open Folder" and pasted a copy of my shortcut there.



                                              Now I have access to set it to run as administrator.






                                              share|improve this answer


























                                                -1












                                                -1








                                                -1







                                                My icon was copied to the quick launch bar. The option to run as administrator was greyed out. So I started again and I deleted the shortcut i had previously tried to set.



                                                This is how i solved the issue.



                                                Opened my start menu, found the icon I wanted, properties, open file location.
                                                (This opened the file location of the shortcut from my start menu - perfect).



                                                Now I selected the shortcut icon and copied it.



                                                I then right click on my quick launch bar, "Open Folder" and pasted a copy of my shortcut there.



                                                Now I have access to set it to run as administrator.






                                                share|improve this answer













                                                My icon was copied to the quick launch bar. The option to run as administrator was greyed out. So I started again and I deleted the shortcut i had previously tried to set.



                                                This is how i solved the issue.



                                                Opened my start menu, found the icon I wanted, properties, open file location.
                                                (This opened the file location of the shortcut from my start menu - perfect).



                                                Now I selected the shortcut icon and copied it.



                                                I then right click on my quick launch bar, "Open Folder" and pasted a copy of my shortcut there.



                                                Now I have access to set it to run as administrator.







                                                share|improve this answer












                                                share|improve this answer



                                                share|improve this answer










                                                answered Jan 15 '16 at 3:28









                                                ValamasValamas

                                                69052141




                                                69052141






























                                                    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%2f880290%2frun-as-administrator-greyed-out-on-shortcut%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 do I know what Microsoft account the skydrive app is syncing to?

                                                    When does type information flow backwards in C++?

                                                    Grease: Live!