In my application (it supports only Windows 7 and higher), I want to run a script, which will run some installation program. Before doing it, I need to check if running this script from my app will provide it with enough rights that it could run installation. Otherwise, Windows refuses to do it and shows a message with explanation that Admin rights are required for the user who launches my app.
According to this question, the easy way of solving my problem does not always work properly, but I also don't like the other suggestions (using Win API).
Can anybody explain me how to solve my problem using simple and well documented .NET code, but not Win API?