Rick said:
Hi,
Are you installing as administrator? A regular user account will not have
write privileges to system folders outside of their user environment.
Rick:
Thanks for the reply. Yes, I am installing under an administrator
account (not the Administrator). Vista complains that the setup program
is not signed, and then there is a UAC Window, but that is par for
the course with Vista, I think.
Actually, I have found part of the cause here. It has to do with how
32-bit programs are installed on 64-bit OS's.
On Both XP x64 and Vista x64 my program is installed to
C:\Program Files (x86)\MyCompany\MyApp\MyApp.exe
If I look in this location in Explorer, the program is there with its
application icon on both platforms (I misspoke before about Vista x64).
On XP x64, the shortcut is installed to
C:\Documents and Settings\All Users\Start Menu\Programs\Myapp
My application icon is there, and the target is the above location. So
all is good in XP x64.
In the new and confusing Vista, the shortcut is installed to
C:\ProgramData\Microsoft\Windows\Start Menu\Programs\MyApp
<rant>
I just do not see the point to this gratuitous change of directory
structure. If I right-click on the Start button, I still see Explore All
Users, but it sends me to this ProgramData place.
</rant>
However, the target is
C:\Program Files\MyCompany\MyApp\MyApp.exe
The (x86) is missing, see? The shortcut actually works (somehow), but
this is why the icon is missing - the target is "wrong". Worse yet, if I
click on the "General" tab of the shortcut Properties, a message comes
up that
C:\Program Files\MyCompany\MyApp\MyApp.exe
is not a valid target, and refuses to open the tab (preventing me
initially from finding where the shortcut actually was; I only found it
by looking in Vista x86, where everything works correctly).
If I manually change the target to
C:\Program Files (x86)\MyCompany\MyApp\MyApp.exe
then everything is fixed. The icon appears on the shortcut, and I can
explore the Properties of the shortcut.
The same problem occurs on Vista x64 with other 32-bit programs, e.g.
Mozilla Firefox. Here, strangely, the icon is present on the shortcut,
but the target is "wrong" and the same error message appears if I try to
look at the General tab,
OTOH, for a pre-installed program like 32-bit Internet Explorer, the
shortcut has the correct target
C:\Program Files (x86)\Internet Explorer\iexplore.exe
Do other people see these things on Vista x64? I hope this is a bug in
Vista x64, and not a problem with my new installer (InnoSetup).
Next problem: file associations.
David Wilkinson