Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to create multiple yet unique desktop shortcuts?
Message
De
10/09/2002 01:08:13
 
 
À
09/09/2002 19:39:41
Henry Ravichander
RC Management Systems Inc.
Saskatchewan, Canada
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00698572
Message ID:
00698628
Vues:
16
>Hi all:
>
>I have the following situation:
>
>- DirectoryA
>- DirectoryB
>- DirectoryC....and so on
>
>Each of these directories contain an executable and will be differentiated i.e., executableA.exe, executableB.exe, executableC.exe and so on.
>
>I would now like to create desktop shortcuts for each of these executables. Result - clikcing on desktop shortcut executableA should only invoke executableA.exe in DirectoryA; likewise clicking on desktop shortcut executableB should only invoke executableB.exe in DirectoryB and so on.
>
>Is this possible at all?
>
>Thank you very much for your time and suggestions.
Sure it is possible. Is this an finite number of exe's and directories or is it variable? If variable you could store linkname, exename(with path) in a table and process each record in the table passing parameters to cre8shortcuts(). If it is a finite number of shortcuts with all directories for each computer in the same place you can hard code it like the following:
*!* main procedure to create desktop shortcuts
do case 
case !Cre8Shortcut("MyEXE DirectoryA","c:\directoryA\executableA.exe")
  *!* error creating desktop icon for c:\directoryA\executableA.exe
  return .f.
case  !Cre8Shortcut("MyEXE DirectoryB","c:\directoryB\executableB.exe")
  *!* error creating desktop icon for c:\directoryB\executableB.exe
  return .f.
case  !Cre8Shortcut("MyEXE DirectoryC","c:\directoryB\executableC.exe")
  *!* error creating desktop icon for c:\directoryC\executableC.exe
  return .f.

*!* add as many as you like
endcase
HTH
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform