Saved Bookmarks
| 1. |
Solve : Help me with a batch file? |
|
Answer» Quote from: BC_Programmer on February 16, 2009, 09:08:41 AM If he's examining windows versions, there is a chance he wants the batch to run on windows 98, in which case SET /P is not available. You right! In other word : I'm attempting to make my batch the more compatible possible If you are making your script backwards compatible with Win9x, then be sure to modify your IPCONFIG commands because the Win9x version of IPCONFIG is very different from the Windows 2000 / Windows XP version of IPCONFIG Code: [Select]C:\Win98>ipconfig /? Windows 98 IP Configuration Command line OPTIONS: /All - Display DETAILED information. /Batch [file] - Write to file or ./WINIPCFG.OUT /renew_all - Renew all adapters. /release_all - Release all adapters. /renew N - Renew adapter N. /release N - Release adapter N. Code: [Select]C:\WindowsXP>ipconfig /? USAGE: ipconfig [/? | /all | /renew [adapter] | /release [adapter] | /flushdns | /displaydns | /registerdns | /showclassid adapter | /setclassid adapter [classid] ] where adapter Connection NAME (wildcard characters * and ? allowed, see examples) Options: /? Display this help message /all Display full configuration information. /release Release the IP address for the specified adapter. /renew Renew the IP address for the specified adapter. /flushdns Purges the DNS Resolver cache. /registerdns Refreshes all DHCP leases and re-registers DNS names /displaydns Display the contents of the DNS Resolver Cache. /showclassid Displays all the dhcp class IDs allowed for adapter. /setclassid Modifies the dhcp class id. The default is to display only the IP address, subnet MASK and default GATEWAY for each adapter bound to TCP/IP. For Release and Renew, if no adapter name is specified, then the IP address leases for all adapters bound to TCP/IP will be released or renewed. For Setclassid, if no ClassId is specified, then the ClassId is removed. Examples: > ipconfig ... Show information. > ipconfig /all ... Show detailed information > ipconfig /renew ... renew all adapters > ipconfig /renew EL* ... renew any connection that has its name starting with EL > ipconfig /release *Con* ... release all matching connections, eg. "Local Area Connection 1" or "Local Area Connection 2"Thx for the notice GuruGary I will make some modification to my script. |
|