Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Running a shortcut from within Foxpro
Message
From
23/04/2003 14:27:31
Len Wooden
Statistical Resources, Inc
Baton Rouge, Louisiana, United States
 
 
To
23/04/2003 14:21:01
Len Wooden
Statistical Resources, Inc
Baton Rouge, Louisiana, United States
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Miscellaneous
Thread ID:
00780657
Message ID:
00780737
Views:
10
>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
Previous
Reply
Map
View

Click here to load this message in the networking platform