Hi,
hier ein Script, welches überprüft ob MozRepl in einem Firefox Profil
installiert ist. (Ausgabe True oder False)
Spoiler anzeigen
#cs ----------------------------------------------------------------------------
AutoIt Version: 3.2.8.1
Author: Thunder-man (Frank Michalski)
Script Function: _MozRepl_Detector()
Description: Überprüft ein Firefox Profil auf die MozRepl Erweiterung.
default: $Profil = "default"
Return values: True or False
V 1.0 ==> 15.09.2007
#ce ----------------------------------------------------------------------------
; [Example]
;~ $Result = _MozRepl_Detector()
;~ MsgBox(4096, "Result", $Result)
Func _MozRepl_Detector($Profil = "default")
Local $Ini_Pfad = @UserProfileDir & "\Anwendungsdaten\Mozilla\Firefox\"
If $Profil = "" Then MsgBox(4096, "Error", "Bitte ein Profil angeben. ")
$var = IniReadSectionNames($Ini_Pfad & "\profiles.ini")
If @error Then
MsgBox(4096, "", "Error occurred, probably no Firefox INI file.")
Else
For $i = 1 To $var[0]
$Ini_ = IniRead($Ini_Pfad & "\profiles.ini", $var[$i], "Name", "Error")
If $Ini_ = $Profil Then
$Pfad_folder = IniRead($Ini_Pfad & "\profiles.ini", $var[$i], "Path", "Eror") ;Profil Ordner
ExitLoop
EndIf
Next
EndIf
If StringLeft($Pfad_folder, = "Profiles" Then
If FileExists($Ini_Pfad & $Pfad_folder & "\extensions\mozlab@hyperstruct.net") Then
Return True
Else
Return False
EndIf
Else
If FileExists($Pfad_folder & "\extensions\mozlab@hyperstruct.net") Then
Return True
Else
Return False
EndIf
EndIf
EndFunc ;==>_MozRepl_Detector