Ok, I have a solution. Not the best solution because it involves a 3rd.party, but it's ok.
I did a script (vbscript) that receives all the params and instance "VisualFoxPro.Application.9" then executes my program, passing all the params.
Just in case someone is interested, this is what the vbscript like:
Dim WSHShell
Dim oVFP9, nExitCode, cEXETool, cCMD, nDebug
Set oVFP9 = CreateObject("VisualFoxPro.Application.9")
nExitCode = 0
nDebug = 0
If WScript.Arguments.Count = 0 Then
nExitCode = 1
MsgBox "No parameters"
Else
If nDebug = 1 Then
cEXETool = Replace(WScript.ScriptFullName, WScript.ScriptName, "tst_diff.bat")
cCMD = chr(34) & cEXETool & chr(34) & " " & chr(34) & WScript.Arguments(0) & chr(34)
Else
cEXETool = Replace(WScript.ScriptFullName, WScript.ScriptName, "foxpro_plasticscm_dm.exe")
cCMD = "DO " & chr(34) & cEXETool & chr(34) & " WITH " & chr(34) & WScript.Arguments(0) & chr(34)
End If
For I = 1 To WScript.Arguments.Count - 1
cCMD = cCMD & "," & chr(34) & WScript.Arguments(I) & chr(34)
Next
If nDebug = 1 Then
MsgBox cCMD, 0, "PARÁMETROS ENVIADOS"
WSHShell.Run( cCMD )
Else
oVFP9.DoCmd( cCMD )
nExitCode = oVFP9.Eval("_SCREEN.ExitCode")
End If
End If
WScript.Quit(nExitCode)
Thanks for the help and ideas!
Fernando D. Bozzo
Madrid / Spain