We are trying to fetch installer path/name from the MAC UI installer before displaying the Custom nib file.
Below are the options tried:
hdiutil info -plist- Getting the environment variable
$PACKAGE_PATH - Scanning the current directory
ps -eaffor listing the installer process name.
I needed to perform the same task today and the best approach I've discovered is to
tailorcatthe/var/log/install.logfile just after the pkg is launched & grep for".pkg".This prints the path & name of the most recently launched pkg file. From there, I can parse the line of the last occurrence to extract my own installer's path & name:
Note: So far, I've only tested this on Big Sur 11.6. The log syntax may differ on older or newer versions. I expect, though, that it hasn't changed much over the years.