This works jut fine but needs admin rights to execute the .exe. Is there a way to open a URL without asking the user for elevated privileges? I would like to use C but if it's easier with C++ i would not mind to switch to C++.
You need admin rights just to run the .exe? That doesn't make sense to me, unless your environment as a whole is restricted.
What happens if you remove the call to ShellExecuteA? Does it still make you be an admin to run the exe?
I found the solution. I named the file update.exe. As soon as i rename it to something which does not contain the name update it does not require admin rights :-)
Sounds strange isn't it, but it seems to be kind of a security feature. You can try it out if you rename any .exe to update.exe. After you rename it it will have this shield symbol in the icon and it will ask for admin privileges. As soon as the file is renamed back it will run the file as normal user.