Good day community,
I have completed vb.net program (a school timetabling program) and I am in the process to create a website. At the moment word -press on wamp server and parallel Microsoft Expression Web 4. To sell the program off the website, either clickonce or downloaded, I request the customer to input the school name. The school name is displayed on all printouts and specific to the school. Qustion: How would I get the school name into the programs settings before or while the program is installed so on first startup it displays the school name. ? Is this at all possible?
Thanks for reading this.

You may take a look at Click Here and to the custom Config Class. Then you may set a property into the class, so the first time the application is run, establish setup parameters once typed the correct user and password -perhaps encrypted-, and finally set that flag property to 'done'.

Also, you may use MSBuild to get a build for each school -a longer but more secure way-.

...or a Visual Studio Macro: Here

Thanks for the reply.
I read the articel in the link. What I don't want is to hard code into the program. So what I think of is this: Customer goes to the website, likes the program, pays and than get redirected to the download site. Here the customer is requested to put the school name in. Possibilty1: I could generate a textfile that is downloaded with the program and at startup the program reads the textfile, moves the name encoded into settings and as plain text into settings again. The text is used to display the school name on print outs and checks against the encoded name that nor manipulation has taken place. That way every customer basically gets a differently activation. But is this possible or is there a better way?

Well, honestly this escapes a bit my usual work and what you're telling seems the first approach, which is possible but requires encrypting the passwords, for example. If you really want to secure the passwords the only way I see is a macro (or similar to automatize the build) to produce a build for each school. So each time before compiling you (or the automatized version) change the settings file with the current school's data (name, address and so on).

You're welcome, but you may think it this way: if the school (the customer) downloads a file with all the passwords it'll be possible to crack down. You can't (as far as I know) change a build -signed or not- to add, change or remove a file from it, unless compiling again. So, if you ask for user (school) and password on the website: or the download is build on the fly or there is one custom download ready for each user.

Of course if you consider so, after the application is installed on the client -common to all schools-, the application could connect again to internet, ask then for user and password, download the configuration file of that user and, finally, activate the application.

Thanks for your thoughts on this and I marked you up a point. I just wonder how large companies are doing this but haven't found anything on the web. I shall keep thinking about it.
Thanks again

Xavier_5 pretty much has the correct approach.

Allow anyone to download your app for free for testing purposes. Put a fictitious name in until it is registered. Also, any reports should have a watermark saying "SAMPLE" or something to make the program unusable.

When a school finally pays, they download a registration/license file. When your app starts up, look for the license file and load any customized entries from there.

When a client has payed and the registration file has been downloaded it could happen that somebody copies and modifies this registration file on a testing application. Securing more, a solution may be to include a key in the registration file associated to the user. In this manner, each time the application is launched a web service -for example- may respond an ok and permit the application continue running.

...or to avoid the downside of requiring conection each time, the configuration file can be encrypted.

Thanks guys, will look at any of the suggestions.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.