How to do limited shareware number of times run?

Blitz3D Forums/Blitz3D Beginners Area/How to do limited shareware number of times run?

StOrM3(Posted 2004) [#1]
I was wondering, what would be the best way to implement a number of times run for a shareware app, to limit the number of times run to 10, then make the app not run anymore. I want it to be secure in that, the cust doing a system restore won't reenable it, and also, that just trying to uninstall it or reinstall it, won't make it able to be run again etc.. Something similar to how milkshape registration thing works.

Has anyone implemented this, or have any code / ideas on how to do it ? Either post them here, or shoot them to my email at storm3@....

Thanks

Ken


electronin(Posted 2004) [#2]
Hey StOrM3, you can do this by installing an extra file or registry key with your program, and write a little bit of extra code at the beginning. For example:
file=ReadFile("runsleft")
times=ReadByte(file)
If times<=0;if it's expired, pop up a message telling the user
RuntimeError "Your shareware version of the program has expired!"
Else;if it hasn't expired, write the times left to the file
times=times-1
CloseFile file
file=WriteFile("runsleft")
WriteByte(file,times)
CloseFile file
EndIf

Hope that helps!


Warren(Posted 2004) [#3]
There's no need to go overboard on it and worry about security and such. Just do something basic like what electronin suggested. People just need a push to register if they're honest ... if they aren't, they're going to defeat whatever you put into place anyway.

A simple way to overcome the uninstall/reinstall thing is to write the value into the registry. Then it's always there, regardless of uninstalling/installing processes. The average user isn't going to spend time trolling their registry looking for the key.


Agamer(Posted 2004) [#4]
but they might!


Warren(Posted 2004) [#5]
If you treat your customers like criminals, that's how they'll behave.

Use some protection, fine, but don't go overboard. Remember, the more complicated of a scheme you end up using, the wider you're opening the door for problems.


electronin(Posted 2004) [#6]
If you want to do it with the registry, here is the awesome userlib that will let you do so.


StOrM3(Posted 2004) [#7]
Thank you, this is what I was looking for. As always you guys respond in a timely manner with good insight.

Thanks alot.

Ken

PS. I'm not going to treat them like criminals, it's just that when I release the beta to some people here at work, I don't want them posting it on the net for everyone to grab, I want to be able to release the shareware version on the net, without everyone already having a fully functioning version, provided via someone on my beta team.

Thank you.


Warren(Posted 2004) [#8]
My advice? It's going to be pirated. It is. There's nothing you can do about it, so don't sweat it too much. Do the bare minimum checking for the shareware version, but you're going to have to accept that it's going to be warezed.

The both of my games have been. No game is price cheaply enough that they won't steal it.


StOrM3(Posted 2004) [#9]
Yea, and also have to look at it this way, its a great way to get more exposure also. So it is bad, but it's also good in a certain way.


Michael Reitzenstein(Posted 2004) [#10]
And my advice? Finish off the rest of the game before you worry about copy protection!


Warren(Posted 2004) [#11]
Well, I wouldn't call it a "great" way to get exposure, but I guess it does have that side effect to some small degree...


StOrM3(Posted 2004) [#12]
exactly.. I mean, I don't know if alot of people think about it this way or not, but alot of the exposure ID got for wolfenstein and doom came from the copies people made for their friends and stuff, even the shareware version.. It's not great, because it does take away from profit, that's why their has to be a certain set of protection put in place, to deterr that activity a little bit, but some copies going around will help in the long run as far as exposure for the company and the game, most people will buy something if they really really use it, like me, all the tools I use for development, I have bought and paid for, like milkshape, tattoo, image forge, visual blitz, blitz3d, 3D Rad, etc..


*(Posted 2004) [#13]
the way I would do this is simply have a var somewhere in the EXE this could be a string with RL=3 in it when you look in the EXE the string will be there then seekfile to this point and overwrite the byte 3 with 2 etc and in blitz check the string and if it says RL=0 whack up the purchase screen. Or you could use a file located in the 'windows' directory although this may not work on some windows versions due to security issues.


Difference(Posted 2004) [#14]
@EdzUp :
You can read from, but not write to a running exe.
Also: A reinstall would remome the values.

@StOrM3:
If it is an application, limit it in some way. Disabling save seems to be popular.

If it is a game, experiment with different demo versions.

Limit the number of levels and/or disable multiplayer etc. Do this untill you find a good combo, by monitoring your sales.


Warren(Posted 2004) [#15]
And EdzUp's solution fails to pass the uninstall/reinstall criteria. Reinstalling will overwrite the EXE and therefore reset the counter.


*(Posted 2004) [#16]
this is why I also 'suggested' the file in the windows dir, another classic is to put a hidden file in the root dir of the selected drive.


electronin(Posted 2004) [#17]
Good idea. btw, how would you make a file hidden from blitz? maybe a WINAPI call?


StOrM3(Posted 2004) [#18]
yes is there a userlib that does api calls to create a file, and make its attributes hidden or system and readonly etc.. ? This would work best in combination with a reg entry. Any suggestions or ideas about how to do it ? Use VB to make a DLL file with a function created that does this, and then export the function and make a dll file ?


Pineapple(Posted 2004) [#19]
At some point, your game/app is gonna be distributed illegally, though, when you release it as shareware... cut a load of things from it, like file saving, certain options disabled... but still give the user enough to do so he/she can decide if your app is for him/her!!!

Also, make them register the product at a website, but get them to confirm their email address before they download, maybe give them a special little key... like Blitz does, so for any updates, they've got to register a UID!!!

At the end of the day, when releasing anything, including CD/DVD's, GAMES etc ect, you've got to trust your customers about how they use your product... And you've got to understand... everyone cannot be trusted!!!

Dabz

:)


Neo Genesis10(Posted 2004) [#20]
If you really want to be secure - try putting the registry setting in the CLSID portion. Its like a maze in there and no amount of searches will likely dig up your app.