Saturday, June 27, 2009

PostTwiceDaily2 06/27/2009 (p.m.)

  • tags: paf, portableapps, truecrypt, portable, tutorials

      • PAF.tc is a wrapper that will mount a TrueCrypt container file, launch a PortableApp from that mounted container, wait for the PortableApp to exit and then dismount the container file. PAF.tc is able to handle multiple instances and will only try to dismount after the last instance has exited. PAF.tc has the following requirements:



        • A copy of the TrueCrypt binaries.

        • Admin rights for TrueCrypt to run properly.

        • A TrueCrypt container file to hold the PortableApp
      • A walkthrough for wrapping GnuCashPortable:

        (Assuming PortableApps drive conencted as E:\)



        1. Download and extract latest TrueCrypt binaries to E:\PortableApps\TC

        2. Using TrueCrypt Format.exe create a container file named GnuCashPortable.tc to hold the PortableApp.

        3. Temporarily mount GnuCashPortable.tc (Z:\ for this example) and either:


          1. Run the GnuCashPortable installer and install to Z:\GnuCashPortable

          2. If already installed on E:\ then copy the \GnuCashPortable folder to the root of Z:\ (keep a backup in a safe place)


        4. Dismount the container file.

        5. Launch the PAF.tc installer

        6. Change the installation path from E:\PortableApps\PAF.tc to E:\PortableApps\GnuCashPortable

        7. Finish PAF.tc installation.

        8. Move GnuCashPortable.tc to E:\PortableApps\GnuCashPortable\Data\


        Before running this copy of PAF.tc for the first time it will show up in PAM as "PAF TrueCrypt Wrapper". Run this entry and type in the passphrase. GnuCashPortable will launch. PAF.tc will update the appinfo.ini for the wrapper so that it displays "GnuCashPortable.tc" instead of "PAF TrueCrypt Wrapper" (will need to refresh or restart PAM). After closing GnuCash, GnuCash will finish writing to disk and exit. Following this GnuCashPortable.exe will exit. After that happens PAF.tc.exe will dismount the container and it too will exit.


        What happens when PAF.tc runs.



        1. PAF.tc tries to load the path to TrueCrypt from PAF.ini. Defaults to :\PortableApps\TC\TrueCrypt.exe

        2. PAF.tc tries to load the container file name from PAF.ini. Defaults to {ParentDirName}.tc

        3. PAF.tc tries to load the execution string from PAF.ini. Defaults to {ParentDirName}\{ParentDirName}.exe

        4. If not already mounted PAF.tc will mount container from step 2.

        5. PAF.tc will execute {MountedDriveLetter}:\{ExecutionStringFromStep3}

        6. PAF.tc will wait for the wrapped launcher to exit.

        7. If this is the last instance of this copy of PAF.tc then PAF.tc will dismount the container.
      • The format of PAF.tc.ini


        [User Settings]
        TrueCrypt Location="..\TC\TrueCrypt.exe"
        TC Container="FooPortable.tc"
        App Name="Foo Portable Wrapped by PAF.tc"
        Launch Command="FooPortableDirectory\FooPortable.exe"
        Dismount Delay=100

        [Relaunch Tracking]
        Drive Letter=Z
        Mount Instances=0


        PAF.tc.ini setting definitions (all settings are optional)



        • TrueCrypt Location: Location of TrueCrypt.exe relative to the PAF.tc.exe

        • TC Container: Name of the TrueCrypt container file in the \Data directory that contains the PortableApp

        • App Name: The display name of this copy of PAF.tc.exe in the PAM

        • Launch Command: String that is appended to the mounted drive letter used to launch the encrypted app

        • Dismount Delay: Time in ms that PAF.tc waits after launched app exits before attempting to dismount the container.

        • Drive Letter: Do not modify. Filled in by PAF.tc if not yet mounted. If is mounted then is used to locate where it is mounted.

        • Mount Instance: Do not modify. Filled in by PAF.tc to track how many instances of the encrypted app are running. PAF.tc will not dismount the container until the Mount Instances goes to zero

Posted from Diigo. The rest of my favorite links are here.