checking that the app is doing first time run after installation

How is the easiest way to do this?

Basically, when my app runs the first time, it’ll check my online database to see if my app was run earlier on the same machine and if the date if was first run is more than 10 days ago, it goes into trial expired mode.

So what I really want to know, how is the easist way to do this?

Cheers,
Sean

when started check for existence of a specific text file in what ever folder you like e.g. myappname.txt

if its not there, create it. If its there - not started for the first time

look in language reference for the correct folder (specialfolder)

In other words, you need a unique, hardware ID for that machine to check against your database?

If all you want to do is determine if this is the first start of the software to do setup stuff then you can simply write a text file or just add a specific record to your database.

Check out the folderitem class, specifically SpecialFolder.ApplicationData. Also look at the docs for TextInputStream and TextOutputStream.

I’d just create a text file with the date in it of the first time the application is run. Check that at start up to determine if it is there…

Like Kem said, I create a unique id using hardware items. Some examples of these include CPU SN, MAC, Hard Disk SN and others. Using these will mostly guaranty that the sn created, will be unique to that particular computer.

Tim

You know, the computer will key to see if it’s hashed hardware serial number is in a table on the online database. If it is and the date it was added is older than the date+10 - and it hasn’t been paid for, it will go into trial expired mode. I have the special folder thing down as that is where my 160mb of data is for my program.

Wait til you see it - it will blow your minds! :slight_smile: