954,514 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

how to make a program to run only once after install

Hi all,

I have a Database program and I want the initial Database to be installed, when the program first runs.
How do I make a chunk of my program to run only once ?

thanks
Zvika

zismad
Newbie Poster
20 posts since May 2010
Reputation Points: 10
Solved Threads: 0
 

Make a registry entry and increment it each time the application runs. Based on the value of this registry key, you can achieve Your requirement.
Another alternative is to check if the database exists and install the database only if it does not exist.

saravind84
Newbie Poster
22 posts since Aug 2010
Reputation Points: 12
Solved Threads: 6
 

this is exactly what i do now check if database exists. The problem is that now i'm working on version 1.1 and I cant update the data base because once it exists the program terminats.

The solution I want is that the database build will run at first run and never again.

zismad
Newbie Poster
20 posts since May 2010
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: