2009/1/28 vmars <vm...@rgv.rr.com>: > I tried many combinations of "%COMSPEC% /c Del2Pas.bat" > ExecuteName := ('C:\\WINDOWS\\system32\\cmd.exe ' + AppPathExe + > 'Del2Pas.bat'); > ExecuteName := ('"%COMSPEC%/c Del2Pas.bat"'); > and many more! > but still: > > Unable to open file: "%COMSPEC%/c Del2Pas.bat" ErrorCode=0
the shell is responsible for resolving environment variables, so you need to retrieve comspec yourself with "GetEnvironmentVariable" in sysutils. henry _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal