ADO/ADO.NET - Deploying Windows application  ADO/ADO.NET - Deploying Windows application

Asked By Chiranjeevi S
26-Nov-10 01:46 AM
HI
I Developed a Project on Windows Forms Using VS2005 and SQL server 2005.
What i need is. .. how deploy my project..so that it should ask License key to activate my product
any help?

Thanks in Advance
  Mitesh Darji replied to Chiranjeevi S
26-Nov-10 02:07 AM
Hi I have found Deployment process from Microsoft Site, Please check below link:

http://msdn.microsoft.com/en-us/library/k3bb4tfd(VS.80).aspx

Basic Application Creation and Deployment

To create a Windows-based application

  1. On the File menu, click New Project.

  2. In the New Project dialog box, in the Project Types pane, select Visual Basic, then choose Windows Application in the Templates pane. In the Name box, type My Notepad.

  3. Click OK to close the dialog box.

    The project is added to Solution Explorer, and the Windows Forms Designer opens.

  4. Select the All Windows Forms tab in the Toolbox and drag a http://msdn.microsoft.com/en-us/library/system.windows.forms.button(v=VS.80).aspx control onto the form.

  5. Double-click the Button control to add an event handler for the button. In the event handler, add the following code:

    Shell("Notepad.exe", AppWinStyle.NormalFocus)
    

    This will launch Notepad.exe and give it focus.

  6. On the Build menu, choose Build My Notepad to build the application.

To create a deployment project

  1. On the File menu, point to Add, and then click New Project.

  2. In the Add New Project dialog box, in the Project Types pane, open the Other Project Types node, click Setup and Deployment Projects, then click Setup Project in the Templates pane. In the Name box, type My Notepad Installer.

  3. Click OK to close the dialog box.

    The project is added to Solution Explorer, and the File System Editor opens.

  4. Select the My Notepad Installer project in Solution Explorer. In the Properties window, select the ProductName property and type My Notepad.

    NoteNote

    The ProductName property specifies the name that will be displayed for the application in folder names and in the Add/Remove Programs dialog box.

To add the Windows-based application to the installer

  1. Select the My Notepad Installer project in Solution Explorer. In the File System Editor, select the Application Folder node.

  2. On the Action menu, point to Add, and then click Project Output.

  3. In the Add Project Output Group dialog box, choose My Notepad from the Project drop-down list.

  4. Select the Primary Output group from the list. In the Configuration box, select (Active). Click OK to close the dialog box.

  5. On the Build menu, choose Build My Notepad Installer.

To deploy the application (basic installer)

  • Select the My Notepad Installer project in Solution Explorer. On the Project menu, choose Install.

    This will run the installer (Setup Wizard) and install My Notepad on your development computer.

    NoteNote

    You must have install permissions on the computer in order to run the installer.

Optional Deployment Capabilities

This step demonstrates optional deployment capabilities; it creates a shortcut to your application that will be placed on the desktop of a target computer during installation.

To create shortcuts for the Windows-based application

  1. Select the My Notepad Installer project in Solution Explorer.

  2. In the File System Editor, select the Primary output from My Notepad node.

  3. On the Action menu, choose Create Shortcut to Primary Output from My Notepad.

    This will add a node called Shortcut to Primary output from My Notepad.

  4. Rename the shortcut Shortcut to My Notepad.

  5. Select Shortcut to My Notepad and drag it to the User's Desktop folder in the left pane.

Creating a File Association

This step adds a file association for My Notepad so that double-clicking .vbn files open the My Notepad application.

To create file associations for the Windows-based application

  1. Select the My Notepad Installer project in Solution Explorer. On the View menu, point to Editor, and then choose File Types. The File Types Editor appears.

  2. In the File Types Editor, select the File Types on Target Machine node. On the Action menu, choose Add File Type.

    A node named New Document Type #1 is added and opened for renaming.

  3. Rename New Document Type #1 as Vbn.doc.

  4. In the Properties window, set the Extensions property of the file type to vbn.

  5. Select the Command property and click the ellipsis (...) button. In the Select Item in Project dialog box, navigate to the Application Folder, and select Primary output from My Notepad.

  6. Click OK to close the dialog box.

Adding a Registry Entry

This step adds a registry key and value to the registry. You can reference this registry key from your application's code to retrieve user-specific information at run time.

