Question Locked

Fixed Alias Problem With MAC opertaing system

0 helpful
2 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

We have built our application using InstallAnywhere. On a MAC / Intel MAC
machine, we are observing a peculiar event that we believe lies with
InstallAnywhere tool. If we install the application for the first time using
InstallAnwhere on a machine, the application gets installed without any
issues and a desktop icon gets added. On clicking on the desktop icon of the
application, it runs as per the expectations. But if we install the
application again on the same machine using InstallAnywhere ( we leave it on
the Installer to uninstall the previous version of the application), the
InstallAnywhere uninstalls the previous version, deletes the icon and
freshly installs the new version and also creates the desktop icon. But on
clicking on the desktop icon of the application, an error dialog is
displayed on the screen as follows:

Delete Alias, Fix Alias, OK

If we select "Fix Alias", then InstallAnywhere directly opens the
application folder where the app file of the application is available. On
setting this file manually by selecting it, the application runs without the
problem. This problem does not arise again in future installation of the
same application.

If we select "Delete Alias" from the dialog, the desktop icon gets deleted.
On running the application from Start menu, it once again throws the same
dialog. The problem continues to remain for future installations also. This
peculiar behavior is not observed in other operating systems. Can you please
let us know the reason behind this problem? It would be great if you can let
us know how this issue can be resolved.

The current versions MAC that we are using are:

MAC : 10.3.9

2 replies

by jmsignup

I posted this on another forum and thought it might help here:

I was having the same problems recently with an installer. I think you're right that the Finder's cache is getting outdated with the hard drive. I did a few tests with the terminal, and I think the Finder's cache can get outdated following terminal actions.

Here's a telling test: when the alias is broken again (and you're sure it shouldn't be broken), open a Finder window to where the alias (that is, the symbolic link) points to. Then close the Finder window and try the alias again. In my testing, the alias now works. This suggests to me that the Finder needs to be reminded that the target now exists again. It's caching is out of date. It's seems that the Finder pays more attention to a directory being deleted rather than created.

Now, I've found a few solutions to this issue:
1. Open a Finder window to where the alias is pointing (described above).
2. Restart the computer.
3. Relaunch the Finder.
After each one of these actions, the Finder's cache should be up to date enough to have a working alias for your application.

I found Option 3 to be the best option. You can relaunch the Finder in the Apple -> Force Quit... window. However, I think AppleScript is the best way to relaunch the Finder. I used the terminal command osascript to run these two scripts:
1. Quit the Finder
tell application "Finder"
quit
end tell
2. Launch the Finder (activate the Finder)
tell application "Finder"
activate
set frontmost to false
-- enable the next line for OS X 10.3
-- close home
end tell

Two scripts are needed because I couldn't get the Finder to activate after quiting it because I think the reference is to the old "Finder" which has terminated. I found on OS X 10.3 that the Finder opened a window to the user's home directory (but this didn't happen on OS X 10.4). Setting the frontmost property to false keeps the focus on your installer instead of losing focus to the Finder when it gets relaunched.

I hope this helps. I don't know all of the ends and outs of the Mac or the Finder...I'm actually not much of a Mac user. Please also forgive me if the exact syntax of the AppleScripts isn't correct. I'm not at the Mac right now :) Hope this helps!

This discussion is closed to new replies.