| 关键词: nbsp Configuration Display DHCP resolver Release client DNS class cache |
来源:http://www.juntuan.net/ 使用方法:保存为*.hta文件,执行就可以了<html><head><title>The Windows XP IP Configuration Tool </title> <HTA:APPLICATIONID = "XApp"APPLICATIONNAME = "The Windows XP IP Configuration Tool"BORDER = "thick"CAPTION = "yes"ICON = "wxpipc.ico"SHOWINTASKBAR = "yes"SINGLEINSTANCE = "yes"SYSMENU = "yes"WINDOWSTATE = "normal"SCROLL = "no"SCROLLFLAT = "yes"VERSION = "1.0"INNERBORDER = "no"SELECTION = "no"MAXIMIZEBUTTON = "yes"MINIMIZEBUTTON = "yes"NAVIGABLE = "yes"CONTEXTMENU = "yes"BORDERSTYLE = "normal"> <OBJECT ID="WindowsShell" CLASSID="clsid:13709620-C279-11CE-A49E-444553540000"></Object> <SCRIPT LANGUAGE="VBScript"> Dim WshShell, FileSystem, CommandLine, ipcswitch, ParamDim RelAdap, RenAdap, ShoAdap, SetAdap Set WshShell = CreateObject("WScript.Shell")Set FileSystem = CreateObject("Scripting.FileSystemObject") Window.ResizeTo 600, 420Window.MoveTo 5, 5 Sub ProcessOptions Set MyForm = Document.dbx Set RadioButtonDialog = MyForm.Elements("ipcswitch") For Each RadioButton In RadioButtonDialog If RadioButton.Checked = True Then ipcswitch = RadioButton.Value Exit For End If Next Select Case ipcswitch Case "/release " Param = MyForm.RelAdap.Value Case "/renew " Param = MyForm.RenAdap.Value Case "/showclassid " Param = MyForm.ShoAdap.Value Case "/setclassid " Param = MyForm.SetAdap.Value End Select Call RunCommand End Sub 'ProcessOptions Sub RunCommand CommandLine = "IPConfig " & ipcswitch & Param Prompter = "This is the IPConfig command that you just configured:" & vbCrlf & vbCrlf &_ "Do you want to execute it?" & vbCrlf & vbCrlf &_ CommandLine ExecuteIt = MsgBox(Prompter, 1, "The Windows XP IP Configuration Tool") If ExecuteIt = 1 Then WshShell.Run "Cmd.exe /t:9F /k " & CommandLine, 1, True End If End Sub 'RunCommand Sub DisplayHelp HelpCommand = "ipconfig /?" WshShell.Run "Cmd.exe /t:9F /k " & HelpCommand, 1, True End Sub 'DisplayHelp Sub CloseDown Window.Close Wscript.Quit End Sub 'CloseDown </Script> </head> <body bgcolor="#E0E2EB"> <form name="dbx"> <div align="left"> <table border="0" cellspacing="1" width="600"> <tr> <td valign="top"> <fieldset><legend>IPConfig Switches</legend> <div align="left"> <table border="0" cellspacing="1" width="675"> <tr> <td width="50%"> <p><input type="radio" name="ipcswitch" value="">Display basic TCP/IP configuration</p> </td> <td width="50%"> </td> </tr> <tr> <td width="60%"> <p><input type="radio" name="ipcswitch" value="/all">Display full TCP/IP configuration (/all)</p> </td> <td width="40%"> </td> </tr> <tr> <td width="50%"> <p><input type="radio" name="ipcswitch" value="/release ">Release current DHCP configuration (/release)</p> </td> <td width="50%"> <p><input type="text" size="16" name="RelAdap"></p> </td> </tr> <tr> <td width="50%"> <p><input type="radio" name="ipcswitch" value="/renew ">Renew DHCP configuration (/renew)</p> </td> <td width="50%"> <p><input type="text" size="16" name="RenAdap"></p> </td> </tr> <tr> <td width="50%"> <p><input type="radio" name="ipcswitch" value="/displaydns">Display the DNS client resolver cache (/displaydns)</p> </td> <td width="50%"> </td> </tr> <tr> <td width="50%"> <p><input type="radio" name="ipcswitch" value="/flushdns">Flush and reset the DNS client resolver cache (/flushdns)</p> </td> <td width="50%"> </td> </tr> <tr> <td width="50%"> <p><input type="radio" name="ipcswitch" value="/registerdns">Refresh DHCP lease and re-register DNS names (/registerdns)</p> </td> <td width="50%"> </td> </tr> <tr> <td width="50%"> <p><input type="radio" name="ipcswitch" value="/showclassid ">Display the DHCP class ID (/showclassid)</p> </td> <td width="50%"> <p><input type="text" size="16" name="ShoAdap"></p> </td> </tr> <tr> <td width="50%"> <p><input type="radio" name="ipcswitch" value="/setclassid ">Configure the DHCP class ID (/setclassid)</p> </td> <td width="50%"> <p><input type="text" size="16" name="SetAdap"></p> </td> </tr> <tr> <td> </td> </tr> </table> </div> </fieldset> </td> </tr> <tr> <td> </td> </tr> </table></div></form> <table border="0" cellspacing="1" width="100%"> <tr> <td valign="top"><font color="#0000FF" size="1"> Created For TechRepublic <br> by Greg Shultz<br> <a href="http://www.TheWinWiz.com" target="_blank">www.TheWinWiz.com</a> </td> <td align="right" valign="top"> <input type="button" value=" Help " onclick="DisplayHelp"> <input type="button" value=" OK " onclick="ProcessOptions"> <input type="button" value="Close" onclick="CloseDown"> </td> </tr></table> </body></html> |
|
声明:文章版权归原作者所有 部分文章转自互联网 如有侵权请联系
[邮箱地址] 删除
|