in reply to ifconfig.pl script for Windows
Probably don't need the absolute path. I've yet to see a windows that didn't have system32 in its path./h> perl win-net.pl sh: C:WindowsSystem32ipconfig.exe: command not found ------------------------------------------------ Computer .... ATHENAE User ........ law Connected ... (none) ------------------------------------------------ Type 'win-net.pl -h' for help /h> gvim win-net.pl [ - my $ipconfig = 'C:\Windows\System32\ipconfig.exe'; - my $netsh = 'C:\Windows\System32\netsh.exe'; + my $ipconfig = 'C:/Windows/System32/ipconfig.exe'; + my $netsh = 'C:/Windows/System32/netsh.exe'; ] /h> perl win-net.pl ------------------------------------------------ Computer .... ATHENAE User ........ law Connected ... 1 ------------------------------------------------ Type 'win-net.pl -h' for help #1 [Ethernet adapter Ish2] Desc ........ Intel(R) Ethernet Converged Network Adapter X540-T2 +#2 DHCP ........ No MAC ......... A0:36:9F:15:CE:28 IP Addr ..... 192.168.4.12(Preferred) Mask ........ 255.255.255.0 Gateway ..... 192.168.4.1
FWIW
C:/Windows/System32/<cmd> works in cmd.exe... the default shell,
and in bash.exe if you run cygwin...
My mom needed something like this a few days ago -- had to talk her through finding the right numbers (she's 85) from the normal output...
Maybe I can use this as an excuse to put linux on her machine?? ;-)
|
|---|