Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Running a shortcut on the desktop
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows Server 2003
Network:
Windows 2003 Server
Database:
Visual FoxPro
Divers
Thread ID:
01126097
Message ID:
01127318
Vues:
14
Weird! Still getting the same error.

>Maybe this is something with user rights? Try it with full name not with Short.
>
>o1 = CREATEOBJECT([wscript.shell])
>
>*** If this shotcut is placed in All Users Desktop folder cghange following line to
>*** lcUserDeskTop = o1.SpecialFolders(0)
>
>lcUserDeskTop = o1.SpecialFolders(4)+[\MyFile.LNK]
>*Declare INTEGER GetShortPathName IN WIN32API STRING lpszLongPath, STRING @lpszShortPath, INTEGER lBuffer
>*LOCAL lcShortName
>*lcShortName = SPACE(254)
>*lnReturn    = GetShortPathName(lcUserDeskTop,@lcShortName,254)
>o1.Run(lcUserDeskTop,3,.f.)
>
>
>
>>Hi Borislav
>>
>>Nearly there, tried your code on a simple foxpro exe on my desktop and works fine.
>>
>>But when I run it on the Windows 2003 server with the VPN connection shortcut I get:-
>>
>>OLE Error code 0x80070057: the parameter is incorrect.
>>
>>Any ideas
>>
>>TIA
>>
>>>>Whoops! Lets start again!
>>>>
>>>>Hi! I'm writing a transfer program that makes use of a VFP link.
>>>>
>>>>At times the VPN link gets disconnected for varous reasons.
>>>>
>>>>I have a shortcut set up to connect the vpn link. Can I run this icon from a Foxpro program if the VPN link appears to be down?
>>>>
>>>>Many thanks in advance
>>>
>>>
>>>o1 = CREATEOBJECT([wscript.shell])
>>>
>>>*** If this shotcut is placed in All Users Desktop folder cghange following line to
>>>*** lcUserDeskTop = o1.SpecialFolders(0)
>>>
>>>lcUserDeskTop = o1.SpecialFolders(4)+[\MyFile.LNK]
>>>Declare INTEGER GetShortPathName IN WIN32API STRING lpszLongPath, STRING @lpszShortPath, INTEGER lBuffer
>>>LOCAL lcShortName
>>>lcShortName = SPACE(254)
>>>lnReturn = GetShortPathName(lcUserDeskTop,@lcShortName,254)
>>>o1.Run(LEFT(lcShortName,lnReturn),3,.f.)
>>>
Rob
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform