none
Always need to run the apllication as Run as Admi in Winows 10 RRS feed

  • Question

  • Hi,

    I have my application installed on D drive. We have configuration file available at C:\programData. When I am trying to configure

    my application with just double click and save it gives me an error of access denied. But when I run my application with Run as Admin option and save then I gets saved.

    I don't want application to run with run as admin option.Can you please help me out to solve this problem...?

    Tuesday, February 14, 2017 6:43 AM

Answers

  • Hi Rohit;

    >>is this setting work if I have guest account.

    requireAdministrator means recommended for administrator only applications. Internal elevation points are not needed. The application is already running elevated. If your program requires admin rights to function then you need to use requireAdministrator. When a standard user starts such a process, the over-the-shoulder UAC dialog is shown. That gives the user an opportunity to ask an admin to supply their credentials. So per my understanding, this setting works if you have a guest account.

    Best regards,

    Kristin


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • Marked as answer by Rohit Kanugo Wednesday, February 15, 2017 9:30 AM
    Wednesday, February 15, 2017 3:53 AM

All replies

  • Hi Rohit,

    From program, we can run as administrator on computer. You can embed this manifest into your application.

     select "Application Manifest File". Change the <requestedExecutionLevel> element to:

     <requestedExecutionLevel level="requireAdministrator" uiAccess="false" />

    From Win10 OS, you can turn off and disable UAC in Windows 10

    1. Open the Control Panel (icons view) and select User Accounts.
    2. Click on the Change User Account Control settings link.
    3. If prompted by UAC, click on Yes to continue.
    4. In the User Account Control settings, move the slider to the bottom (Never Notify).

    Best regards,

    Kristin


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Tuesday, February 14, 2017 8:33 AM
  • I am using windows application. From where I can find "Application Manifest File".
    Tuesday, February 14, 2017 9:05 AM
  • I am using windows application. From where I can find "Application Manifest File".

    @Rohit

    You need to enable ClickOnce security settings in your project, then change the application manifest to require administrator privileges. To enable ClickOnce, go into your project's properties, select the Security tab on the left, then check the "Enable ClickOnce Security Settings" box. Then go into the project's "Properties" directory, and open up the app.manifest file. In that file, there's a line that sets the required privileges:

    <requestedExecutionLevel  level="requireAdministrator" uiAccess="false" />

    Here is my screen capture

    Best regards,

    Kristin


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Tuesday, February 14, 2017 9:13 AM
  • is this setting work if I have guest account.
    Tuesday, February 14, 2017 10:10 AM
  • Hi Rohit;

    >>is this setting work if I have guest account.

    requireAdministrator means recommended for administrator only applications. Internal elevation points are not needed. The application is already running elevated. If your program requires admin rights to function then you need to use requireAdministrator. When a standard user starts such a process, the over-the-shoulder UAC dialog is shown. That gives the user an opportunity to ask an admin to supply their credentials. So per my understanding, this setting works if you have a guest account.

    Best regards,

    Kristin


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • Marked as answer by Rohit Kanugo Wednesday, February 15, 2017 9:30 AM
    Wednesday, February 15, 2017 3:53 AM