MatteoGuallini Posted April 15, 2010 Posted April 15, 2010 (edited) Hello,MozBackup it's a good software however unfortunately it has some hole.I'm sorry if the code has italian comments but it will be translated soon.INTRO--------------------MozBackup_Launcher.au3 is an helper for using Mozilla Thunderbird and MozBackupFEATURES--------------------It Close Thunderbird before starting MozBackup.It Open Thunderbird before starting MozBackup.It Prevent Thunderbird opening during MozBackup running.It Deletes all previous *.pcv files contained in the same directory of the current .pcv file.It can read commnd line arguments for starting it on scheduled tasks.USAGE IN COMMAND LINE--------------------Command line examples: "MozBackup_Launcher.exe" "c:\mypath\my_profile.mozprofile""C:\mypath_A\MozBackup_Launcher.exe" "\\x.x.x.x\mypath_B\my_profile.mozprofile"OTHER USAGE--------------------If you run MozBackup_Launcher.exe without arguments the program search the file "MozBackup_Launcher.mozprofile" into the same directory of the program and run it.expandcollapse popup;Command line example *.cmd : "MozBackup_Launcher.exe myprofile.mozprofile" #include <Timers.au3> #Include <File.au3> #include <array.au3> $appname=StringMid(@ScriptName,1,StringLen(@ScriptName)-4) $MozProfile="MozBackup_Launcher.mozprofile" ;default profile If FileExists(@ScriptDir&"\"&"MozBackup.exe")=0 Then MsgBox(48+262144,$appname,"MozBackup.exe not found. The file must be in the same directory of the application. Program will be closed.",30) Exit EndIf If $CmdLine[0] = 0 Then $MozProfile="MozBackup_Launcher.mozprofile" If $CmdLine[0] = 1 Then $MozProfile=$CmdLine[1] ;loads the file *.mozprofile from command line If $CmdLine[0] > 1 Then MsgBox(48+262144,$appname,"Wrong command line. Program will be closed.",30) Exit EndIf If FileExists($MozProfile)=0 Then MsgBox(48+262144,$appname,"File '" &$MozProfile&"' not found. Program will be closed.",30) Exit EndIf $starttime=TimerInit() While ProcessExists("thunderbird.exe")>0 ProcessClose("thunderbird.exe") If _Timer_Diff($starttime)>60000 then MsgBox(48+262144,$appname,"The program is open. Close the program and press OK",0) ExitLoop EndIf WEnd $OutpotPCV=IniRead($MozProfile,"General","output","NA") Dim $szDrive, $szDir, $szFName, $szExt $OutpotPCVAr = _PathSplit($OutpotPCV, $szDrive, $szDir, $szFName, $szExt) If IsArray($OutpotPCVar)=1 Then FileDelete($OutpotPCVAr[1]&$OutpotPCVAr[2]&"*"&$OutpotPCVAr[4]) ;MsgBox(48+262144,$appname,$OutpotPCVAr[1]&$OutpotPCVAr[2]&"*"&$OutpotPCVAr[4],0) Else MsgBox(48+262144,$appname,"The backup file contained in '"&$MozProfile&"' isn't correct",0) EndIf ShellExecute("mozbackup.exe", '"'&$MozProfile&'"',@ScriptDir) While ProcessExists("MozBackup.exe")>0 If ProcessExists("thunderbird.exe")>0 Then ProcessClose("thunderbird.exe") MsgBox(48+262144,$appname,"Mozilla Thunderbird has been closed because the Backup is running.",30) EndIf WEnd Sleep(10000) Run(@ProgramFilesDir&"\Mozilla Thunderbird\thunderbird.exe")MozBackup_Launcher.au3 Edited April 20, 2010 by MatteoGuallini http://www.vigevano-prabis.it/
JohnOne Posted April 15, 2010 Posted April 15, 2010 Yes, its quite easy to forget a link sometimes AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans.
MatteoGuallini Posted April 15, 2010 Author Posted April 15, 2010 I forgot to press "attach file". Tomarro I'm doing it. http://www.vigevano-prabis.it/
MatteoGuallini Posted April 16, 2010 Author Posted April 16, 2010 The file has been attached in the first post. http://www.vigevano-prabis.it/
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