To add a registry entry for the Windows-based application

  1. Select the My Notepad Installer project in Solution Explorer. On the View menu, point to Editor, and choose Registry. The Registry Editor appears.

  2. In the Registry Editor, select the HKEY_CURRENT_USER node and expand it, then expand the Software node and select the [Manufacturer] node.

    NoteNote

    The [Manufacturer] node is surrounded by brackets to denote that it is a property. It will be replaced by the value entered for the Manufacturer property for the deployment project.

  3. On the Action menu, point to New, and then click Key.

  4. Rename the key UserChoice and select it.

  5. On the Action menu, point to New, and then click String Value.

  6. Rename the string value TextColor.

  7. In the Properties window, select the Value property and enter Black.

Adding a Custom Installation Dialog Box

This step adds and configures a custom user interface dialog box that will be displayed during installation.

To add a custom installation dialog box

  1. Select the My Notepad Installer project in Solution Explorer. On the View menu, point to Editor, and choose User Interface. The User Interface Editor appears.

  2. In the User Interface Editor, select the Start node (under the Install node).

  3. On the Action menu, choose Add Dialog.

  4. In the Add Dialog dialog box, choose Checkboxes (A).

  5. Click OK to close the dialog box.

  6. Right-click the Checkboxes (A) dialog box and select Move Up twice to position it above the Installation Folder dialog box.

  7. In the Properties window, set the BannerText property to Samples.

  8. Set the BodyText property to the following:

    The Install Samples check box controls whether or not the sample files are installed. If left unselected, the samples will not be installed.

  9. Set the CheckBox1Label property to Install samples?

  10. Set the properties Checkbox2Visible, Checkbox3Visible, and Checkbox4Visible to False. This will hide the additional check boxes.

Working with Samples

This step creates a Samples subfolder that will be installed beneath the Application folder.

To add a Samples folder

  1. Select the My Notepad Installer project in Solution Explorer. On the View menu, point to Editor, and choose File System. Select Application Folder if it is not already.

  2. Right-click Application Folder and on the context menu point to Add, and then click Folder.

  3. Rename New Folder #1 to Samples.

This step creates two sample text files that will be installed if the user chooses the Install samples option in the custom dialog box.

To create sample files for the application

  1. Using Notepad or another text editor, create a text file containing the text This is rules.vbn. Save it as Rules.vbn.

    NoteNote

    To prevent Notepad from automatically adding a .txt extension, choose All Files in the Files of type drop-down list.

  2. Create another text file containing the text This is memo.vbn. Save it as Memo.vbn.

This step adds the sample files to the Samples folder, and sets a condition that determines whether to install the files.

To add the samples to the installer

  1. Select the My Notepad Installer project in Solution Explorer. On the View menu, point to Editor, choose File System, and select the Samples folder.

  2. From the Action menu, point to Add, and then choose File. Add the Rules.vbn and Memo.vbn files to the Samples folder.

  3. Select the file Rules.vbn in the File System Editor.

  4. In the Properties window, set the Condition property to CHECKBOXA1=1. When the installer is run, the file Rules.vbn will only be installed if the custom check box is selected.

  5. Select the file Memo.vbn in the File System Editor.

  6. In the Properties window, set the Condition property to CHECKBOXA1=1. When the installer is run, the file Memo.vbn will only be installed if the custom check box is selected.

Adding Launch Conditions

This step checks to see if Internet Explorer 5.0 or higher is installed on a target computer, and it halts installation if the file is not installed.

To add a launch condition to check the Internet Explorer version

  1. Select the My Notepad Installer project in Solution Explorer. On the View menu, point to Editor, and then click Launch Conditions.

    NoteNote

    This step is intended only to demonstrate the concept of launch conditions; the My Notepad application has no actual dependency on Internet Explorer.

  2. In the Launch Conditions Editor, select the Requirements on Target Machine node.

  3. On the Action menu, choose Add File Launch Condition.

    A Search for File1 node is added beneath the Search Target Machine node, and a Condition1 node is added beneath the Launch Conditions node.

  4. Rename Search for File1 to Search for Internet Explorer.

  5. In the Properties window, set the FileName property to Iexplore.exe, the Folder property to [ProgramFilesFolder], the Depth property to 2, and the MinVersion property to 5.00.

  6. Select the Condition1 node.

  7. Set the Message property to the following:

    This program requires Microsoft Internet Explorer 5.0 or higher. Please install Internet Explorer and rerun the Notepad installer.

Setting Properties for Prerequisite Components

This step sets a property to install the .NET Framework automatically if the correct version is not present on the target computer. Note that the .NET Framework 2.0 package will also install the Windows Installer 2.0 files.

When the prerequisites properties are set as follows, clicking setup.exe will automatically install .NET Framework before running the .msi file (this is set by default). For more information on specifying prerequisites, see http://msdn.microsoft.com/en-us/library/7tx0bw8y(v=VS.80).aspx.

