Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Running .prg from icon on desktop
Message
 
To
30/01/2004 14:38:02
Russ Dawson
Interra Credit Union
Indiana, United States
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00872358
Message ID:
00872583
Views:
16
I think you need to create a desktop shortcut?? If so, I just got this the other
day from this great service. I think but am not positive this will start a prg file.
It came from Sergey. Thanks so much. Even if you are new to vfp you will see that
all you need to do is to substitute in your program info under cFileName and ...LinkName,
Then put this program into a prg and run it to create your shortcut. I don't however
know how to position the shortcut in any particular place on the desktop. Maybe someone
else does.
Steve

*******************
cFileName = "c:\vfp\myGreatProgram.exe" && put the address of your program here
cLinkName = "Click here to start myGreatProgram" && this text on the icon

oShell = CREATEOBJECT('WScript.Shell')
cDesktop = oShell.SpecialFolders('Desktop')
oLink = oShell.CreateShortcut(cDesktop + "\" + cLinkName)
oLink.TargetPath = cFileName
oLink.Save()
Previous
Reply
Map
View

Click here to load this message in the networking platform