I have two EXE files, both are actually python scripts, converted using pyinstaller ( Using Auto Py to Exe ).
file1.exe : is the app. file2.exe : is license app, which checks the license, if ok it executes file1, if not it exits.
My problem is that when I merge the two exe files to be in 1 exe file as a result, file2.exe can not find file1.exe unless I copy it to the same directory.
pyinstaller command:
pyinstaller -y -F --add-data "D:/test/file1.exe";"." "D:/test/file2.py"
Now I should have something like this:
file2.exe
+------- file1.exe
But each time I run file2.exe it gives me this error
WinError 2] The system cannot find the file specified: 'file1.exe'
till I copy file1.exe to the same directory (as it neglecting that I already merged it in pyinstaller) so the files tree looks like this:
file1.exe
file2.exe
+------- file1.exe
the command line in file2 to launch file1 is :
os.system('file1.exe')
How can I fix that?