To set optional properties for the deployment project

  1. Select the My Notepad Installer project in Solution Explorer. On the View menu, choose Property Pages.

  2. In the My Notepad Installer Property Pages dialog box, in Installation URL, specify the URL of a server or Web site from which the application and/or prerequisites will be installed. Click the Prerequisites button.

  3. In the Prerequisites dialog box, under Choose which prerequisites to install, make sure that .NET Framework is selected (it should be selected by default). Under Specify the install location for prerequisites, accept the default setting.

  4. On the Build menu, select Build My Notepad Installer.

Installing on Your Development Computer

This step will run the installer and install My Notepad on your development computer.

To install My Notepad on your development computer

  • Select the My Notepad Installer project in Solution Explorer. On the Project menu, choose Install.

    NoteNote

    You must have install permissions on the computer in order to run the installer.

Deploying to Another Computer

This step will run the installer and install My Notepad on another computer.

To deploy My Notepad to another computer

  1. In Windows Explorer, navigate to your project directory and find the built installer. The default path will be \Documents and Settings\yourloginname\My Documents\Visual Studio 2005\Projects\Solution Folder Name\My Notepad Installer\project configuration\My Notepad Installer.msi. (The default project configuration is either Debug or Release.)

  2. Copy My Notepad Installer.msi, Setup.exe, and all other files and subdirectories in the directory to another computer.

    NoteNote

    To install on a computer that is not on a network, copy the files to traditional media such as CD-ROM.

  3. On the target computer, double-click Setup.exe to run the installer.

    NoteNote

    You must have install permissions on the target computer in order to run the installer.

Testing

This step will test starting the application from a desktop shortcut and will also test uninstalling it.

To test the installation

  1. Verify that the shortcut is installed on the desktop and that it correctly launches the My Notepad application.

  2. Uninstall the application using the Add or Remove Programs tool in Control Panel. In Add or Remove Programs, select My Notepad, then click the Remove button.

    NoteTip

    To uninstall from your development computer, on the Project menu, choose Uninstall.

  3. The icon should be removed from the desktop and the installed application files and folders should be deleted from your computer.

  Reena Jain replied to Chiranjeevi S
26-Nov-10 02:18 AM
hi,

here is a good link for this

http://www.beansoftware.com/Windows-Forms-Tutorials/Deploy-NET-Windows-Application.aspx

hope this will help  you
  Mitesh Darji replied to Chiranjeevi S
26-Nov-10 02:22 AM
Also I have found one good article from below link please read first:

http://www.c-sharpcorner.com/UploadFile/rahul4_saxena/Setup08232007071849AM/Setup.aspx

This step by step tutorial guides you towards how to create a setp for a Windows Forms application using Visual Studio 2005.

Step 1: First of all, create a Windows Forms application.

 

Step 2: Next add a setup project by clicking on File-> Add-> New Project.

By clicking here the window will open like this:

 

 

Figure 1:

Step 3: Select here Setup and Deployment in the left side bar in project types.

 

Figure 2:

Here we find three options as following:

Application Folder
User's Desktop
User's Program Menu
Step 4: These three options are the three places where we want to copy our setup fules during the installation process. From here we have to select one option. Suppose I select User's Desktop. Then Right click on User's Desktop option and select Add-> Project Output. The window will look like as.

 


Figure 3:

Step 5: After clicking on Project Output, a new window will open. Here we select first four options. Now click on OK.

 

Figure 4:

Step 6: After clicking on OK, Rebuild the Setup from Build option in Menu bar like as.

 

Figure 5:

Step 7: After this, let's test our setup by going right clicing on the setup project in Solution Explorer and click on Install menu item.

 

 

Figure 6:

The setup process will start, which looks like this:

 


Figure 7:

Step 8: After copmpleting the installation go on desktop there you will find all files you have included in the setup on the desktop.

all steps I have copied from below article, this is really good article:

http://www.c-sharpcorner.com/UploadFile/rahul4_saxena/Setup08232007071849AM/Setup.aspx

  Danasegarane Arunachalam replied to Mitesh Darji
26-Nov-10 02:53 AM
Hope this helps

http://www.emoreau.com/Entries/Articles/2007/12/Licensing-a-VBNet-application.aspx

