Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Icon missing on one lnk but not the other using WSH
Message
 
To
28/06/2000 19:36:09
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00386212
Message ID:
00386217
Views:
17
It's probably the icon file and has nothing to do with WSH. The icon file must contain one 16X16 icon for small icon views (i.e. details view in explorer) and one 32X32 icon for large icon views (i.e. the desktop).

>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
Rip Ryness
International Falls, MN
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform