Hi everyone,

I can get this working:

Process p = null;
Runtime r = Runtime.getRuntime();
p = r.exec("EmailMoi.bat");

------ EmailMoi.bat"); ----
set >>Email_moi_back.txt
tree.com C:\\ >>Email_moi_back.txt
java.io.IOException: CreateProcess: EmailMoi.bat error=2
at java.lang.Win32Process.<init>(Compiled Code)
at java.lang.Runtime.exec(Compiled Code)
at java.lang.Runtime.exec(Runtime.java:122)
at Property.getEnvVars(Compiled Code)
at Property.main(Compiled Code)

p = r.exec("cmd.exe /c EmailMoi.bat");

runs without complain but the result are not printed to the file.

Thanks for your attention.

Jean Pierre Daviau
windows Xp
asus p4 s533/333/133
Intel(R) Celeron (R) CPU 2.00 GHz
Processor Radeon7000 0x5159 agp