InstallBuilder does not provide the PID identifier. However, what you can do is use timestamp and random value to create a unique, temporary directory - such as:
<createTimeStamp> <format>%Y%m%d%H%M%S</format> <variable>unique_timestamp</variable> </createTimeStamp> <generateRandomValue> <length>10</length> <variable>unique_random</variable> </generateRandomValue> <setInstallerVariable> <name>unique_temp</name> <value>${system_temp_directory}/${unique_timestamp}_${project.shortname}_${unique_random}</value> </setInstallerVariable>
You can then use <createDirectory>
to create the directory and then do <deleteFile>
in <postUninstallerCreationActionList>
and <installationAbortedActionList>
to delete the directory when installation finishes or is cancelled.