#LINQPad admin from LPRun6
I have a script that I can run inside Linqpad. It uses the #LINQPad admin statement and asks for elevated rights. All good. But when I try to run this script from LPRun, it fails with this message:
InvalidOperationException: Native error 1314.
at UserQuery.Main() in C:\Users\XXXXXX\AppData\Local\Temp\LINQPad6_jgxbozqy\laxtnl\LINQPadQuery:line 134
at LINQPad.ExecutionModel.ClrQueryRunner.Run()
at LINQPad.ExecutionModel.Server.RunQuery(QueryRunner runner)
Is there any way to run a script with elevated rights using LPRun?
Comments
I don't think it's reasonable to type "LPRun" from a non-elevated command prompt and expect it to run elevated. LPRun is a command-line tool which reads from stdin and writes to stdout. If it were to offer an elevation prompt, it would have to run the query in a new process, which would mean a separate stdin/stdout.