Wednesday, August 19, 2009

Deployment of a Windows Forms / Console Application

On the Build menu, choose Rebuild all Projects, to make sure that the client 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 <project_name>_Setup.


3. Click OK to close the dialog box.

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


4. Change ProductName property and remove "_Setup" from default ProductName name


· Select the <project_name>_Setup project in Solution Explorer. In the Properties window, select the ProductName property and type <project_name> without _Setup.






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

5. Change Manufacturer from ‘Default Company Name’ property to xxx . Then the MSI will install your application installed into the c:\Program Files\xxx\<project_name>\ folder


To add the WinForms / Console application to the installer


1. Right-click the \<project_name>_Setup project in Solution Explorer.

· View -> File System

· 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 \<project_name> from the Project drop-down list
  • Select the Primary Output group from the list
  • In the Configuration box, select (Active).
  • Click OK to close the dialog box.

To create Program Files folder & menu


Select the \<project_name>_Setup project in Solution Explorer.


1. Normally Install will, by default, restrict installation to a single user. If needed, in Project Explorer, click Setup Project name, view properties list, and set “InstallAllUsers” to true.

1a. In the File System Editor, right-click User’s Program Menu.


2. Add -> Folder and Rename Folder to <project_name>


3. In the File System Editor, in the Application Folder, select the Primary output from <project_name> node.


4. Right Click -> Create Shortcut to Primary Output.


5. Rename the Shortcut to <project_name>.


6. Select the Shortcut and drag it to your User’s Program Menu folder in the left pane.


To add an icon for Program Files folder & menu

  1. In the File System Editor, click User’s Program Menu. then in the right panel, right-click the shortcut (not the folder).

  2. In the Properties window, select the Icon property and choose (Browse...) from the drop-down list.
  3. The Icon dialog box will be displayed.

  4. In the DropDownListBox, choose "User's Program Menu"

  5. Click the Add File Button, then browse for the Icon file.

Rebuild the _setup project, then you should be ready !

You can repeat the steps above to add Desktop Icons, in the same way that you created Program Files folder & menu
On the Build menu, choose Rebuild all Projects.
If necessary, use Windows Explorer, to paste any other "application reference data” e.g. XML data, into the Application Folder

..

No comments:

Post a Comment

Followers