I have done the validation for email edit box.
I want to check the given email address is correct or wrong in install-script.
How can we achieve this functionality in installscript?
Thanks, Thananjeyan
I have done the validation for email edit box.
I want to check the given email address is correct or wrong in install-script.
How can we achieve this functionality in installscript?
Thanks, Thananjeyan
I wouldn't do any checking that involves internet connectivity during installation. If all you want is to avoid typos, add two fields and compare them to ensure the user typed correctly.
The main reason for not validating over the Internet is that you simply cannot assume that a direct connection to the Internet is available. The machine could be without an active network connection, or the corporate proxy server does not allow direct network access etc...
Secondly, I would not ask the user to enter any details during the setup, but ask on first launch of the application. This yields more control of the input process, features good exception handling, allows internet access, allows the process to be repeated if there are problems during the first run, and will crucially work for every user that launches the application, and not just for the person who installed the application. An exception is a license key that is to work for all users of the software on the machine - this you can ask for, but let the application verify it (during the install you have elevated rights and can write to HKLM, not so during application launch). Make it a public property so it can be set in silent mode too.
So in conclusion ask for the email address on application launch and validate it over the internet using the application's own code base - much more reliable. Only ask for and add per-machine data (HKLM) during a setup (such as a shared license key) to take advantage of the elevated rights available during install. Write all user data to HKCU or the user profile on application launch. Another implication of this is to keep all per-user settings out of your setup and set them all via the application.
Setups that try to connect to the Internet for any reason at all, are frowned upon in corporate environments. This includes the setups that try to download and install runtimes automagically that might not be approved for use on the standard machine environment (SOE). Sometimes setups also ask for and try to validate licenses and email addresses and download active content for dialogs. None of this is safe, desirable or helpful to get your software approved for corporate use. Almost all corporate environments demand that software is deployed silently, and then all these online validation features must be disabled, or the install may fail completely since the install is run with system accounts specifically prevented from accessing the Internet for security reasons.
Requiring Internet access for your setup is a huge design flaw - particularly when it is run in silent mode. I have written this answer previously on this issue: Installer with Online Registration for Windows Application
Installers for home use only - typically games - are different. You could access the Internet for these to implement "auto-magic", and generally you should install all games with as few questions as possible - the user generally has no knowledge or interest in anything you ask. Marketing might want the email though.