Python commands from NSIS
Hi,
I'm trying to run a Python script from the NSIS installer, but it doesn't work.
Here's my NSIS code:
||
|| NSIS section:
||
|| Section "Main " SEC01
|| SetOutPath "$INSTDIR\"
|| File "C:\Test\ReadMe.txt"
|| File "C:\Test\a.py"
|| ExecWait "C:\Python25\python.exe $INSTDIR\a.py"
|| SectionEnd
||
Here's the code of a.py:
||
|| import os
|| os.remove('C:\Documents and Settings\HP
USER\Desktop\Example1\ReadMe.txt')
||
According to the NSIS logs, the line: "ExecWait
"C:\Python25\python.exe $INSTDIR\a.py" is executed, but the ReadMe.txt
file is not deleted.
I've also tried "ExecWait $INSTDIR\a.py", but it didn't work either.
What am I doing wrong?
Also, is there a way to see the console of the python script that runs
from NSIS?
Please assist.
Thanks in advance!