引用 | 編輯
buch
2005-09-16 03:44 |
樓主
▼ |
||
x1
轉貼自香港IT網對於經常使用ipconfig這個指令的人, 是否覺得老是要在"命令提示字元"下手動輸入是一種麻煩? 以下方法可以將這個程式製作成對話方框, 只要用滑鼠點選就可輕鬆執行你指定的動作喔! 使用方法:用記事本開啟新檔,將以下內容複製上去,另存為*.hta檔後,直接點選就可以執行了 <html> <head> <title>The Windows XP IP Configuration Tool </title> <HTA:APPLICATION ID = "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, Param Dim RelAdap, RenAdap, ShoAdap, SetAdap Set WshShell = CreateObject("WScript.Shell") Set FileSystem = CreateObject("Scripting.FileSystemObject") Window.ResizeTo 600, 420 Window.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 .. 訪客只能看到部份內容,免費 加入會員 x0
|
引用 | 編輯
Kilian
2005-09-16 04:47 |
1樓
▲ ▼ |
MS 有個以前出的Win2000 版 ipconfig GUI
Wntipcfg.exe: Windows NT IPConfig Utility http://www.microsoft.com/windows2000/techinfo/reskit/tools/existing/wntipcfg-o.asp 可以在 XP 用 x0 |
引用 | 編輯
takashilin
2010-02-19 15:31 |
8樓
▲ ▼ |
好棒 實用又簡單感激不盡
x0 |
引用 | 編輯
freeze02468
2013-12-30 15:13 |
10樓
▲ ▼ |
真的是很感謝大大能夠提供那麼實用的教學!
小弟上了寶貴的一課! 謝謝大大的分享~ x0 |
引用 | 編輯
freeze02468
2013-12-31 01:35 |
11樓
▲ ▼ |
真的很感謝大大能提供這麼實用的教學!
小弟上到了寶貴的一課! 真的是受益良多阿! x0 |