Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Put an Icon in a WSH Script?
Message
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00478045
Message ID:
00478823
Views:
27
>I am shelling out from my VFP app to a WSH VBScript file. How can I staple an icon on to the executing script?
>
>Thanks.

Do you mean a shortcut icon?
if so I use this
** MakeSC()
LPARAMETERS tcLink, tcTargetPath, tcDescription, tcWorkingDirectory
LOCAL loShell, loShortcut, lcDesktop
loShell = CREATEOBJECT("WScript.Shell")
lcDesktop = loShell.SpecialFolders("Desktop")
loShortcut = loShell.CreateShortcut(lcDesktop + "\\" + tcLink + ".lnk")
loShortcut.TargetPath = tcTargetPath
loShortcut.WindowStyle = 1
loShortcut.Description = tcDescription
loShortcut.WorkingDirectory = tcWorkingDirectory
loShortcut.Save()

And the icon is carried over from the exe, I am also having icon problems
Stephen McLaughlin
"Sexy Steve Valenteno", "Blastmaster"
stephenmclaughlin@gmail.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform