postflight script not creating alias with Tiger
postflight script not creating alias with Tiger
- Subject: postflight script not creating alias with Tiger
- From: Ken Hawkins <email@hidden>
- Date: Wed, 18 May 2005 09:33:31 -0400
in my postflight script that is run i have the followign bit of
scripting:
APP_DIR="Applications/PromoStudio"
APP_NAME="PromoStudio.app"
###
# note about creating the alias ...
# the strange syntax is necessary because of differences between
os10.1, 10.2, and 10.3
# 10.3 doesn't return a full colon-seperated path for a user's file,
instead it just starts
# with the user's name, which will not work for creating the alias.
LINK_FROM="$3$APP_DIR/$APP_NAME"
echo "Our linkable app is $LINK_FROM" >> $LOG_FILE
# weird thing but we have to touch the .app before we can create an
# alias
touch "$LINK_FROM"
colonfrom=`osascript -e "tell application \"Finder\" to set p1 to
(POSIX FILE \"$LINK_FROM\") as file"`
colonto=`osascript -e "tell application \"Finder\" to set p1 to
(POSIX FILE \"/Users\") as file"`
colonto=$colonto"$USER:Desktop:"
echo "Creating alias (from: $colonfrom, to: $colonto)" >> $LOG_FILE
osascript -e "tell application \"Finder\" to make new alias at
\"$colonto\" to file \"$colonfrom\""
and in my log file this is spat out:
Our linkable app is /Applications/PromoStudio/PromoStudio.app
Creating alias (from: file Macintosh
HD:Applications:PromoStudio:PromoStudio.app:, to: file Macintosh
HD:Users:ken:Desktop:)
with 10.3 this worked fine and dandy however with tiger this does not
create anything on the desktop at all so i have a couple of
questions. is this happening to anyone else? is there a new(better)
way to create aliases on a users desktop? and finally, where does the
osascript log to?
thanks,
ken;
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Installer-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden