Experience in C++, C#, Java and Process : Living in Montreal

* What is my technical experience as a software developer

* What I have learned in the software business

* Where I am heading to in my career

* How to process in a project

Sunday, December 19, 2004

VS.NET Setup Project : Issues and Solutions

Environment:
Microsoft Visual Studio.NET 2003
Windows XP SP2
DELL Inspiron 8200, CPU P4-M 1.6M ,512MB 15.4LCD, 40G, 3COM Wireless, DVD+CDRW, Logitech MX310

Project:


  1. During the install process , the setup asks users to give a project name [ProjectName]. If the user select Link.NET Example, the setup will install a [defult database]; if not, the database will not be installed.
  2. The [defult database] contains a few of folders up to 20.
  3. Add an Uninstall menu along with the main program menu.

Solutions & Problems:

  1. Add a new dialog Textboxes (B) in the user interface editor, press F4 to show its property window. Assign "EDIT_PROJECTNAME" as Edit1Property and "Link.NET Example" as Edit1Value, so [EDIT_PROJECTNAME] can be used anywhere to represent "Link.NET Example".
  2. Drag/drop a database folder to the Application Folder in the File System. VS.NET will add the whole folder hiberarchy to the setup folder. [Problem] If you wnat to delete the folders from the setup project, it would be nightmare. The root folder can not be deleted if each of its subfolders contains any files. To remove the whole folder, first of all, you have to remove all files in each folder, by hands! I have tried to move the database file to a MSM file, but it never works.
  3. Show the database folder property, set the Condition property as "[EDIT_PROJECTNAME] == "Link.NET Example"". During the setup procedure, this Condition will be checked to determine if the database should be installed.
  4. [More about Condition] Add a provision that allows users to create a shortcut to the FormattingApplication in their desktops. As before, you'll need to add the shortcut to the User's Desktop folder. Right-click on Primary output from the FormattingApplication (Active) item in the Application folder and select Create Shortcut to Primary output from FormattingApplication (Active) from the context menu. Rename the shortcut Formatting Application. Drag and drop it in the User's Desktop folder. However, you want this shortcut to be installed only if the user wants to install it. Therefore, set the Condition property of the User's Desktop folder to SHORTCUTDEMO. This ensures that the shortcut will be installed only if this condition is set to true. Later in this article, you will create a dialog box where this property can be set. Web like help
  5. VS.NET setup project does not encourage to add a uninstallation menu along with the application invoking menu. To do that, you have to add a shortcut for "msiexec /x [productcode]". But, you have to add msiexec into your application folder first before creating the shortcut.
  6. I can create a menu with static name during the setup, but I want to assign the menu name with user's own defined project name. It is impossible to do it in VS.NET setup project.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home