Search the Community
Showing results for tags 'association'.
-
Well a Simple way to launch an advanced association dialog box to easy edit aplication association. Local Const $sCLSID_LaunchAdvancedAssociationUI = "{1968106d-f3b5-44cf-890e-116fcb9ecef1}" Local Const $sIID_ILaunchAdvancedAssociationUI = "{1f76a169-f994-40ac-8fc8-0959e8874710}" Local Const $sTagILaunchAdvancedAssociationUI = "LaunchAdvancedAssociationUI hresult(wstr)" ; Create the object. Local $aRegApp = _GetRegisteredApplications() If IsArray($aRegApp) Then LaunchAdvancedAssociationUI($aRegApp[0]) EndIf Func LaunchAdvancedAssociationUI($AppRegName) Local $oLaunchAdvancedAssociationUI = ObjCreateInterface($sCLSID_LaunchAdvancedAssociationUI, $sIID_ILaunchAdvancedAssociationUI, $sTagILaunchAdvancedAssociationUI) If Not IsObj($oLaunchAdvancedAssociationUI) Then Return False Return SUCCEEDED($oLaunchAdvancedAssociationUI.LaunchAdvancedAssociationUI($AppRegName)) EndFunc ;==>LaunchAdvancedAssociationUI Func _GetRegisteredApplications() Local $sWow64 = "" Local $sString = "" Local $aRegApp[0] Local $i = 1 If @AutoItX64 Then $sWow64 = "\Wow6432Node" Do $sString = RegEnumVal("HKEY_LOCAL_MACHINE\SOFTWARE" & $sWow64 & "\RegisteredApplications", $i) If Not @error Then ReDim $aRegApp[$i] $aRegApp[$i - 1] = $sString $i += 1 EndIf Until @error <> 0 If $i = 1 Then Return 0 Return $aRegApp EndFunc ;==>_GetRegisteredApplications Func SUCCEEDED($hr) Return ($hr >= 0) EndFunc ;==>SUCCEEDED Saludos