Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Icon missing on one lnk but not the other using WSH
Message
De
28/06/2000 19:36:09
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Titre:
Icon missing on one lnk but not the other using WSH
Divers
Thread ID:
00386212
Message ID:
00386212
Vues:
52
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 )
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform