DaanDeMeyer / reproc

A cross-platform (C99/C++11) process library
MIT License
552 stars 65 forks source link

Start process as Admin (Windows) #61

Open wolfv opened 3 years ago

wolfv commented 3 years ago

It seems that on Windows one can put an attribute to the StartInfo struct startInfo.Verb = "runas";

https://stackoverflow.com/questions/133379/elevating-process-privilege-programmatically

I am wondering if that could be added as a feature?

DaanDeMeyer commented 3 years ago

Unfortunately, I don't have access to a windows system anymore so I wouldn't be able to test the implementation. I'll happily review a PR though. You can add an option to reproc_options that allows to configure this behavior.

leha-bot commented 1 day ago

I may try to make it, as I have a Windows system and interested in it