locked
"Run as Administrator" questions RRS feed

  • Question

  • Hello.

    I have two problems:

    1) I have some (self-written) programs that must be run as Administrator (because they read data from a Unix hard-disk partition).
    I want the program to be started in Administrator mode without the Vista-typical question "are you really sure?".
    I only want to disable this question for certain applications, not in general.
    Is there such a possibility in Vista?

    2) Some programs - mainly "regedit" - ask for Administrator mode in Vista. In XP I could use them without administrative rights. (I'ts enough e.g. for accessing HKEY_CURRENT_USER).
    Is there a possibility to run "regedit" (and other programs) explicitly without administrator rights?

    Thanks.

    Martin

    Saturday, February 2, 2008 8:21 PM

All replies

  • Give the links below a try - decide for yourself if you're willing to try it.

     

    Windows Secrets Newsletter Article about UAC or http://windowssecrets.com/comp/070308/

     

    Basically you're disabling (by auto-advancing) UAC for Administrators without disabling it for other accounts.

     

    Not sure if it will help with Q2 but I think it will.

     

    Be sure you use anti-virus, anti-spyware & anti-malware software to protect yourself since you won't be getting those dialog boxes from UAC.

     

    Overall, there just isn't a way to do what you want on a program by program basis - it's either all or none.

    Tuesday, February 5, 2008 5:48 PM
  • You might look into writing a driver or a service, or looking into a way to modifying the ACL preventing a standard user from reading the partition. (Not sure if or how it's possible to do the latter).

    Wednesday, February 6, 2008 1:30 AM
  • Hi!


    1) I have some (self-written) programs that must be run as Administrator (because they read data from a Unix hard-disk partition).
    I want the program to be started in Administrator mode without the Vista-typical question "are you really sure?".
    I only want to disable this question for certain applications, not in general.
    Is there such a possibility in Vista?

    1): You can not disable UAC for a cenrtain application, I am sorry. 
         The programmer's at Microsoft did not build "black-and-white" lists for UAC.
         However, for one application to execute in elevated mode, you'll need to
         modify the app.manifest file, like this: 

    Normal: To run the app as standard user.
    <requestedExecutionLevel level="asInvoker" uiAccess="false" />

    Changed to allow your app to elevate: To run the app as SYSTEM or NTAUTHORITY user.
    <requestedExecutionLevel level="requireAdministrator" uiAccess="false" />

    <?xml version="1.0" encoding="utf-8"?>

    <asmv1:assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1" xmlns:asmv1="urn:schemas-microsoft-com:asm.v1" xmlns:asmv2="urn:schemas-microsoft-com:asm.v2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

      <assemblyIdentity version="1.0.0.0" name="MyApplication.app" />

      <trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">

        <security>

          <requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">

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

          </requestedPrivileges>

          <applicationRequestMinimum>

            <PermissionSet class="System.Security.PermissionSet" version="1" Unrestricted="true" ID="Custom" SameSite="site" />

            <defaultAssemblyRequest permissionSetReference="Custom" />

          </applicationRequestMinimum>

        </security>

      </trustInfo>

    </asmv1:assembly>  



    2) Some programs - mainly "regedit" - ask for Administrator mode in Vista. In XP I could use them without administrative rights. (I'ts enough e.g. for accessing HKEY_CURRENT_USER).
    Is there a possibility to run "regedit" (and other programs) explicitly without administrator rights?

    2): Yes, regedit.exe asks for administrator permission and requests to run under administrator elevation mode. 
         Yes, it's possible to run them, however, they still might ask for administrator previledges. 

    I hope this helps...

    Have a nice day...

    Best regards,
    Fisnik  
    Coder24.com
    • Proposed as answer by Fisnik Hasani Saturday, October 10, 2009 8:02 AM
    Sunday, October 4, 2009 2:59 PM
  • Hello Martin:

    Is this issue solved? How is the situation on your side?
    Please provide some information, thanks!

    Have a nice day...

    Best regards,
    Fisnik
    Coder24.com
    Friday, October 9, 2009 7:41 PM
  • Hello Martin:

    Is this issue solved? How is the situation on your side?
    Please provide some information, thanks!

    Have a nice day...

    Best regards,
    Fisnik
    Coder24.com
    Friday, November 13, 2009 8:34 PM
  • Hello Martin:

    Is this issue solved? How is the situation on your side?
    Please provide some information, thanks!

    Have a nice day...

    Best regards,
    Fisnik
    Coder24.com
    Thursday, November 26, 2009 10:18 AM
  • Hi again:

    How is the situation on your side?
    Is this thread solved?

    Please tell me!

    Have a nice day...

    Best regards,
    Fisnik
    Coder24.com
    Sunday, December 27, 2009 9:46 AM
  • Hi again:

    How is the situation on your side?
    Is this thread solved?

    Please tell me!

    Have a nice day...

    Best regards,
    Fisnik

    Coder24.com
    Saturday, January 2, 2010 2:55 PM