Limiting Elevated Scripts on Windows
tristanisham opened this issue · comments
#59 Is there any way to limit the powers of this file to only elevate a limited set of commands? Leaving a generic elevate.cmd
file siting on a user's system leaves a bad taste in my mouth, @nithinkjoy-tech.
@nithinkjoy-tech, could you look into how to replace your CMD and VBS scripts with Go code. I'd like for us to have a way to tell if we're running as administrator, and to rerun ourselves as administrators with the user's commands.
@tristanisham I was busy in other works. Sure will check its possibility.
@tristanisham Wow, I saw better solution Implemented by you. It looks cool and awesome. 🤩
Thanks @nithinkjoy-tech, but I was just building off your excellent pull request. I'd have no idea this was an issue still if not for you. Thanks.
I was wondering if you'd look over my alternative implementation. It seems more powerful but I don't know enough about Windows to be sure it's right.
@tristanisham
I am getting this error when I run in non-administrative terminal.
@nithinkjoy-tech Is that on the branch or currently on Master?
@tristanisham Its happening in master aswell as after installing using powershell script.
@nithinkjoy-tech Can you run it again with ZVM_DEBUG=1
? That should print a bunch of extra information that'll let us debug where and what's breaking.
Might be tied to #63
Try using the latest release v0.6.5/4 I can't remember, I put so many releases out yesterday. 😂
Try using the latest release v0.6.5/4 I can't remember, I put so many releases out yesterday. 😂
😂 Will check.
@tristanisham Yeah, v0.6.7 works 🔥
@tristanisham But when installing new version it installs twice, one in normal shell and again in eleveted shell.