![]() |
|
ip.bat (network script) - Printable Version +- Sinisterly (https://sinister.li) +-- Forum: Coding (https://sinister.li/Forum-Coding) +--- Forum: Coding (https://sinister.li/Forum-Coding--71) +--- Thread: ip.bat (network script) (/Thread-ip-bat-network-script) |
ip.bat (network script) - bitm0de - 12-09-2016 -- removed post content -- RE: ip.bat (network script) - Inori - 12-09-2016 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 ![]() http://stackoverflow.com/a/10052222/5388567 RE: ip.bat (network script) - bitm0de - 12-12-2016 (12-09-2016, 04:55 AM)Inori Wrote: 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 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. RE: ip.bat (network script) - Satan - 12-12-2016 Much cleaner written than all the batch I've made in the past. I'm sure some of the users here will find this useful. |