Internal .exe not showing in folder

I need to place a .exe file within my final exeout software.

For example:

  • Have a folder called “math” and within the folder is math.exe along with a few other folders.

When I am looking at the “math” folder in file manager, all the folders are shown, but not the math.exe file?

What I wish to accomplish is use the script:

procedure RunACompiledProgram;
var
MyProgram: String;
begin
MyProgram := UnpackTemporaryResource("math/math.exe");
RunAProgram(MyProgram, "", ExtractFilePath(MyProgram), false, SW_SHOWNORMAL);
end;  

Then I want to call “math.exe” from a toolbar button using HEScript Function: UserMain.runacompiledprogram

Not working. Since the “math.exe” is not showing up in folder within the file manger, maybe why not working?

I often over complicate things… What can I do to make this work?

Have looked at Not Found | ExeOutput for PHP - PHP to EXE Compiler Software - Make Windows Apps but 404 error. There are a few threads here (some mine) but none have helped.

Maybe if you try with :

S := IncludeTrailingBackslash(ExtractFilePath(GetGlobalVar(“HEPublicationFile”,“”)));

Then :

MyProgram := UnpackTemporaryResource(S + “math/math.exe”);

Thank you @Gilmichel, will give that a try today and post back the results.

Unfortunately that does not work @Gilmichel No errors or anything:

procedure RunDaMath;
var
MyProgram: String;
begin
S := IncludeTrailingBackslash(ExtractFilePath(GetGlobalVar(“HEPublicationFile”,“”)));
MyProgram := UnpackTemporaryResource(S + “math/math.exe”);
end;

I have to wonder if reason is: the math.exe is not showing in filemanager? The .exe listed even though fact is it’s in folder.

Wish @gdgsupport was more active on the forums :slight_smile: Real drag to wait days for help…

You need also to declare: S

procedure RunDaMath;
var
MyProgram: String;
S: String;
begin
S := IncludeTrailingBackslash(ExtractFilePath(GetGlobalVar(“HEPublicationFile”,“”)));
MyProgram := UnpackTemporaryResource(S + “math/math.exe”);
end;

Opps, missed that. Added and still not opening the math.exe from math folder.

I do not understand why math.exe not showing in filemanager under Application Root, Real Paths or Virtual Paths. Starting to think this is another bug or exeout set to ignore .exe files in folders. Even moved to Application Root and still not showing in filemanager.

Thank you for your help @Gilmichel , much appreciated.

1 Like

For the missing .EXE file in the File Manager, it’s because ExeOutput by default excludes EXE files from automatic scanning:


Just remove .EXE and retry.

Dang, did not recheck that setting. When I installed exeout 2020, removed that default setting since I occasionally do use .exe files. Just checked a project I did 2 months ago with 2020 and the internal .exe is working.

Not sure how .exe got added back to the exclude files list…

Thanks for getting me back on track.