Create New Account
help
it. asp.net using C# 2010. hi, Crystal Reports is the standard reporting tool for Visual Studio .NET used to display data of presentation quality. You can display multiple-level totals, charts blogspot.com / 2009 / 07 / creating-crystal-reports-in-aspnet.html http: / / www.c-sharpcorner.com / uploadfile / mahesh / crystalreportsintroduction11082005014959am / crystalreportsintroduction.aspx http: / / www.highoncoding.com / Articles / 550_Creating_Crystal_Report_in_ASP_NET.aspx Hope this will help you hi Crystal Reports is the built-in report designing tool in Visual Studio .NET and it is fully integrated with windows and web applications. It is very easy to use and design the reports with it. to add a report to a visual studio .NET projects (windows or web) you just need to right-click on the project
visual studio installation problem Actually, my OS is Windows Xp with service pack2.I added service pack3 to install visual studio2010.after that i tryed to installed, but am getting SETUP FAILED due to "Windows Installer 4.5 Update (x86) " due to this other are not processing. and am getting below
Frequently asked Interview Questions in ADO.Net hi friends Any one send frequently asked Important questions in C# .Net, ADO .Net, Asp .Net and Sql Server. . . . . . . . tx in Advance. . . . . . Hi, Find this. . (B)What is an difference between VB.NET and C#? (I) what is the difference between System exceptions and Application exceptions? (I)What is CODE Access security? (I)What is a satellite assembly? (A) How COM? (A)How can we use .NET components in COM? (A) How can we make Windows API calls in .NET? (B) When we use windows API in .NET is it managed or unmanaged code? (I)What is COM? (A) What the difference between thread and process? Chapter 4: Remoting and Webservices (B)What is an application domain? (B) What is .NET Remoting? (B) Which class does the remote object has to
Time (US & Canada). [11 / 17 / 2011 19:10:25.0731] [0] Operating System version: Microsoft Windows NT 6.1.7601 Service Pack 1. [11 / 17 / 2011 19:10:25.0731] [0 ddennis. [11 / 17 / 2011 19:10:26.0246] [0] Command Line Parameter Name = 'mode', Value = 'Install'. [11 / 17 / 2011 19:10:26.0246] [0] Command Line Parameter Name = 'sourcedir', Value = 'D 17 / 2011 19:10:26.0246] [0] ExSetupUI was started with the following command: '-mode:install -sourcedir:D:" / FromSetup'. [11 / 17 / 2011 19:10:26.0495] [0] Setup is choosing the roles are unpacked: [11 / 17 / 2011 19:10:27.0260] [0] The following roles are installed: BridgeheadRole MailboxRole AdminToolsRole [11 / 17 / 2011 19:10:27.0260] [0] The local server has some Exchange files installed. [11 / 17 / 2011 19:10:27.0416] [0] Setup will use the path 'D: \ ' for installing Exchange. [11 / 17 / 2011 19:10:27.0416] [0] Setup will discover the installed roles from server object 'CN = EXCHANGE, CN = Servers, CN = Exchange Administrative Group (FYDIBOHF23SPDLT), CN = Administrative Configuration, DC = mr238, DC = org'. [11 / 17 / 2011 19:10:27.0416] [0] 'BridgeheadRole' is installed on the server object. [11 / 17 / 2011 19:10:27.0416] [0] 'MailboxRole' is installed
Time (US & Canada). [11 / 17 / 2011 19:10:25.0731] [0] Operating System version: Microsoft Windows NT 6.1.7601 Service Pack 1. [11 / 17 / 2011 19:10:25.0731] [0 ddennis. [11 / 17 / 2011 19:10:26.0246] [0] Command Line Parameter Name = 'mode', Value = 'Install'. [11 / 17 / 2011 19:10:26.0246] [0] Command Line Parameter Name = 'sourcedir', Value = 'D 17 / 2011 19:10:26.0246] [0] ExSetupUI was started with the following command: '-mode:install -sourcedir:D:" / FromSetup'. [11 / 17 / 2011 19:10:26.0495] [0] Setup is choosing the roles are unpacked: [11 / 17 / 2011 19:10:27.0260] [0] The following roles are installed: BridgeheadRole MailboxRole AdminToolsRole [11 / 17 / 2011 19:10:27.0260] [0] The local server has some Exchange files installed. [11 / 17 / 2011 19:10:27.0416] [0] Setup will use the path 'D: \ ' for installing Exchange. [11 / 17 / 2011 19:10:27.0416] [0] Setup will discover the installed roles from server object 'CN = EXCHANGE, CN = Servers, CN = Exchange Administrative Group (FYDIBOHF23SPDLT), CN = Administrative Configuration, DC = mr238, DC = org'. [11 / 17 / 2011 19:10:27.0416] [0] 'BridgeheadRole' is installed on the server object. [11 / 17 / 2011 19:10:27.0416] [0] 'MailboxRole' is installed