Shortcut problems in component

D

Doug G

My system boots and runs from the D: partition, which is EWF protected, but
some of the app-specific files are stored on C: on the target system. In my
original application component, I created a couple of shortcuts to go into
the Startup menu to run apps from drive C when the system boots. So in the
DstPath field of the Shortcut resource I had something like
"C:\MyApp\bin\app.exe" (without the quotes). This has been working fine and
the .lnk shortcuts are generated correctly in the target image.

Recently we decided to go to a more standard directory scheme, so my
application is now under the "Program Files" directory on the C drive. So I
modified my shortcuts to read "C:\Program Files\MyApp\app.exe" (note no
predefined directory symbols since I want to force drive C, and not the
system drive which is D). Well, after the image is built, my shortcuts are
actually created as "D:\Program Files\...". It looks like someone is
recognizing the "C:\Program Files" string and assuming that I meant the
system-drive directory. It's not the "C:" alone that is being changed, as it
did not do this when I had the "C:\MyApp" form of the string in there.

Anyone know how to force the shortcut to be created as "C:\Program
Files\..."? I tried putting some quotes into the resource definition itself,
but this caused some different weirdness. My workaround right now, since I'm
on a bit of a deadline, will be to edit the shortcuts manually before
resealing. But it would be nice to know if there is an actual fix for this.

Doug Gordon
 
K

KM

Doug,
My system boots and runs from the D: partition, which is EWF protected, but
some of the app-specific files are stored on C: on the target system. In my
original application component, I created a couple of shortcuts to go into
the Startup menu to run apps from drive C when the system boots. So in the
DstPath field of the Shortcut resource I had something like
"C:\MyApp\bin\app.exe" (without the quotes). This has been working fine and
the .lnk shortcuts are generated correctly in the target image.

Recently we decided to go to a more standard directory scheme, so my
application is now under the "Program Files" directory on the C drive. So I
modified my shortcuts to read "C:\Program Files\MyApp\app.exe" (note no
predefined directory symbols since I want to force drive C, and not the
system drive which is D). Well, after the image is built, my shortcuts are
actually created as "D:\Program Files\...". It looks like someone is
recognizing the "C:\Program Files" string and assuming that I meant the
system-drive directory.

If you used FBA Shortcut resource, TD does that for some system known directories (c:\windows\,C:\Program Files, etc.)
It's not the "C:" alone that is being changed, as it
did not do this when I had the "C:\MyApp" form of the string in there.

Anyone know how to force the shortcut to be created as "C:\Program
Files\..."? I tried putting some quotes into the resource definition itself,
but this caused some different weirdness. My workaround right now, since I'm
on a bit of a deadline, will be to edit the shortcuts manually before
resealing. But it would be nice to know if there is an actual fix for this.

An easiest way I found to avoid such problems was to not use FBA Shortcut resources but create my own .LNK files manually and just
have them copied to appropriate directories (e.g., under Start Menu) through a component File section.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top