I noticed cookies are saved next to the .exe is there any way to store them in some temp folder and delete when .exe closed ? I dont want the user to see whats in the cookie file…
Thank you.

PHP Settings - Main Settings
Uncheck the option “Cookies are persistent …”

You may also want to have a look at using global variables instead of cookies.
See the bottom of this page

Global variables may be persistent or temporary; a persistent variable is stored in the application, in other words the variable and its value are saved in the application’s state file.
The state file looks like this if you try to read it:

xÚ=ͽ‚[email protected]ᝧ¸é^ÐÍ¡”8€:HüÙ^Ú&Ð6åVy|ûùrDµÎ¼1.Ö»’íótƒY§Kö¸7üÀ*™	ƒ!õpq£/Y½b›($]ê';(úi¸‘"„ÆNȤè0ÎO¥8·×º;žj9Fïˆa¥‘,®£
fɃ	¢Ø"Ql°ø?eö-²5ó

window.external.SetGlobalVariable(name, value, true);

The last value means to remember the variable next time app is run if set to true.
Set to false if variable not required to be remembered.

So does this mean I could have a variable set in :

window.external.SetGlobalVariable(name, value, true);

Like this:

window.external.SetGlobalVariable(runs, 5, true);

Then have some PHP code increment the number of times the .exe has been launched and when it reaches the 5 number of times have it quit working?? This would be a great way to put a timed trial on the .exe!!!???

I was going to try it with cookies, but if this could work, this would be a lot better!

I guess this will not work, since the PHP code is restarted every time the .exe is launched. There is no way to re-write to the .exe after it is launched with the new variable. Any ideas on this?


Try: window.external.SetGlobalVariable(“runs”, “5”, true);
And how are you reading the “runs” global variable at startup?

[quote=“gdgsupport”]Try: window.external.SetGlobalVariable(“runs”, “5”, true);
And how are you reading the “runs” global variable at startup?[/quote]

I’m not… this was a hypothetical concept, I haven’t actually tried it!! Would it work???

Thanks in advance…

Well, there is no reason why this would not work… You can have a trial counter in your app, and check it at application startup… If it has reached 0, you display an error message or navigate to a specific page that shows a “Trial expired” message for instance.

O.k… instead of starting a new post since this all related, I’ll continue my questions in this post…

Here it goes…

**I would like to have my finished .exe file expire after X amount of times it has been run or TIMED by number of days. **

Issues with this that I see:

**A.**  If I use the Trial Session that is held in Windows default location, then all the End User has to do is purge that and the app keeps running again?  I do not see a way that the End User can not clear the stored session of my .exe even with the purchased version ExeOutput..?  

**B.**  If I set a COOKIE either with ExeOutput or with some other means, then all the End User has to do is purge his COOKIES.  

**C**.  I can write a PHP script to "count" the number of times the app has been run, store that file on the End Users computer, but they can either find and delete that file, or give the .exe to a friend and it starts all over again on their computer.  

**D.**  If I have the .exe check for the TIME/DATE, all the End User has to do is change his computer's TIME/DATE..  

The only way I see to do this is with a PHP script that makes a call to my web server and takes a hidden PRE-SET serial number per .exe that I compile and stores that in a file on my web server with a “count” variable. Then, it writes a “count” to that file every time the .exe is launched. Checks the file prior to starting each time, if “count” reached it’s maximum X, then the app displays a message accordingly. Only drawback is that my .exe will only run with Internet Access on the End User’s computer. I can have the same PHP script test for Internet Access first, then proceed…

Is there a easier way built into ExeOutput that I have overlooked? Without the End User being able to “by pass” my .exe from counting the number of times it has run or purging the check data?

I notice you have the trial version of ExeOutput quit working for 30 days… but if I purge the Windows App settings, doesn’t this clear that??? Am I missing something???

*Thanks in advance… I’m so close to launching a finished product using your wonderful app!!!.. *


Well, it’s the same problem for all software vendors: some advanced users can bypass your software protection or even crack it… Since you have to store trial data somewhere on the PC, then it can be tracked and removed (some tools exist for that purpose).
The solution is to host trial data on a third-party location that the end user can’t access himself directly but yes, it requires an Internet connection.
BTW ExeOutput itself doesn’t expire after 30 days… It is just a legal notice to ask you to uninstall the program if you don’t finally buy it after 30 days, however it will continue working…

Thanks for the clarification…

One thing about the 30 day expiration for ExeOutput, the .exe that is created with the trial version DOES expire in 30 days correct? To clarify, if you make an .exe with the trial version, and the End User does not have ExeOutput installed, doesn’t the .exe EXPIRE in 30 days???

O.k… now on to the initial COOKIES issue… I believe I figured out what I’m going to do…

I tested this theory with PHP and an FTP server… I’m obviously not going to use an FTP connection with the final product, but for testing purposes this is what I did:

**Created an FTP account on my web server.
Added the username and password in a PHP call to the fopen command in the .exe, and was able to access a text file in the directory on my web server against an embedded serial number in the same PHP file in the .exe!!! **

It then looked at the numerical value in the file on my web server and incremented it if the set value was not reached, wrote the new value to the file, and viola, the app ran. Now, once the set value reached the limit in the file, a message was displayed to the End User that they have reached their trial time period, and I only allowed them to EXIT the app!!! It worked perfectly!!! :smiley:

I also have the PHP in the .exe check for internet connectivity upon start up… if no Internet connection, it throws a message and all they can do is EXIT the app.

The downside is each .exe file will have to be compiled with a unique serial number. This is also the file name on the web server.
The other down side is using FTP from the clients .exe. Any good sniffing software will catch the username and password from the .exe.

But that brings me to my next test… :stuck_out_tongue:

SSL or :arrow:

I have not had time to test a secure encrypted socket from my PHP yet… I will keep you updated on my progress. But if this works, I’m set!!! A perfect trial and expire combination that is pretty much bullet proof.


Yes, you can use SSL or cURL to retrieve data securely.