How do I access an exe file with popen?


I’m trying to access an EXE file through popen but it doesn’t work. I already checked Unpack the file to virtual memory on startup.


if( ($fp = popen("7za.exe a -t7z -mx5 \"C:\Users\Me\Documents\f2fdabb5\" \"H:\\test\\\", "r")) )

But it doesnt work, it returns nothing. but file_exists and filesize returns true.

I also tried the absolute path, set to X:\Data\ but popen with X:\Data\7za.exe doesn’t work either.

How do I access an exe file packed with the program’s exe with popen?

I already read from the docs.

Any help will be helpful.

The problem is that your EXE file is virtual. Windows can’t find it for real, so the process can’t be started.
The solution is to temporarily unpack the EXE (to the temporary folder for instance) and run it as usual. You then delete it when the application closes.