1. Add a new project --> install and deploy --> install a project
2. Install the program --> right-click View --> File System --> application folder --> right-click --> Add project output
Select a Windows service project as the main output. If you want to output other files or folders in the installation folder, you can add them here or click the installation project to add them.
3. If you want to create a folder to write logs under the directory of the installer, add. windows. form, system. windows. forms. application. startuppath can obtain the installation directory address, that is, the installation address selected by the user.
4. Click "installation project"> "properties" (not "right-click Properties")> "manufacturer name": the default path "programmfiles"/"manufacturer name"/"installation project name"; productname: in the welcome phrase in the installation program, productcode is also here, haha
5. Generate the file and click OK. However, note that in solution configuration, the file is configured in the release status (next to the small green arrow of debugging). After the file is generated, there are two folders under the folder where the installation project is located: Debug and release. The MSI file under release is the package installation file, which can be used by others.
------------------------------------------------------
2009-2-19
I wrote a service today and installed it with an installer. I couldn't find the service in the service, but it is indeed running and can be uninstalled.
Run the vs2005 command to prompt the installation. If installutil is installed by the service name, you can find the service and solve it now, but you don't know why.
The solution is as follows:
Right-click the setup project and choose "View"> "Custom operation". The custom operation interface is displayed. Right-click the custom operation and choose "add custom operation". The "select items in the project" dialog box is displayed, select "main output from XXXX" in the "Application folder", that is, the installation, uninstallation, rollback, and submission all have this main output. The problem is solved!