General :  K-Meleon Web Browser Forum
General discussion about K-Meleon 
auto-restore profile
Posted by: disrupted
Date: January 15, 2009 02:18AM

when windows crashes while km is running; the prefs.js will almost always be deleted on integrity check at system boot.. this means km will open with default prefs and starts popping up all those messages about the plugins etc and after that you'll need to restore profile either manually or using whatever profile restoration tool/macro in kmeleon.. TEDIOUS! not to mention annoying and consumes few valuable seconds from what otherwise you'd be surfing online.

not anymore.

this simple autoit script will check for prefs.js, if located..no big deal and will run kmeleon..if not, it will restore your profile folder from the backup(important, whole profile not just prefs in case other files got altered aswell) while displaying a nice progress bar(bogus) and then runs kmeleon.. you'll never have to worry about it anymore.

; AutoIt Version: 3.0
; Language: English
; Platform: Win9x/NT
; Author: yanni
;
; Script Function:
#include <file.au3>
#NoTrayIcon

If FileExists("C:\Users\LEEDS\Application Data\K-Meleon\DEFAULT\prefs.js") Then
Run("G:\applications-x\KMplus\k-meleon.exe")

Else
ProgressOn("Corrupted Profile Detected", "Restoration in progress..")
For $i = 10 to 100 step 40
DirCopy("G:\applications-x\KMplus\profilebkup\K-Meleon", "C:\Users\LEEDS\Application Data\K-Meleon", 1)
sleep(400)
ProgressSet( $i, $i & " percent")
Next
ProgressSet(100 , "Done", "Profile Restored successfully")
sleep(500)
ProgressOff()
sleep(400)

Run("G:\applications-x\KMplus\k-meleon.exe")

Endif
exit


since this won't be running from inside km(no macro), you will need to change all paths in red according to:
1> path to your prefs.js
2> path to your kmeleon.exe
3> path to your profile backup directory
4> path to your default profile directory

launch directly with autoit or compile if you want, make shortcut to script from where you normally launch kmeleon(desktop, startmenu, launchbar etc)



Edited 1 time(s). Last edit at 03/13/2010 09:24AM by disrupted.

Options: ReplyQuote
Re: auto-restore profile
Posted by: dreamz
Date: January 15, 2009 03:53AM

interesting idea.

i have a different approach to profiles. first, i load k-meleon and make the desired changes. then i copy the tweaks i want from the prefs.js file in the profile directory to the prefs.js file in the defaults directory. now, whenever i need a new profile, i just delete the whole profile directory and launch k-meleon. all my customizations are copied over--no more tweaking!

Options: ReplyQuote


K-Meleon forum is powered by Phorum.