Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Running a shortcut from within Foxpro
Message
 
À
23/04/2003 13:05:13
Len Wooden
Statistical Resources, Inc
Baton Rouge, Louisiane, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Divers
Thread ID:
00780657
Message ID:
00780698
Vues:
11
Strange. It perfectly works for me returning 42 on success.
(Error SE_ERR_DLLNOTFOUND(32) means "A required DLL file could not be found.)
Can you run it from Windows Run dialog?


>I get a return value of 42.. which I assume indicates success.. ant value < 32 fails.. but the application didnt launch.. I removed the ? and it still doesnt launch.. I tried several different lnk files including shortcuts to folders.. and none of them appear to execute.. but they all return a 42
>
>-- Len
>
>>Is it what you need?
>>
>> DECLARE INTEGER ShellExecute ;
>> IN SHELL32.DLL ;
>> INTEGER nWinHandle,;
>> STRING cOperation,;
>> STRING cFileName,;
>> STRING cParameters,;
>> STRING cDirectory,;
>> INTEGER nShowWindow
>>? ShellExecute(0,"open","C:\WINNT\Profiles\z01yxr\Desktop\iftplo~2.lnk","","",1)
>>
>>>Anyone know if you can run a shortcut within VFP? For whatever reason I have a user that would like to have the ability to execute a known shortcut (.lnk) file instead of executing whatever is in the Target field of the shortcut..
>>>
>>>The part that stumps me is that the shortcut can be run from DOS but it cant be run from the RUN command within VFP. I've took a look at WshShell and nothing appears to work there either. The WshShell.Run allows you to tap into the programs that are responsible for opening other files but it still doesnt allow you to run the .lnk file.
>>>
>>>Any ideas?
>>>
>>>-- Len
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform