Bypassing elevation when launching a new process

Set the environment variable __compat_layer for your process to RunAsInvoker. If this environment variable is set, CreateProcess will succeed.

You can use the SetEnvironmentVariable function for this purpose.

Leave a Comment