You are here

FFP Cleanup BAT Question

9 posts / 0 new
Last post
madcadder
Offline
Last seen: 14 years 8 months ago
Joined: 2007-11-16 09:07
FFP Cleanup BAT Question

I love FFP! Absolutely awesome.

Anyway..
I moved my cache off the flash and onto
c:\Temp\FFP_Cache
and created a BAT file FFP_Cleanup.bat that contains:

RD /S /Q C:\Temp\FFP_Cache

How can I incorporate this to file to fire automatically when FFP exits?

Thanks,
mc

Ryan McCue
Ryan McCue's picture
Offline
Last seen: 15 years 1 month ago
Joined: 2006-01-06 21:27
Impossible / Possible

Short answer: You can't.
Long answer: There's no callback within the launcher to do it, so you can't use that. However, you could execute the launcher within your .bat and have it wait...

"If you're not part of the solution, you're part of the precipitate."

rab040ma
Offline
Last seen: 4 months 4 weeks ago
Joined: 2007-08-27 13:35
How hard would it be to add

How hard would it be to add that to the launcher (since source code is available)? Would that be very tricky?

MC

Ryan McCue
Ryan McCue's picture
Offline
Last seen: 15 years 1 month ago
Joined: 2006-01-06 21:27
Hmm

I'd say just Exec or ExecWait would do it, and is pretty easy to add.

"If you're not part of the solution, you're part of the precipitate."

madcadder
Offline
Last seen: 14 years 8 months ago
Joined: 2007-11-16 09:07
Thanks...

Will look into that.

madcadder
Offline
Last seen: 14 years 8 months ago
Joined: 2007-11-16 09:07
Hummm......

Well... I'm learning... I think...

What I've found out so far. (correct me if I'm wrong)
The FirefoxPortable.exe was created from FirefoxPortable.nsi using NSIS.
NSIS should be able to create and new EXE... but, for me, crashes every time on line 67 due to it not being able to find the Registry.nsh referenced in the NSI file.

What I'm trying to do now is let FFP create the Folder for the cache in the docs&settings and let FFP erase it when finished.

Now I need to create something similar to this attempted mod:
RemoveLocalFiles2:
Delete "$APPDATA\Mozilla\Firefox\pluginreg.dat"
RMDir /R "$APPDATA\Mozilla\Firefox\Cache"
RMDir "$APPDATA\Mozilla\Firefox\" ;=== Will only delete if empty (no /r switch)
RMDir "$APPDATA\Mozilla\" ;=== Will only delete if empty (no /r switch)
StrCmp $MOZILLAORGKEYEXISTS "true" TheEnd
${registry::DeleteKey} "HKEY_CURRENT_USER\Software\mozilla.org" $R0

TheEnd:
${registry::Unload}
newadvsplash::wait
SectionEnd

or

RemoveLocalFiles2:
RMDir /R "$APPDATA\Mozilla\Firefox\"
RMDir "$APPDATA\Mozilla\" ;=== Will only delete if empty (no /r switch)
StrCmp $MOZILLAORGKEYEXISTS "true" TheEnd
${registry::DeleteKey} "HKEY_CURRENT_USER\Software\mozilla.org" $R0

TheEnd:
${registry::Unload}
newadvsplash::wait
SectionEnd

powerjuce
powerjuce's picture
Offline
Last seen: 13 years 9 months ago
Developer
Joined: 2007-09-20 21:34
TheEnd: ${registry::Unload}
TheEnd:
${registry::Unload}
newadvsplash::wait
SectionEnd

that may not work to well with the new newadvsplash
aslo all you have to do is get the registry header into the header files...i think

Please search before posting. ~Thanks

rab040ma
Offline
Last seen: 4 months 4 weeks ago
Joined: 2007-08-27 13:35
The first few times you try

The first few times you try to run NSIS you'll get errors for plugins that are missing (go to the NSIS site and download them) or graphic/icon files not found (make or grab one and stick it in the designated place) or header files not found (make sure they are where they're supposed to be). Once you get all the missing pieces it should work okay.

SmithTech has some pointers and a package containing most of what you need, but it's not hard to put it together yourself.

MC

Ph4n70m
Ph4n70m's picture
Offline
Last seen: 2 years 5 months ago
Joined: 2007-01-12 19:22
What about another file.bat

What about another file.bat within this?

@echo off
cls
start /wait FirefoxPortable.exe
RD /S /Q C:\Temp\FFP_Cache

Pardon

EDIT: Oh sorry... I forgot that the launcher not stay open while firefox is closing =[ It'll not work...

Log in or register to post comments