Home page arguments

I’m using ExeOutput to generate the EXE of a website but locally, I use for instance the address : http://localhost/index.php?mode=debug when I need to display specific information.

Is there a solution to launch the EXE with a parameter in the command to open this specific address (with the argument) instead of index.php only?

Thanks in advance for your help.

Try this:

Thank you for this proposal but this could be just an option to be used as a parameter of the Exe to be modified before launch.
For exemple, we could run “software.exe /mode=debug” and it will call the page with this parameter and without this “option”, it just call the default address…
This could be useful in case of debug instead of keeping debug mode activated in the application.

Interesting idea. We’ll see whether this can be added.

Actually, this feature already exists and will be documented in next update.

Edit the UserMain script and modify the “Homepage” global variable:

Then the correct URL is displayed:

So in your case, to detect parameters, you can modify the code above to:

procedure OnStartMainWindow;
 // When the main window is going to be displayed (just before the homepage is shown).
 if ParamStr(1) = "/mode=debug" then
 SetGlobalVar("HomePage", "index.php?debugmode=1", false)
1 Like

This is wonderful! Thank you so much, you make my day!

This is a great solution!
For those who would like to use this solution, I just added a shortcut to the application.exe and in the target part, I simply added /mode=debug
C:<somewhere>\application.exe /mode=debug

This is fantastic!
Thanks again and have a good day!

1 Like