Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Icon missing on one lnk but not the other using WSH
Message
From
28/06/2000 19:36:09
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Title:
Icon missing on one lnk but not the other using WSH
Miscellaneous
Thread ID:
00386212
Message ID:
00386212
Views:
54
I am using the WSH to create links for my application. The proper icon (the one associated with the app) showes up on the Desktop link but does not on the programs\koinonia link. I even tried to set the IconLocation property but no luck. By the way what are the index values. The example in the help file shows a 0 but does not explain what others there are and what they mean :(

Here is the code:

***********************************************************************************
*** Install the Desktop link
***********************************************************************************
oShell = CREATEOBJECT("WScript.Shell")
lcApplication = lcInstallPath + "FFA.exe"
lcDesc = "FFA Program"
lcDeskTop = oShell.SpecialFolders("DeskTop")
lcLnk = lcDeskTop + "\FFA Program.lnk"
oLNKDesktop = oShell.CreateShortCut(lcLnk)
oLNKDesktop.Description = lcDesc
oLNKDesktop.TargetPath = lcApplication
oLNKDesktop.WindowStyle = 3
oLNKDesktop.WorkingDirectory = lcInstallPath
oLNKDesktop.Save

*******************************************************************************
*** Install the Koinonia folder link
*******************************************************************************
oShell = CREATEOBJECT("WScript.Shell")
lcApplication = lcInstallPath + "FFA.exe"
lcIcon = lcApplication + ", 0"
lcDesc = "FFA Program"
lcPrograms = oShell.SpecialFolders("Programs")
lcLnk = lcPrograms + "\Koinonia\FFA Program.lnk"
oLNKKoinonia = oShell.CreateShortCut(lcLnk)
oLNKKoinonia.Description = lcDesc
oLNKKoinonia.TargetPath = lcApplication
oLNKKoinonia.WindowStyle = 3
oLNKKoinonia.WorkingDirectory = lcInstallPath
oLNKKoinonia.IconLocation = lcIcon
oLNKKoinonia.Save

return


Ed you out there

Thanks in advance
Terry
It is impossible to make programs idiot proof. Idiots are too cleaver.

MCP( Tcp/Ip )
Next
Reply
Map
View

Click here to load this message in the networking platform