If the installer.app is staged in a different directory (like /private/var) then in the jamfHelper dialogs the full path of the installer is displayed rather than just the "Install macOS High Sierra" part. To fix this you could change this line:
macOSname=$(/bin/echo "$OSInstaller" | /usr/bin/sed 's/^\/Applications\/Install \(.*\)\.app$/\1/')
to
macOSname=$(echo ${OSInstaller##*/} | /usr/bin/sed -e 's/Install \(.*\).app/\1/')
If the installer.app is staged in a different directory (like /private/var) then in the jamfHelper dialogs the full path of the installer is displayed rather than just the "Install macOS High Sierra" part. To fix this you could change this line:
macOSname=$(/bin/echo "$OSInstaller" | /usr/bin/sed 's/^\/Applications\/Install \(.*\)\.app$/\1/')
tomacOSname=$(echo ${OSInstaller##*/} | /usr/bin/sed -e 's/Install \(.*\).app/\1/')