Local $Width = 480
Local $Height = 100
GUICreate("可执行文件版本信息", $Width, $Height, @DesktopWidth - $Width - 8, 4, -1, BitOR(16+8, 256+8))
Local $InputBrowse = GUICtrlCreateButton("浏览(&B)", 8, 10, 52, 20)
$InputFile = GUICtrlCreateInput("", 70, 12, 400, 16)
GUICtrlSetState(-1, 8)
GUICtrlCreateLabel("合法版权", 10, 34)
$LegalCopyright = GUICtrlCreateInput("", 70, 32, 400, 16)
GUICtrlCreateLabel("公司名称", 10, 54)
$CompanyName = GUICtrlCreateInput("", 70, 52, 400, 16)
GUICtrlCreateLabel("文件版本", 10, 74)
$FileVersion = GUICtrlCreateInput("", 70, 72, 400, 16)
GUISetState(@SW_SHOW)
While 1
If FileExists(GUICtrlRead($InputFile)) Then
GUICtrlSetData($LegalCopyright, FileGetVersion(GUICtrlRead($InputFile), "LegalCopyright"))
GUICtrlSetData($CompanyName, FileGetVersion(GUICtrlRead($InputFile), "CompanyName"))
GUICtrlSetData($FileVersion, FileGetVersion(GUICtrlRead($InputFile), "FileVersion"))
Local $IS = "AppCopyright=" & GUICtrlRead($LegalCopyright) & @CRLF & "AppPublisher=" & GUICtrlRead($CompanyName) & @CRLF & "VersionInfoVersion=" & GUICtrlRead($FileVersion)
ClipPut($IS)
EndIf
Switch GUIGetMsg()
Case -3
ExitLoop
Case $InputBrowse
GUICtrlSetData($InputFile, FileOpenDialog("请选择一个可执行文件。", @WindowsDir & "", "可执行文件 (*.exe)", 1))
EndSwitch
WEnd