Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Comunicados
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
29285 Discussões

Creating a desktop shortcut from within Fortran

michael_green
Principiante
721 Visualizações

Hi All,

I've created an installation program for an application, which does everything except place a shortcut on the user's desktop. I've seen references as to how this can be done in Visual Basic, but does anyone know how to create a desktop shortcut for an application from within Fortan?

With many thanks in advance,

Mike

0 Kudos
2 Respostas
Jugoslav_Dujic
Contribuidor valorado II
721 Visualizações
Actually, it's fairly ugly, as it involves invoking COM-based shell API IShellLink. See XFTFile::XCreateShorcut; due to inherent ugliness, I recommend using as-is (!DEC$DEFINE XLITE if you need just XFTFile rather than full Xeffort).

Have you tried InnoSetup (+ISTool) setup tools instead of reinventing the wheel? They're fairly simple to use.
anthonyrichards
Novo colaborador III
721 Visualizações
A brief look shows that you probably need to use Shell functions from Shell32.dll, such as SHGetSpecialFolderLocation and SHFileOperation. However wheras my version of SHELL32.F90 in CVF 6.6 contains an interface for the latter function, it does not contain an interface for the former function. Maybe Intel Fortran has more Shell function interfaces available.
Responder