PortableApps.com Format is a simple specification that governs the file and directory layout as well as operating behavior of portable apps. Files are distributed as easy-to-use .paf.exe™ installer files. The specification is broken into sections for easy reading.
- 1. Directory and File Layout
- 2. appinfo.ini (App Configuration)
- 3. Icons
- 4. PortableApps.com AppCompactor and appcompactor.ini
- 5. PortableApps.com Installer, installer.ini, and installer logging
- 6. Host PC Modifications & Portability
- 7. Plugin Installers
- 8. Permissions
- 9. Version History and Discussion
The basic directory layout of each portable app consists of a main directory, AppNamePortable which contains three directories: App, Data and Other.
AppNamePortable + App + AppInfo + FileTypeIcons + AppName + DefaultData + Data + Other + Help + Images + Source
AppNamePortable: contains the main application launcher, typically named
AppNamePortable.exe and the main help file
help.html. No other files are present in this directory by default.
App: contains all the binary and other files that make up the application itself, usually within a directory called
AppName. The other directory called
AppInfo (discussed in section 2) contains the configuration details for the PortableApps.com Platform as well as the icons used within the menu. It may also contain the launcher.ini configuration file used for the PortableApps.com Launcher. The third directory,
DefaultData is usually used as a container for the default files to be placed within the
Data directory. Generally, the launcher, when run, will check if there is a set of files within Data and, if not, will copy them from DefaultData. The next release of the PortableApps.com Installer will do the same.
Data: contains all the user data for the application including settings, configuration and other data that would usually be stored within APPDATA for a locally installed application. The applications released by PortableApps.com typically contain the settings in a
settings subdirectory, profiles for Mozilla apps in a
profiles subdirectory. No application components (binary files, etc) should be contained within the Data directory. The launcher or application must be able to recreate the Data directory and all required files within it if it is missing.
Other: contains files that don't fit into the other categories. The additional images and other files used by
help.html included in the main
AppNamePortable are included in a
Help subdirectory in the
Other directory. Images for the help file would be included in an
Images subdirectory within the
Any source code or source code licensing as well as the source files for the PortableApps.com Installer (if desired) are included within the
Source subdirectory. This may include the source for the
AppNamePortable.exe launcher, a
readme.txt file detailing the usage of the launcher, license information and other files.
The portable app makes available its configuration information to the PortableApps.com Platform by way of the
AppInfo details. Within the
AppNamePortable\App directory, an
AppInfo directory contains an
appinfo.ini file as well as any icons used within the menu (explained in Section 3). The
appinfo.ini file consists of the following:
[Format] Type=PortableApps.comFormat Version=3.5 [Details] Name=AppName Portable AppID=AppNamePortable BaseAppName=AppName Publisher=App Developer & PortableApps.com Homepage=PortableApps.com/AppNamePortable Donate=example.com/donate Category=Utilities Description=AppName Portable is a tool that does something. Language=Multilingual Trademarks='thing' is a trademark of XYZ Inc InstallType= [License] Shareable=true OpenSource=true Freeware=true CommercialUse=true EULAVersion=1 [Version] PackageVersion=22.214.171.124 DisplayVersion=1.2 Release 1 [SpecialPaths] Plugins=NONE [Dependencies] UsesGhostscript=optional UsesJava=no UsesDotNetVersion= [Control] Icons=1 Start=AppNamePortable.exe ExtractIcon=App\AppName\AppName.exe ExtractName=App\AppName\AppName.exe BaseAppID=%BASELAUNCHERPATH%\App\AppName\AppName.exe BaseAppID64=%BASELAUNCHERPATH%\App\AppName64\AppName.exe [Associations] FileTypes=html,htm,xhtml,xhtm,xht,shtml FileTypeCommandLine=/Open=%1 FileTypeCommandLine-extension=/OpenExtension=%1 Protocols=http,https,gtp,gopher ProtocolCommandLine=--protocolhandler=%1 ProtocolCommandLine-protocol=--http:%1 SendTo=true SendToCommandLine=-multiplefiles "%1" Shell=true ShellCommand=/idlist,%I,%L [FileTypeIcons] swf=video ttp=custom qwe=app
appinfo.ini file, the entries are as follows:
Please do not include double quotes within these fields
Type is the type of configuration file this is (only PortableApps.comFormat is valid at this time).
Version is the version of this format the file is in (currently 3.5).
Name is the name of your app as it appears in the PortableApps.com Menu
AppID is the globally unique id for the application. Apps released by PortableApps.com or directly by the publisher of the regular version of the software will generally just be the name without spaces. Apps released by other entities must be AppNamePortable-example.com where example.com is their company domain. Apps released by individuals on PortableApps.com that aren't working towards making it an official PortableApps.com release must be AppNamePortable-username where username is the PortableApps.com username. AppIDs may contain letters, numbers, periods ( . ), dashes ( - ), plus signs ( + ) and underscores ( _ ).
BaseAppName (optional) is the name of the base app if it differs from the launcher name. This should only be used when legally required for launchers in specific apps. When not needed it should be left out of appinfo.ini.
Publisher is the name of the app publisher as it appears in a hover tip in the next PortableApps.com Platform release and within the app details screen. If you are repackaging an app written by someone else, they should also be listed.
Homepage is the homepage of the portable app (not the base app)
Donate is the URL of a page where donations to support development of the app are taken
Category is the category that the application falls into within the PortableApps.com Platform. Valid entries are: Accessibility, Development, Education, Games, Graphics & Pictures, Internet, Music & Video, Office, Security or Utilities. Only these *exact* entries are supported and should be used regardless of the default language of the base app (even if this is a German application, it should still use the English translation of the category).
Description is a brief description of what the application is. Maximum of 512 characters.
Language is the language the app is available in. If the app is multilingual, it should be specified as Multilingual. The language string must be in a specific format. The following strings are available: Afrikaans, Albanian, Arabic, Armenian, Basque, Belarusian, Bosnian, Breton, Bulgarian, Catalan, Cibemba, Croatian, Czech, Danish, Dutch, Efik, English, EnglishGB, Esperanto, Estonian, Farsi, Finnish, French, Galician, Georgian, German, Greek, Hebrew, Hindi, Hungarian, Icelandic, Igbo, Indonesian, Irish, Italian, Japanese, Khmer, Korean, Kurdish, Latvian, Lithuanian, Luxembourgish, Macedonian, Malagasy, Malay, Mongolian, Norwegian, NorwegianNynorsk, Pashto, Polish, Portuguese, PortugueseBR, Romanian, Russian, Serbian, SerbianLatin, SimpChinese, Slovak, Slovenian, Spanish, SpanishInternational, Swahili, Swedish, Thai, TradChinese, Turkish, Ukrainian, Uzbek, Valencian, Vietnamese, Welsh, Yoruba.
Trademarks (optional) is any trademark notifications that should appear. For example, HappyApp is a trademark of Acme, Inc. Note that double quotes in this field will be converted to single quotes.
InstallType (optional) is if you would like the app listed as a specific install type within the menu. For some apps that are packaged by language (like Mozilla Firefox), the language may be specified on this line. In installers with optional components, this line is automatically updated by the installer based on the details within installer.ini (see below). The InstallType will be shown within the PortableApps.com Platform in the app's details.
[License] section: (all values are either
Please do not include double quotes within these fields
Shareable is whether the app is allowed to be copied from one drive to another (without the
OpenSource is whether the app is fully open source under an OSI approved license
Freeware is whether the app is free (no cost)
CommercialUse is whether the app is allowed to be used in a business environment. It does not indicate permission to commercially distribute. This field will be renamed to eliminate confusion is a later update.
EULAVersion (optional) is used to indicate the version of the End User License Agreement used if you include EULA.txt and require the user to agree to a license to install. If you are using an EULA and omit this entry, the default, 1, will be used.
Please do not include double quotes within these fields
PackageVersion is the version of the package itself. This must be in 126.96.36.199 format with no other characters and must be incremented with each public release.
DisplayVersion is the user-friendly version that is generally used to describe the version. So, a released app may have a DisplayVersion of
2.4 Revision 2 but a PackageVersion of
Within the optional
Plugins (optional) is the path to an app's user-added plugins directory if it is within the App directory (as it is with applications like Firefox). This path is excluded when the installer calculates how much free space is needed for an upgrade. If there is no plugins directory, this value should be omitted from appinfo.ini.
Within the optional
UsesGhostscript (optional) specifies whether the portable app makes use of Ghostscript Portable. If needed, this value should be set to yes. If not needed, it should be omitted or set to no. If Ghostscript adds optional functionality but is not required for normal operation, this value should be set to optional.
UsesJava (optional) specifies whether the portable app makes use of Java Portable. If needed, this value should be set to yes. If not needed, it should be omitted or set to no. If Java adds optional functionality but is not required for normal operation, this value should be set to optional. The deprecated values of true/false will be interpreted as yes/no.
UsesDotNetVersion (optional) specifies which minimum version of the .NET framework the application requires. If needed, this value should be set to the minimum version the application requires (example: 1.1, 2.0, 3.0, 3.5, 4.0). If a specific service pack of a given version is required, it can be added after the version number (example: 2.0SP2, 3.0SP1). If using 4.0, it is assumed the app only needs Client Profile. If it needs the full framework, that can be specified as 4.0F. There is also a special value of 2-4 for apps that can run on .NET 2.0 and 4.0/4.5 which will work on Windows Vista through Windows 10 out of the box. If .NET is not needed, this value should be omitted.
Please note that PortableApps.com currently only accepts apps that run on .NET 2 and 4 at present as they will work on all Windows Vista and later PCs. Additional .NET versions will be added in the future.
Please do not include double quotes within these fields
Icons is the number of icons that the app has in the PortableApps.com Menu
Start is the command line to execute to start the app relative to the
AppNamePortable directory. This will typically be
ExtractIcon (optional) is used if the app's appropriate appicon.ico within the AppInfo directory. This should only be used when legally required for launchers in specific apps as it cause the application to be accessed more slowly. When not needed it should be left out of appinfo.ini. This option is only available for apps with a single icon.
ExtractName (optional) is used if the app's appropriate name is not the name of the portable launcher indicated in the appinfo.ini. This should only be used when legally required for launchers in specific apps as it cause the application to be accessed more slowly. When not needed it should be left out of appinfo.ini. This option is only available for apps with a single icon.
BaseAppID (optional) is the app ID used by Windows for taskbar pinning. Adding this will allow platform versions 16 and later to create a pinnable shortcut for local use.
BaseAppID64 (optional) is the app ID used by Windows for taskbar pinning when the app is running on a 64-bit system. Adding this will allow platform versions 16 and later to create a pinnable shortcut for local use.
Sometimes, an application will have multiple icons, as is the case with OpenOffice.org Portable. In this case, the last section of the appinfo.ini file will look like:
[Control] Icons=2 Start=AppNamePortable.exe Start1=AppNamePortable.exe Name1=AppName Portable Start2=AppNamePortable2.exe Name2=AppName Portable Other Part
Icons is still the number of icons to be shown in the PortableApps.com Menu
Start is the command line to execute for the main application
Start1 is the command line for the first icon (often the same as Start)
Name1 is the name to show in the menu for the first icon
Start2 is the command line for the second icon
Name2 is the name to show in the menu for the second icon
Like the main icon, ExtractIcon1, ExtractIcon2, etc can be used where legally required. These should not normally be used or included.
Within the optional
This section allows a portable app to advertise to the platform what types of files (documents, audio files, etc) or protocols (http, torrent, etc) it is capable of opening. For applications that do not need to associate themselves with any files or protocols, this section should be omitted.
FileTypes (optional) is a comma-delimited list of file type extensions that the app is capable of opening. Examples include txt, html, doc, etc.
FileTypeCommandLine (optional) is a command line parameter which should be passed to the AppNamePortable.exe launcher in order for the app to properly open a file. The %1 indicates the point at which the file will be passed. For most apps capable of opening a file just by passing it to the launcher, FileTypeCommandLine is unnecessary and should be omitted.
FileTypeCommandLine-extension (optional) is a command line parameter which should be passed to the AppNamePortable.exe launcher in order for the app to properly open a specific file type with extension being the given file type (Example: FileTypeCommandLine-html= or FileTypeCommandLine-doc=). The %1 indicates the point at which the file will be passed. The FileTypeCommandLine-extension is only necessary when a given app has a different command line for different file types and will override the standard FileTypeCommandLine for the extension indicated. For most apps, this is unnecessary and should be omitted.
Protocols (optional) is a comma-delimited list of protocols that the app is capable of handling. Examples include http, mailto, torrent, etc.
ProtocolCommandLine (optional) is a command line parameter which should be passed to the AppNamePortable.exe launcher in order for the app to properly open a protocol. The %1 indicates the point at which the file, URL or string will be passed.
ProtocolCommandLine-protocol (optional) is a command line parameter which should be passed to the AppNamePortable.exe launcher in order for the app to properly open a specific protocol with 'protocol' being the given protocol to open (Example: ProtocolCommandLine-http= or ProtocolCommandLine-torrent=). The %1 indicates the point at which the file, URL or string will be passed. The ProtocolCommandLine-protocol is only necessary when a given app has a different command line for different protocols and will override the standard ProtocolCommandLine for the protocol indicated. For most apps, this is unnecessary and should be omitted.
SendTo (optional), when set to true, indicates whether a given app should be shown in the Windows Send To submenu. This is only appropriate for a small subset of apps (antivirus, for instance) and should generally be omitted.
SendToCommandLine (optional) is a command line parameter which should be passed to the AppNamePortable.exe launcher in order for the app to properly process whatever is sent in a SendTo command. The %1 indicates the point at which the file(s)/path(s) will be passed.
Shell (optional), when set to true, indicates whether a given app should be available as a Windows shell. This is only appropriate for very specific and should generally be omitted.
ShellCommandLine (optional) is a command line parameter which should be passed to the AppNamePortable.exe launcher in order for the app to properly process the %I and %L variables sent to the shell by Windows.
Within the optional
This section allows a portable app to define custom icons for any of the file types the app can handle listed in the [Associations] section described previously. This section is only needed for file types that are not built into the PortableApps.com Platform. The built-in file types and categories are as follows:
- archive: 7z, bzip2, cab, gz, gzip, rar, tar, zip, wim, xz, z
- audio: aac, aif, iff, flac, m3u, m3u8, m4a, mid, midi, mp3, mpa, ogg, pls, ra, wav, wv
- calendar: ical, icalendar, ics, ifb, vcs
- chart: (no defaults)
- code: ada, ads, adb, asm, asp, aspx, au3, bas, c, cmake, h, hpp, hxx, cpp, cc, cs, css, d, diff, patch, es, iss, java, js, jsp, lua, m, mak, nsi, nsh, pas, inc, pl, pm, plx, php, php3, phtml, pro, ps1, py, pyw, r, rb, rbw, rc, sql, vb, vbs, xml, xsml, xsl, xsd, wsdl
- contact: vcard, vcf
- database: db, odb, sqlite
- diskimage: cue, img, iso
- drawing: ai, eps, odg, otp, sda, sdd, sgv, std, svg, svgz, sxd
- document: abw, djvu, doc, docm, docx, dotx, dotm, fodt, odt, ott, pdf, rtf, stw, sxw, uot, ps
- ebook: azw, cbr, cbz, epub, lrf, lrx, lit, mobi
- font: fnt, otf, ttf
- image: ani, bmp, cur, ico, jpg, jpeg, gif, ora, pcx, png, psd, tif, tiff, xcf
- java: jar
- presentation: odp, otp, sxi, sti, sxd, pps, ppsx, ppt, pptm, pptx, pot, sdd, sdp
- spreadsheet: gnumeric, ods, ots, sxc, stc, xls, xlc, xlm, xlw, xlk, sdc, csv, xlsx, xlsm
- text: cfg, inf, ini, log, nfo, txt, text
- torrent: torrent
- video: 3gp, asf, avi, flv, mp4, m4v, mpe, mpeg, mpg, mkv, mov, ogm, qt, rm, rmvb, webm, wmv
- webpage: html, htm, mht, mhtml, shtml, xhtml, xhtm, xht
For file types not on that list, the
[FileTypeIcons] should contain one entry for each filetype that needs a custom icon associated. Each entry can be set to a category above (archive, audio, calendar, etc), 'app' meaning the portable app's main icon should be used, or 'custom' meaning that the associated icons will be included in the App\AppInfo\FileTypeIcons directory as described in the Icons section below. Any associated file types included in the [Associations] section but not defined by the platform or listed here will default to the 'app' icon.
An example section of [FileTypeIcons] might look like this:
[FileTypeIcons] swf=video ttp=custom qwe=app AllOtherIcons=image
In this example, the file type swf will have the platform's built in video icon used for its files, the file type sqe will have the app's main appicon.ico icon used for its files, and the file type ttp will have a custom icon included in App\AppInfo\FileTypeIcons. The final entry, AllOtherIcons, is used as a catch all for any icons associated with the app but not defined by the platform or in the FileTypeIcons section. It is useful for apps like image viewers that support hundreds of uncommon image formats without needing to write out an entry for each format or have to use the app's main icon. Information on the custom icons is at the end of the Icons section.
AppNamePortable\App\AppInfo directory, the icons used by the PortableApps.com Installer and within the PortableApps.com Menu are located. The icons are included in ICO and PNG format. The main icon is called
appicon_128.png*. If the application also uses multiple icons (as detailed above), these additional icons are named as
appicon2.ico, etc. The numbers correspond to Start1, Start2, etc within the Control section.
* Note that the 75px and 128px variant are optional and not required by the installer to compile. However, publishers are encouraged to include these high-resolution icon for upcoming features in the platform and for better graphics in the installer on Windows 10.
The PNG icons are 16x16, 32x32, 75x75 and 128x128 respectively and are in True Color format with alpha transparency.
The ICO file is in Windows ICO format and contain the following 6 required formats as well as the optional Vista format if desired:
- 16px - 256 color (8-bit)
- 32px - 256 color (8-bit)
- 48px - 256 color (8-bit)
- 16px - True Color + Alpha (32-bit / XP format)
- 32px - True Color + Alpha (32-bit / XP format)
- 48px - True Color + Alpha (32-bit / XP format)
- 256px - True Color + Alpha PNG (32-bit PNG / Vista format) *OPTIONAL/RECOMMENDED
* The 256px alpha size is optional but recommended. It is used by Windows Vista/7/8 to display large and extra large icon sizes. Some publishers may wish to include it for completeness but end users won't normally see it.
ExtractIcon Note - In packages that make use of the ExtractIcon feature within appinfo.ini, the appicon.ico and PNG versions of the icon will not be used and may be omitted. A generic appicon.ico will be included for backwards compatibility.
In addition to the app icon, additional file type icons will be stored within the
AppNamePortable\App\AppInfo\FileTypeIcons directory. These are custom icons for use with only this app as defined in the previously-mentioned [FileTypeIcons] section of appinfo.ini. For each entry in the [FileTypeIcons] section, an associated ICO and PNG files should be included in the FileTypeIcons directory. These icons follow a similar format and naming as the main app icons. If a 'swf' were set to 'custom' in [FileTypeIcons], for example, then the files swf.ico, swf_16.png, swf_32.png and swf_128.png would be placed within the
AppNamePortable\App\AppInfo\FileTypeIcons directory. For the special AllOtherIcons entry, files of AllOtherIcons.ico, AllOtherIcons_16.png, AllOtherIcons_32.png, AllOtherIcons_128.png would be used.
Please note that we have partially deprecated the AppCompactor for use with official releases. While still permitted on publisher's own apps, we recommend against using it for your own apps due to increases in false positives with antivirus engines.
The PortableApps.com AppCompactor is used to shrink software to better fit on smaller removable devices and run quicker over bandwidth-limited removable media. Normally, the AppCompactor is entirely automatic in settings and just needs to be run on the AppNamePortable directory of the portable app. Occasionally, some software is incompatible with the AppCompactor and its automated routines cannot detect the incompatibility. Additionally, sometimes additional files of a specific app should be compressed and the AppCompactor doesn't normally handle them. In these cases, the AppCompactor.ini may be used.
The AppCompactor.ini resides in the AppInfo directory alongside the AppInfo.ini and Installer.ini. An example of the file follows:
[PortableApps.comAppCompactor] FilesExcluded=msvcm90.dll|msvcp90.dll|mscvr90.dll AdditionalExtensionsExcluded=pyd|irc AdditionalExtensionsIncluded=example|beta
Note: If you do not plan on using the PortableApps.com AppCompactor to shrink your app or do not need to make changes to its standard compression setup, this section should be omitted.
FilesExcluded are any files you would like excluded from an AppCompactor run separated by pipes |.
Note that the files listed in the example are excluded by default (Visual C++ runtime 9.0) as well as the 7.1, 8.0, and 10.0 versions of the same files.
AdditionalExtensionsExcluded is any additional types of files (extensions) that you would like to exclude from the compaction separated by pipes |.
AdditionalExtensionsIncluded is any additional types of files (extensions) that you would like to include in the compaction separated by pipes |.
CompressionFileSizeCutOff is the cutoff point at which to ignore files for compression in bytes. The default is 4096, meaning files 4K in size and smaller are ignored.
All apps in PortableApps.com Format must use the most recent PortableApps.com Installer available at PortableApps.com/development. The installer gets its configuration from the appinfo.ini file above as well as the optional installer.ini file which also resides in the AppInfo directory. The installer.ini file allows for more fine-grained control over the installation process as well as additional options like optional sections. The installer.ini consists of:
Please note that this example is only included to illustrate the possible options. It should not be included as-is in a project. For projects, an installer.ini should be created from scratch using only the features needed.
[CheckRunning] CloseEXE=Custom.exe CloseName=AppName [Source] IncludeInstallerSource=false [MainDirectories] RemoveAppDirectory=true RemoveOtherDirectory=true [OptionalComponents] OptionalComponents=true MainSectionTitle=AppName Portable (English) [Required] MainSectionDescription=Install the portable app OptionalSectionTitle=Additional Languages OptionalSectionDescription=Add multilingual support for this app OptionalSectionSelectedInstallType=Multilingual OptionalSectionNotSelectedInstallType=English OptionalSectionPreSelectedIfNonEnglishInstall=true OptionalSectionInstalledWhenSilent=true OptionalDirectory1= OptionalFile1= [CopyLocalFiles] CopyLocalFiles=true CopyFromRegPath=HKLM\Software\AppName CopyFromRegKey=AppPath CopyFromRegRemoveDirectories=2 CopyFromDirectory=%PROGRAMFILES%\AppName CopyToDirectory=App\AppName [DownloadFiles] AdditionalInstallSize= DownloadURL= DownloadKnockURL= DownloadName= DownloadFilename= DownloadMD5= DownloadTo= AdvancedExtract1To= AdvancedExtract1Filter= DoubleExtractFilename= DoubleExtract1To= DoubleExtract1Filter= Download2URL= Download2KnockURL= Download2Name= Download2Filename= Download2MD5= Download2To= Download2AdvancedExtract1To= Download2AdvancedExtract1Filter= Download2DoubleExtractFilename= Download2DoubleExtract1To= Download2DoubleExtract1Filter= CustomCodeUses7zip= [Languages] ENGLISH=true ENGLISHGB=true AFRIKAANS=true ALBANIAN=true ARABIC=true ARMENIAN=true BASQUE=true BELARUSIAN=true BOSNIAN=true BRETON=true BULGARIAN=true CATALAN=true CIBEMBA=true CROATIAN=true CZECH=true DANISH=true DUTCH=true EFIK=true ESPERANTO=true ESTONIAN=true FARSI=true FINNISH=true FRENCH=true GALICIAN=true GEORGIAN=true GERMAN=true GREEK=true HEBREW=true HINDI=true HUNGARIAN=true ICELANDIC=true IGBO=true INDONESIAN=true IRISH=true ITALIAN=true JAPANESE=true KHMER=true KOREAN=true KURDISH=true LATVIAN=true LITHUANIAN=true LUXEMBOURGISH=true MACEDONIAN=true MALAGASY=true MALAY=true MONGOLIAN=true NORWEGIAN=true NORWEGIANNYNORSK=true PASHTO=true POLISH=true PORTUGUESE=true PORTUGUESEBR=true ROMANIAN=true RUSSIAN=true SERBIAN=true SERBIANLATIN=true SIMPCHINESE=true SLOVAK=true SLOVENIAN=true SPANISH=true SPANISHINTERNATIONAL=true SWAHILI=true SWEDISH=true THAI=true TRADCHINESE=true TURKISH=true UKRAINIAN=true UZBEK=true VALENCIAN=true VIETNAMESE=true WELSH=true YORUBA=true [DirectoriesToPreserve] PreserveDirectory1= [DirectoriesToRemove] RemoveDirectory1= [FilesToPreserve] PreserveFile1= [FilesToRemove] RemoveFile1=
The entire installer.ini is optional. If it is omitted, the App and Other directories will be replaced and the installer will either be a single language (as specified in appinfo.ini) or multilingual and include all supported languages. The source for the installer will not be included.
Within the optional
CloseEXE (optional) allows you to assign a custom EXE to check for when upgrading. If the EXE is the same as that specified in the Control - Start option in appinfo.ini, this entry should be omitted from the installer.ini. If you don't want to check if anything is running you can set
CloseEXE=NONE (use uppercase) but this should be done with caution as a user could try to upgrade your app while it's running.
CloseName (optional) allows you to assign a different name to what will be closed when upgrading. If the name is the same as the name of the portable app as specified in appinfo.ini then this entry should be omitted from the installer.ini.
Within the optional
IncludeInstallerSource (optional) allows you to include the source to the PortableApps.com Installer to be installed with your portable app by setting it to true.
Within the optional
RemoveAppDirectory, RemoveDataDirectory and RemoveOtherDirectory (optional) allow you to specify whether these directories will be removed or preserved when upgrading by installing a new version of your app over an existing one. By default, the App and Other directories are removed and the Data directory is preserved. If you wish to use these defaults, this section of installer.ini should be omitted. (Note that you can preserve specific directories and files below)
Within the optional
OptionalComponents - when set to true, this enables the installer to have an optional section. This is typically used to install additional languages within an app.
MainSectionTitle (optional) specifies the name that will appear for the first section of the installer. By default it will read "AppName Portable (English) [Required]" with AppName Portable being read from the appinfo.ini. This entry should be omitted if you are happy with the default.
MainSectionDescription (optional) specifies the description that will appear for the first section of the installer. By default it will read "Install the portable app". This entry should be omitted if you are happy with the default.
OptionalSectionTitle (optional) specifies the name that will appear for the second/optional section of the installer. By default it will read "Additional Languages". This entry should be omitted if you are happy with the default.
OptionalSectionDescription (optional) specifies the description that will appear for the second/optional section of the installer. By default it will read "Add multilingual support for this app". This entry should be omitted if you are happy with the default.
OptionalSectionSelectedInstallType (optional) specifies the InstallType that will be written to appinfo.ini and displayed in the PortableApps.com Platform if the user installs the app with the optional section. By default it will read "Multilingual". This entry should be omitted if you are happy with the default.
OptionalSectionNotSelectedInstallType (optional) specifies the InstallType that will be written to appinfo.ini and displayed in the PortableApps.com Platform if the user installs the app without the optional section. By default it will read "English". This entry should be omitted if you are happy with the default.
OptionalSectionPreSelectedIfNonEnglishInstall (optional) specifies whether the optional section is selected by default if the user selected to run the installer in a language other than English. The default is true. This entry should be omitted if you are happy with the default.
OptionalSectionInstalledWhenSilent (optional) specifies whether or not the optional section is installed when the installer is running in silent mode when launched from the platform's app installer. This entry defaults to true when the optional components are not additional languages.
OptionalDirectory1 allows you to specify which directories are a part of the optional section of the installer. OptionalDirectory1 and higher are available for use. The path should be relative. So if you want the directory App\AppName\locales part of the optional section of the installer, you'd set
OptionalDirectory1=App\AppName\locales in this section.
OptionalFile1 allows you to specify which specific files are a part of the optional section of the installer. OptionalFile1 and higher are available for use. The path should be relative. So if you want the files App\AppName\*.lang part of the optional section of the installer, you'd set
OptionalFile1=App\AppName\*.lang in this section.
Optional Section Note: You must use either OptionalDirectory1 or OptionalFile1 to specify files for inclusion in the optional section of the installer if you have one.
Within the optional
This section is used to copy files in from a local installation of an application.
CopyLocalFiles is used to indicate that this section is enabled. It should be set to true.
CopyFromRegPath is used when the path to the local files is indicated within a key in the registry. Generally, this will be in the form of HKLM\Software\AppName.
CopyFromRegKey is used in conjunction with
CopyFromRegPath. It indicates the Key within the registry path above that should be used.
CopyFromRegRemoveDirectories is used to indicate the number of directories to strip from the Key read in to arrive at the directory that should be copied. If the Key indicates a path to a file rather than a directory, it should be increased by one. For example, if the Key generally points to C:\Program Files\AppName\bin\AppName.exe and you wish to copy all the files in C:\Program Files\AppName, it would be set to 2: one to remove the file name AppName.exe and one to remove the 'bin' directory from the path.
CopyFromDirectory is used to indicate the local directory to copy into the portable app. If used in conjunction with the registry entries above, it will be used as a fallback if the registry entry is missing or doesn't point to a valid path. This entry is normally in the form
%PROGRAMFILES%\AppName. Several environment variables are available including: %PROGRAMFILES%, %COMMONFILES%, %DESKTOP%, %WINDIR%, %SYSDIR%, %APPDATA%, %LOCALAPPDATA% and %TEMP%.
CopyToDirectory indicates the relative path within the portable app that the files will be copied to. This is usually in the form
App\AppName. If the directory does not exist, it will be created.
Within the optional
This section is used to download and optionally extract files from the internet.
AdditionalInstallSize is used to specify the size of the files that will be added to the files contained within the installer. The entry should be a number only and be in KB
DownloadURL specifies the URL to the file that will be downloaded. It is normally in the form http://example.com/path/filename
DownloadKnockURL specifies a URL that must be downloaded before the file specified by DownloadURL is downloaded.
DownloadName is the name that will be displayed while the file is downloaded. This must be a valid DOS name and should not include special characters like :, ", \, etc.
DownloadFilename is the name of the file that will be used while it is worked with locally. This should normally be the same as the filename from the DownloadURL. It is normally in the form filename.exe or filename.zip.
DownloadMD5 is used to specify the MD5 hash of the file downloaded. This allows the installer to verify that the file has not changed since the installer was created. Use of this entry is *highly* recommended.
DownloadTo is optionally used if the downloaded file should just be copied into the portable app as-is. The entry is normally in the form
App\AppName. This entry is not to be used with the extraction entries that follow.
DownloadCachedByPAc is used to indicate to the PortableApps.com Platform when a live download is cached by PortableApps.com. The installer itself won't use the cache but will when installed or updated via the PortableApps.com Platform's App Store.
AdvancedExtract1To and AdvancedExtract1Filter are used for more advanced extraction from ZIP files as well as many installer EXEs. The AdvancedExtract#To entries should specify the relative path to where the files will go within the installed portable app (typically App\AppName). The AdvancedExtract#Filter entries are used to specify a filter for the files to be extracted and are in the same format used by 7-zip. Some examples include *.txt for all text files, * for all files, *a* for files that contain the letter a, Src\*.cpp for all cpp files within the src directory, etc. ** can be used to indicate all files in the archive recursively (including sub-directories). Up to 10 entries can be made. AdvancedExtract#To supports the use of
<ROOT> to indicate the app's root directory.
Note that the deprecated Extract1To, etc configuration is automatically converted to AdvancedExtract1To, etc configuration as you compile an older PA.c Format app to the newer format
DoubleExtractFilename is used when a downloaded file contains an archive within an archive. The DoubleExtractFilename should be set to the name of the archive inside the archive. For example, if you are downloading a file called setup.exe which contains a file data.zip that has the files needed within it, DoubleExtractFilename would be set to data.zip. The DoubleExtract#To and DoubleExtract#Filter are performed on the extracted archive and are in the same format as AdvancedExtract1To and AdvancedExtract1Filter above. Up to 10 entries may be used. DoubleExtract#To supports the use of
<ROOT> to indicate the app's root directory.
Download2URL, Download2KnockURL, Download2Name, Download2Filename, Download2MD5, Download2To, Download2CachedByPAc serve the same purpose for a second downloadable file as their counterparts without the 2.
Download2AdvancedExtract1To, Download2AdvancedExtract1Filter, Download2DoubleExtractFilename, Download2DoubleExtract1To, Download2DoubleExtract1Filter serve the same purpose for a second downloadable file as their counterparts above without the Download2 prefix.
CustomCodeUses7zip can be set to true if you need to handle calling 7z.exe from the command line within your custom code. Note that 7z will automatically be included if AdvancedExtract1To, DoubleExtract1To, Download2AdvancedExtract1To, or Download2DoubleExtract1To are set.
Within the optional
Each entry is used to specify whether that language is available as a user is installing the portable app and appinfo.ini is set to Multilingual. If this section is omitted, all languages are included. If this section is included, ENGLISH= is required. All other languages are optional and default to false.
Within the optional
This section specifies directories that will be preserved even if a given directory (App, Data, Other) is set to be removed on an upgrade. Up to 10 entries in the form of PreserveDirectory1, PreserveDirectory2, etc are available. Each should be in the relative paths within the app. If you wish to preserve the directory App\AppName\plugins, it would be entered as
PreserveDirectory1=App\AppName\plugins within this section. If no directories need preserving, this section should be omitted.
Within the optional
This section specifies directories that will be removed even if a given directory (App, Data, Other) is set not to be removed on an upgrade. Up to 10 entries in the form of RemoveDirectory1, RemoveDirectory2, etc are available. Each should be in the relative paths within the app. If you wish to remove the directory App\AppName\locales, it would be entered as
RemoveDirectory1=App\AppName\locales within this section. If no directories need removing, this section should be omitted.
Within the optional
This section specifies files that will be preserved even if a given directory (App, Data, Other) is set to be removed on an upgrade. Up to 10 entries in the form of PreserveFile1, PreserveFile2, etc are available. Each should be in the relative paths within the app. If you wish to preserve the files App\AppName\*.hlp, it would be entered as
PreserveFile1=App\AppName\*.hlp within this section. If no files need preserving, this section should be omitted.
Within the optional
This section specifies files that will be removed even if a given directory (App, Data, Other) is set not to be removed on an upgrade. Up to 10 entries in the form of RemoveFile1, RemoveFile2, etc are available. Each should be in the relative paths within the app. If you wish to remove the files App\AppName\*.lang, it would be entered as
RemoveFile1=App\AppName\*.lang within this section. If no files need removing, this section should be omitted.
An End User License Agreement (EULA) or other licensing file can be displayed in the PortableApps.com Installer by including an EULA.txt file in the App\AppInfo directory. The PortableApps.com Installer will automatically locate it and configure it for use. Please ensure that the license is in Unicode format and not ANSI.
Custom Code may be included with your installer by including a file called PortableApps.comInstallerCustom.nsh within the Other\Source directory. This file is coded in NSIS and can include 3 macros: CustomCodePreInstall (which is run before installation), CustomCodePostInstall (which is run after installation) and CustomCodeOptionalCleanup (which is run at the beginning of installation if the optional section of an installer is not selected, intended for use in app upgrades when the existing app may have had the optional section included). In addition to the standard NSIS functions, the following NSIS features are available: ConfigRead, ConfigReadS, ConfigWrite, ConfigWriteS, GetParent, GetRoot, VersionCompare and the LogicLib features of NSIS. Please ensure that the file is Unicode encoded (not ANSI/DOS).
The PortableApps.com Installer code itself should not be altered directly within the confines of it being a PortableApps.com Installer. As always, the source code is available under the GPL and may be freely modified and used in other GPL-licensed works.
Every release of an app in PortableApps.com Format must use the current PortableApps.com Installer. If a larger application is being compiled that has a longer development and testing time, and a new version of the PortableApps.com Installer is released during testing of a release the version of the installer the app is currently using may be kept provided that the new Installer version is less than 30 days old on the day the application using the older version is released.
The PortableApps.com Installer will keep logging information on installer generation and actual app installs within a file called pac_installer_log.ini stored within the AppInfo directory. This file should be excluded from git repositories via the appropriate gitignore configuration. Details within the log file include whether or not the installer was run, when the installer package was created, when the app was actually installed, the version of the installer wizard used to generate the installer, the version of the installer run when it was installed, and other logging information which may be added in the future. This file should not be altered or removed other than by the official PortableApps.com Installer. Portable apps may utilize this file to track install times and proper install methods.
During use, a portable app is permitted to modify registry entries and files on the local drive, however the registry and local files must be returned to their pre-run state on exit. This may involve backing up and then restoring the settings for a local copy (in either the registry or APPDATA) of an application on start and exit. The portable app must continue to work (settings and preferences maintained, language selection maintained) as the drive letter changes as the device is moved between computers. The applications Most Recently Used (MRU) file list should continue working as well.
In addition to standard installers, the PortableApps.com Installer can be used for plugin installers to add files to a portable app. This is accomplished via a file called plugininstaller.ini within the App\AppInfo directory. This file can contain all of the entries within the appinfo.ini and installer.ini files described above combined into a single file. One addition to the file is within the [Details] section where an entry called PluginName= is made. This should be the name of the plugin, for example: Adobe Flash for Firefox Portable. The [MainDirectories] removal options all default to false for plugin installers. If an EULA is needed for the plugin, instead of EULA.txt, the files PluginEULA.txt should be used.
To create a plugin installer, create a directory layout similar to the portable app that the plugin is used with including the App, App\AppName, Data, Other, etc directories. Then place only the files to be included in the plugin installer in their appropriate location. The App\AppInfo directory should be empty other than the plugininstaller.ini as it is used only by the main app. Any custom code should be in a file called PortableApps.comInstallerPluginCustom.nsh within Other\Source. Finally, create a file plugininstaller.ini with the entries that would normally be in appinfo.ini and installer.ini above and compile as normal.
Additionally, a CommonFiles installer, which will install to X:\PortableApps\CommonFiles is possible by adding an entry
PluginType=CommonFiles to the details section. This is for use with specific plugins that are used by multiple apps (Java, for example) as designated by PortableApps.com. In this case, The [MainDirectories] removal option for App is set to true by default and will remove the entire X:\PortableApps\CommonFiles\AppID directory (which is usually desired for CommonFiles plugins.
Applications packaged in PortableApps.com Format using our tools must be done in accordance with local and international law. Freeware may be packaged using the PortableApps.com Installer but only if the installer is unmodified and in its original form as distributed by PortableApps.com. Freeware may only be packaged by the original publisher or with the express consent of the publisher. Commercial software may be packaged by contacting PortableApps.com.
2019-01-07 3.5: Added BaseAppID64
2018-10-12 3.5: Added BaseAppID
2018-08-28 3.5: Added Hindi language support
2018-05-07 3.5: Added special 2-4 entry for .NET 2 and 4 support
2017-09-10 3.5: Added CustomCodeUses7zip
2017-06-01 3.5: Added installer logging and DownloadCachedByPAc
2017-04-02 3.4: Added ExtractName and BaseAppName to appinfo.ini
2017-03-12 3.4: Added permissions section
2016-08-19 3.4: Added second downloadable file and associated Download2 entries in installer.ini
2016-06-26 3.3: Added notes on not using double-quotes in various sections
2016-05-13 3.2: Extract automatically switched to AdvancedExtract, AppCompactor deprecated
2016-01-02: 3.0: Added appicon_75.png for new installer features on Windows 10
2014-10-10: 3.0: Removed RemoveDataDirectory ability from installer.ini
2014-06-23: 3.0: Added Added md filetype
2014-05-07: 3.0: Added Added ora filetype
2014-02-08: 3.0: Added DownloadKnockURL and Donate
2013-12-06: 3.0: Added gnumeric to filetypes
2013-07-26: 3.0: Added UsesGhostscript to Dependencies section
2012-05-11: 3.0: Added es, pro, m3u8, and rc filetypes
2012-05-03: 3.0: Added pps/ppsx to presentations
2012-04-18: 3.0: Added Shell and ShellCommandLine to the Associations section
2012-04-17: 3.0: Added SendToCommandLine to the Associations section
2012-04-16: 3.0: Added AHK file type
2012-04-09: 3.0: Added SendTo to the Associations section
2012-04-09: 3.0: Added assocations of files/protocols and custom file type icons, moved EULA to AppInfo
2012-02-12: 2.0: Added default file exclusion info to appcompactor.ini
2011-11-13: 2.0: Added new yes/optional/no Java entries and updated .NET handling with SPs
2011-05-31: 2.0: Fixed some missing and misspelled languages in the example appinfo.ini and installer.ini
2011-04-12: 2.0: Added CompressionFileSizeCutOff to AppComactor.ini
2010-08-01: 2.0: Added AppComactor.ini
2010-06-14: 2.0: Added Armenian to supported languages and updated ExtractTo to be clear it has been deprecated.
2010-06-03: 2.0: Added OptionalSectionInstalledWhenSilent, 128px PNG icons, 11 languages, full Unicode support, Operating System category removed, Security category added.
2010-02-26: a few minor spelling and grammar fixes.
2009-11-19: 1.0: Added Dependencies, general cleanup.
2009-06-21: 0.91: Added CommonFiles installers, ability to extract full directory structures recursively.
2009-06-21: 0.91: Added Esperanto.
2009-06-11: 0.91: Added plugin installer details.
2009-05-28: 0.91: Added CopyLocalFiles and DownloadFiles to installer.ini. Added PNG icons.
2009-05-15: 0.90: Updated to new automated PortableApps.com Installer. New appinfo.ini and installer.ini configs.
2009-02-12: DRAFT 4: Added Education category and clarified installer modification notes.
2008-08-05: DRAFT 3: Added Vista 256px icon (optional) and updated PortableApps.com Installer notes.
2008-05-01: DRAFT 2: Added DefaultData description as we use it in many apps and the installer will be supporting it as well (handy for language setups) and the fact that the Data directory must be recreated by the app if missing, which is new but done by all released apps but one.