Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Running a shortcut on the desktop
Message
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows Server 2003
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01126097
Message ID:
01127325
Views:
10
Using a Foxpro program I found, there aren't any properties for the link?

Description:
Path:
Arguments:
Workingdirectory:

Are all blank, is this the problem? Do I need a special syntax since the link is not like a normal one?






>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
Previous
Reply
Map
View

Click here to load this message in the networking platform