Search code examples
windows-7uacarduino-ide

Windows application toolkit fails to remove UAC prompt on specific program


OS: Windows 7 Professional 64 bit

My Arduino IDE fails to open unless I "Run as administrator". If I don't,It will just show the loading screen:

image

but will not actually open up the IDE. I have been searching for ways that I could bypass this just for arduino.exe and have found that this could be done with Windows Application Compatibility toolkit as outlined here.

When I get to the test run part after checking runasinvoker as shown here:

image
(source: meridian.ws)

Arduino started with no issues. But after I follow the rest of the steps and install the fix, my Arduino IDE program still has the same problem. If I do not run it as administrator, it will just show the loading splash screen and not the IDE part.

Please help! Thanks!


Solution

  • If this program does not support running as a standard user, you will not be able to fix that. The developers of the application need to fix it so that it runs correctly as a standard user.

    People are confused by the UAC. Try running the same application on Windows XP.

    It's possible that File and Registry Redirection is causing an issue, but i doubt it. You can disable File and Registry Redirection by adding an assembly manifest that includes the runas invoker section:

    Arduino.exe.manifest:

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"> 
        <assemblyIdentity 
                version="1.0.0.0"
                processorArchitecture="X86"
                name="client"
                type="win32"
        /> 
    
        <description>Don't Arguino With Me</description> 
    
        <!-- Disable Windows Vista UAC compatability heuristics -->
        <trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
            <security>
                <requestedPrivileges>
                    <requestedExecutionLevel level="asInvoker"/>
                </requestedPrivileges>
            </security>
        </trustInfo> 
    
    </assembly>
    

    and place arduino.exe.manifest in the same folder as arduino.exe.

    Note: Windows will only read an external assembly manifest file if there isn't already an assembly manifest resource inside the application. I doubt there already is one.

    Best guess: this application must be run as an administrator, and that's the end of it (until they fix it)