473,406 Members | 2,273 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Restrict the installation of .net application to limited times

Hi Techies,

I have created Setup & Deployment project and installing a windows
application from that. Now i want to restrict the user to install my
application only upto 3 times.

After that it should prompt to the user to download again from the
site.

Can anyone guide me in this.

Will registry editor be useful for this..,

Expecting some quick solution

Thanx

Jul 17 '06 #1
2 1329
Yes, the registry is an option. I prefer to keep configuration in my
app directory. If you are looking for something other than the
registry and don't want to call a web service or other type of internet
check to test installation count- you can use a file and store it
someplace that it wont be removed from if the software is uninstalled.

There are all kinds of ways you can structure the file- here is just
one idea:

1) create an XML object that writes XML that looks something like this:

.... psuedo xml:

<xml>
<installs maxInstalls="3">
<installDate appVersion="{your app's version
number}">{date}</installDate>
</installs>
</xml>

- when your app runs, it can look for this file in whatever place you
choose to store it (outside the application directory so that if the
user uninstalls the file is still there. maybe the user's temp folder
or someplace you can normally read and write to).

If found, it looks for the number of install attempts and either adds
another childnode to the list (i noted only 1 install in my example) if
not, it creates it and populates it with the first install date and
version number. If the count is greater than what you specify, you
prompt the user for further action.

I would also encrypt the file to make it non-readable to people. There
are numerous easy encryption classes available.

The flaw in this is that if the user figures this out, they can delete
the file and be good to go so I fully agree that this is "security via
obscurity" - but you did ask for something quick...

You can write encrypted strings to the registry too of course, but you
can run into permission issues with the registry depending on the
user's environment so I shy away from this.

Your file does not have to be XML, but XML is easy and convenient for
this purpose.


su***************@gmail.com wrote:
Hi Techies,

I have created Setup & Deployment project and installing a windows
application from that. Now i want to restrict the user to install my
application only upto 3 times.

After that it should prompt to the user to download again from the
site.

Can anyone guide me in this.

Will registry editor be useful for this..,

Expecting some quick solution

Thanx
Jul 18 '06 #2
Thanks for your detailed information. I preferred way of Registry
editor and i got the solution

id******@msn.com wrote:
Yes, the registry is an option. I prefer to keep configuration in my
app directory. If you are looking for something other than the
registry and don't want to call a web service or other type of internet
check to test installation count- you can use a file and store it
someplace that it wont be removed from if the software is uninstalled.

There are all kinds of ways you can structure the file- here is just
one idea:

1) create an XML object that writes XML that looks something like this:

... psuedo xml:

<xml>
<installs maxInstalls="3">
<installDate appVersion="{your app's version
number}">{date}</installDate>
</installs>
</xml>

- when your app runs, it can look for this file in whatever place you
choose to store it (outside the application directory so that if the
user uninstalls the file is still there. maybe the user's temp folder
or someplace you can normally read and write to).

If found, it looks for the number of install attempts and either adds
another childnode to the list (i noted only 1 install in my example) if
not, it creates it and populates it with the first install date and
version number. If the count is greater than what you specify, you
prompt the user for further action.

I would also encrypt the file to make it non-readable to people. There
are numerous easy encryption classes available.

The flaw in this is that if the user figures this out, they can delete
the file and be good to go so I fully agree that this is "security via
obscurity" - but you did ask for something quick...

You can write encrypted strings to the registry too of course, but you
can run into permission issues with the registry depending on the
user's environment so I shy away from this.

Your file does not have to be XML, but XML is easy and convenient for
this purpose.


su***************@gmail.com wrote:
Hi Techies,

I have created Setup & Deployment project and installing a windows
application from that. Now i want to restrict the user to install my
application only upto 3 times.

After that it should prompt to the user to download again from the
site.

Can anyone guide me in this.

Will registry editor be useful for this..,

Expecting some quick solution

Thanx
Jul 18 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: 3f | last post by:
Hello; We have made a web application that people can download from our web site and installed on: Windows XP Windows 2000 Professional Windows 2003 Server Windows 2000 Server
0
by: InstallAware | last post by:
For Press Inquiries: Sinan Karaca InstallAware Software Corporation 336 Guerrero Street, San Francisco CA 94103 415 358 4094 (voice/fax) sinank@installaware.com http://www.installaware.com/ ...
2
by: Philippe PERON | last post by:
Hello, An ACCESS application (mde) is installed on a computer looking at an mdb file on the same machine. As far as I know the application is installed thru a Wise Installer script. The...
28
by: gc | last post by:
Hi, What is the purpose of the restrict keyword? gc
5
by: toddles666 | last post by:
Hi- Is there any way of restricting access to a database by application & account? For example, I only want the application APP1 to access the database using the USER1 account. I've tried to...
20
by: piggy | last post by:
I have developed an application using C# under .NET 2.0 framework. It is almost done and it is time for me to think about deploymnet to all users. I don't have any background about this and would...
2
by: SanjayAgrawal | last post by:
Hello I have to distribute the Application to my client. But I want to restrict its pirated installation. How I Can Do this, Plz Help me in this regard. ( I have Developed application using...
2
by: venkat | last post by:
Hi, i came across restrict qualifier while looking the code. I haven't able to understand what does this do?. Can some one help me how does this makes the things restrict to an specified...
0
by: Sehboo | last post by:
I have a desktop application which users can download and install. They can download, install and run the application first time. But second time, some times everything is fine, but some times...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.