My problem is that
If the current user is ordinary users or visitors
Then I program for UAC administrator permissions to start the process, it is not the current user start but administrator user can launch process in task manager to see to the process of the user name is admin
But I now I need to uninstall the app in the program to start powershell with ShellExecute powershell would bring the administrator privileges that is start powershell this process is initiated by the manager is not the current user
Question when I use in powershell to remove - appxpackage uninstall the app uninstall it is not currently logged in user's app but process belonging to a user's app
I studied the seemingly ShellExecute can have incoming user token parameters I tried to copy the current user token to simulate the current user is likely to start powershell process but permission is not enough, please start someone said that the need to use the service to have permission to start
Excuse me is there any good ways to in the process of the current user calls the API or use powershell to uninstall the current user's app