1

That is without spawning another process.

Request it, and have it pop up the "do you wish to allow this to alter this computer" requester.

This is for a large build script that has an "install" target.

Yes it works if I run the initial shell "as administrator". It would be nice not to require this to be done in advance.

This is only needed on windows 10 or above.

peterk
  • 5,136
  • 6
  • 33
  • 47
  • Would this do what you are looking for: https://stackoverflow.com/questions/8268154/run-ruby-script-in-elevated-mode – chemical Jun 28 '18 at 17:48
  • No this starts a new process and in this case would require a slow re-initialization of quite a bit of stuff - the deisre is to elevate the permissions of THE CURRENT PROCESS. Yes there are work arounds but am trying to make it quite seamless for a user like a regular installer that asks the user to OK elevated permissions. – peterk Jun 29 '18 at 03:07

0 Answers0