Hola
A mi esta version me funciona...
#include 'fivewin.ch'
/*
Function : pLnk()
Descripcion : Crear accesos directos
Autor : Carles Aubia
Fecha : 04.07.2006
Modificacion : 22.11.2010
Observaciones: El acceso es via CreateObject()...
*/
/* Testing...
FUNCTION Main()
MsgInfo( pLnk( 'c:\windows\system32\calc.exe' ) )
MsgInfo( pLnk( 'c:\windows\system32\calc.exe',;
'c:\calc2.lnk',, 'calc.exe,0' ) )
RETU NIL
*/
*---------------------------------------------------
FUNCTION pLnk( cFile, cNameLnk, cWorkingDir, cIcon )
*---------------------------------------------------
LOCAL oShell, oLnk
DEFAULT cFile := ''
DEFAULT cNameLnk := ''
DEFAULT cWorkingDir := ''
DEFAULT cIcon := ''
IF !File( cFile )
RETU .F.
ENDIF
IF Empty( cNameLnk )
cNameLnk := cFilePath( cFile ) + cFileNoExt( cFile ) + '.lnk'
ENDIF
IF Empty( cWorkingDir )
cWorkingDir := cFilePath( cFile )
ENDIF
TRY
oShell := CreateObject( "Wscript.Shell" )
CATCH
MsgAlert( 'Error Create object WScript.Shell', 'Error' )
RETU .F.
END
oLnk := oShell:CreateShortcut( cNameLnk )
oLnk:TargetPath := cFile
oLnk:WindowStyle := 3
IF !Empty( cIcon )
oLnk:IconLocation := cIcon
ENDIF
IF !Empty( cWorkingDir )
oLnk:WorkingDirectory := cWorkingDir
ENDIF
* oLnk:description := 'Hola calc...'
* oLnk:Hotkey := "CTRL+ALT+SHIFT+X"
oLnk:Save()
RETU .T.
Salutacions.