I have a batch file "test_msg_bat.bat" which works fine from command line but returns the error below from python subprocess popen.
Error: 'msg' is not recognized as an internal or external command, operable program or batch file.
Here is the python code:
import subprocess, os
env = os.environ
p = subprocess.Popen("test_msg_bat.bat", env=env)
Batch file ("test_msg_bat.bat"):
type C:\abcd.txt | msg /time:60 /w %username%
OS: Windows 7 (64 bit)
Python version: 2.6.6 (32 bit)
Edit: This works when using 64-bit python