Eleven Years of Service
Posts: 98
Threads: 10
ip.bat (network script) 12-09-2016, 04:01 AM
#1
-- removed post content --
(This post was last modified: 01-10-2017, 04:57 AM by bitm0de.)
- mostly braindead monkeys on this forum.
Eleven Years of Service
Posts: 98
Threads: 10
RE: ip.bat (network script) 12-12-2016, 05:24 PM
#3
(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 
http://stackoverflow.com/a/10052222/5388567
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.
(This post was last modified: 12-12-2016, 05:26 PM by bitm0de.)
- mostly braindead monkeys on this forum.
•
Twelve Years of Service
Posts: 2,762
Threads: 58
RE: ip.bat (network script) 12-12-2016, 05:29 PM
#4
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.
•