Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Running a shortcut from within Foxpro
Message
De
23/04/2003 14:27:31
Len Wooden
Statistical Resources, Inc
Baton Rouge, Louisiane, États-Unis
 
 
À
23/04/2003 14:21:01
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:
00780737
Vues:
8
>First, allow me to wipe the egg off of my face.. here's the sample code
>
>WshShell = CreateObject("WScript.Shell")
>strDesktop = WshShell.SpecialFolders("Desktop")
>oShellLink = WshShell.CreateShortcut(strDesktop + "\Acrobat Reader 5.1.lnk")
>myCmd=oShellLink.TargetPath
>myCmd='"'+myCmd+'"'
>? "= "+ myCmd
>WshShell.run(myCmd)
>
>Apparently, I didnt realize that SpecialFolders("Desktop") was returning the currently logged on user's Desktop ala Documents and Setting\Len\Desktop and my created shortcut to a folder actually existed there.. the installed shortcuts however, exist in Documents and Settings\All Users\Desktop and that explains why my tests failed.. The real question appears to be.. how do I get a reference to All Users Desktop (is there a parameter like Desktop that I can use or do I have to use brute force)?
>
>-- Len

Found it.. AllUsersDesktop works.. which is kind of tricky.. is there no way to access the shortcut generically without prior knowledge of it being installed in user\desktop of all user\desktop ??

-- Len
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform