I'm trying to figure out how to solve the privilege acquisition.
The application requires a desktop access, so it cannot be executed as a Windows service: it have to create a window for receiving message sent by other processes using SendMessage (it must be used for waiting message acknowledge).
The application shall be started when an user login, and it will manage the user session (manage applications, windows...). Only one user can be managed at time.
What I'm asking is which is the best solution for requesting privilege acquisition, since the application requires it (execute a process which calls SetWindowsHook).
- How it possible to run any process at user login with (higher) privileges, possibly without prompting UAC messages? The setup operations could be peformed during the installation phase...
- How could be possible to run an utility service starting a process when user logon? In this way the (installed) service could run the effective process with any priviledges...
- Any other solution? *
What are the definive action to be taken for having a full compatible UAC application? (I mean in the build and deploy phases?
For example, I am including the following manifest file using mt.exe (using VS2005):
<?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">
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
security>
<applicationRequestMinimum>
<defaultAssemblyRequest permissionSetReference="Custom" />
<PermissionSet class="System.Security.PermissionSet" version="1" Unrestricted="true" ID="Custom" SameSite="site" />
</applicationRequestMinimum>
<requestedPrivileges>
<requestedExecutionLevel level="requireAdministrator" uiAccess="false"/>
</requestedPrivileges>
</security>
</trustInfo>
</asmv1:assembly>
It seems correct to you? No, because it doesn't work to me...
*
It actually make sense to create an additional user account (but this shall work also on windows domains) with administrator privileges to execute a controlled environment. It could be also acceptable to create a working session (a new desktop station) without logging any user, but actually I don't know if it is possible.