azwildcat Posted December 30, 2009 Posted December 30, 2009 How do I change the program file properties details (right click on .exe file, choose properties, details). I want to change the File Version, Product Version, and Product Name. Any help will be appreciated. Thanks in advance!
darkjohn20 Posted December 30, 2009 Posted December 30, 2009 I too would like to know this, because I want to make a music player based on these details of a .mp3 or other type of media. For example: Author, Title, etc...
Developers Jos Posted December 30, 2009 Developers Posted December 30, 2009 (edited) Are you both talking about your own scripts exe's? Load the full SciTe4AutoIt3 installer and use the #AutoIt3Wrapper directives. Use Ctrl+F7 to easily fill out these directives. Jos Edited December 30, 2009 by Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
darkjohn20 Posted December 30, 2009 Posted December 30, 2009 No, I would like to read the details of music files. I don't know what OP was talkin about, but I can assume it was the same as me. He actually wanted to change those values though. Although, now that I look at it again he could mean his own exe.
Moderators Melba23 Posted December 30, 2009 Moderators Posted December 30, 2009 darkjohn20, This function will allow you to read the properties of music files, as long as they are set in the normal Windows properties slots: expandcollapse popup#include <Array.au3> Global $aTrack_Info[6] ; Function needs full path & name $sPassed_File_Name = "Your_File_Path_And_Name_Here" Read_Track_Info($sPassed_File_Name) _ArrayDisplay($aTrack_Info) Exit Func Read_Track_Info($sPassed_File_Name) Local $iError = 0 ; Reset info holders Global $aTrack_Info[6] If StringLower(StringRegExpReplace($sPassed_File_Name, "^.*\.", "")) = "wav" Then ; Set data to show wav - no properties available Dim $aTrack_Info[6] = ["", "Wave sound file"] Else ; Code modified from original by Simulcal & PsaltyDS Local $sDir_Name = StringRegExpReplace($sPassed_File_Name, "(^.*\\)(.*)", "\1") Local $sFile_Name = StringRegExpReplace($sPassed_File_Name, "^.*\\", "") Local $sDOS_Dir = FileGetShortName($sDir_Name, 1) Local $oShellApp = ObjCreate("shell.application") If IsObj($oShellApp) Then Local $oDir = $oShellApp.NameSpace($sDOS_Dir) If IsObj($oDir) Then Local $oFile = $oDir.Parsename($sFile_Name) If IsObj($oFile) Then If @OSVersion = "WIN_VISTA" Then $aTrack_Info[0] = $oDir.GetDetailsOf($oFile, 26) ; Track number $aTrack_Info[1] = $oDir.GetDetailsOf($oFile, 21) ; Track $aTrack_Info[2] = $oDir.GetDetailsOf($oFile, 14) ; Album $aTrack_Info[3] = $oDir.GetDetailsOf($oFile, 13) ; Artist $aTrack_Info[4] = $oDir.GetDetailsOf($oFile, 28) ; Bit Rate $aTrack_Info[5] = $oDir.GetDetailsOf($oFile, 16) ; Genre ElseIf @OSVersion = "WIN_XP" Then $aTrack_Info[0] = $oDir.GetDetailsOf($oFile, 19) ; Track number $aTrack_Info[1] = $oDir.GetDetailsOf($oFile, 10) ; Track $aTrack_Info[2] = $oDir.GetDetailsOf($oFile, 17) ; Album $aTrack_Info[3] = $oDir.GetDetailsOf($oFile, 16) ; Artist $aTrack_Info[4] = $oDir.GetDetailsOf($oFile, 22) ; Bit Rate $aTrack_Info[5] = $oDir.GetDetailsOf($oFile, 20) ; Genre Else $iError = 4 EndIf Else $iError = 3 EndIf Else $iError = 2 EndIf Else $iError = 1 EndIf If $iError > 0 Then Local $sMsg = "Could not read File Properties" & @CRLF & @CRLF & _ $iError & @CRLF & @CRLF & $sPassed_File_Name MsgBox(0, "Error", $sMsg) EndIf EndIf EndFunc I have no idea of the Win_7 property numbers - should you need them I am sure they are on the InterWeb somewhere. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area
azwildcat Posted December 31, 2009 Author Posted December 31, 2009 Are you both talking about your own scripts exe's?Load the full SciTe4AutoIt3 installer and use the #AutoIt3Wrapper directives.Use Ctrl+F7 to easily fill out these directives.JosThat's what I was looking for!Thanks!
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now