Quote:(12-09-2016, 04:55 AM)Inori Wrote: [To see links please register here]
Not a necessary addition, but you could prompt the user and request UAC if you don't already have it. All around good, clean (as far as Batch goes) script though, nice work :biggrin:
[To see links please register here]
I usually hate doing stuff in VBScript like that in batch. If you're going to write out a script to disk, execute it, then delete it, might as well just write the entire thing in VBScript or port it to powershell. That's just my opinion though. There's tricks to detect whether elevated permissions are active or not, but of course you could only use this to notify the user, not request UAC. If I really wanted to do it from batch I would just create my own program and put it in %PATH% or something, but it's an added dependency still.