Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Sending shortcuts to users desktops on W98 W2K WinXP 200
Message
De
30/03/2006 04:37:15
Jon Neale
Bond International Software
Wootton Bassett, Royaume Uni
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 8
OS:
Windows XP SP1
Network:
Windows 2000 Server
Database:
Visual FoxPro
Divers
Thread ID:
01109071
Message ID:
01109078
Vues:
22
Not sure if this will work in 98 but try it:

loShell = Createobject('WScript.Shell')
? loShell.SpecialFolders("MyDocuments")
? loShell.SpecialFolders("DeskTop")

Jon

>I am trying to save a LNK file to users desktops using the following code:
>
>
>cFileName = "\\baker\apps\QuestPDMHangers\CheckHanger.bat"
>cLinkName = "CheckHanger002.LNK"
>cDestination = "C:\Documents and Settings\lewisn\Desktop"
>
>oShell = CREATEOBJECT('WScript.Shell')
>olink = oShell.CreateShortcut(cDestination +"\"+ cLinkName)
>oLink.TargetPath = cfilename
>oLink.Arguments = "00001"
>oLink.Save()
>
>
>The problem is cDestination assumes the windows OS path is C:\Documents and Folders. IS there a global way of sending files to the desktop. i.e. \\\desktop. The reason I ask is that some users may have windows 98 which doesnt have this path for its desktop.
>
>Any suggestions?
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform