473,587 Members | 2,487 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1338
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="{yo ur 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.co m 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="{yo ur 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
3034
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
1840
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/ InstallAware First (and Only) Installation Toolkit to Support .NET 2.0
2
2456
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 installation process performs an installation of ACCESS 2000 RUNTIME thru a SAGEKEY script. The application is designed to run only in within the scope of ACCESS 2000 RUNTIME. Everything works fine.
28
6397
by: gc | last post by:
Hi, What is the purpose of the restrict keyword? gc
5
2957
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 use the DB2 Governor to do this, but it seems it always allows the the first query to be processed before forcing the connection. Here is my db2gov config file: --- start config
20
3129
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 like to see if anyone can help me get started. I have read some about clickonce deployment and not sure much about this yet. Thanks for your help.
2
1297
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 Visual Basic 6.0 ) Thanx...
2
3254
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 objects. It will be good, if explained with example. Appriciate your help in this regard. Thanks,
0
148
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 they get the error which says "feature you are trying to use is on a network resource that is unavailable. An installation package for the product cannot be found. " If they see this error then no matter how many times they try to run the app,...
0
7923
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
7852
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8349
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
6629
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
5719
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5395
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
3845
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2364
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1455
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.