Running BAT file via ShellExecute

Tech-Archive recommends: Fix windows errors by optimizing your registry



I kick off a BAT file from within my VFP7 app with something like this...

lcPath = "C:\MyPath"
lcFile = "MyFile.BAT"
CD (lcPath)
ShellExecute( 0, "open", lcFile, "", "", 2 )

All works OK.

However, if lcPath has a value of [\\MyPC\c\MyPath] the ShellExecute doesn't
seem to work.

SYS(5) + SYS(2003) return the expected value of [\\MyPC\c\MyPath] at that
point.
FILE(lcPath + "\" + lcFile) returns .t.

Any ideas?

Brian


.