Windows Service not showing up when installed with Setup project - windows

I have a simple windows Service developed in VS.net 2008 and VB.net. When I install the service using Installutil.exe from the command prompt it is working like a charm.
When I try to add a setup project and set the output and build and install it though it says successfully installed, it is not showing up in the services.
The event log shows that it is successfully installed. I just did check the registry, it did place the assemblies in HKEY_CURRENT_USER\Software\Microsoft\installer\assemblies.
But I don't understand why it is not showing up in the services listing. I refreshed and restarted.
Any thoughts??
Thanks

Found solution
You have to add a custom action in your MSI project.
So in custom actions, add the output of your service to the Install section. This will then run the required installation code for your service. i.e. the same as what the installutil.exe does
Thanks for all the help

I had the same problem and didn't pay attention to the portion BEFORE creating the Setup project.
http://msdn.microsoft.com/en-us/library/zt39148a(v=VS.100).aspx
To create the installers for your service
In Solution Explorer, right-click Service1.vb or Service1.cs and select View Designer.
Click the background of the designer to select the service itself, instead of any of its contents.
With the designer in focus, right-click, and then click Add Installer.
By default, a component class that contains two installers is added to your project. The component is named ProjectInstaller, and the installers it contains are the installer for your service and the installer for the service's associated process.
In Design view for ProjectInstaller, click ServiceInstaller1 or serviceInstaller1.
In the Properties window, make sure the ServiceName property is set to MyNewService.
Set the StartType property to Automatic.
In the designer, click ServiceProcessInstaller1 (for a Visual Basic project), or serviceProcessInstaller1 (for a Visual C# project). Set the Account property to LocalSystem. This will cause the service to be installed and to run on a local service account.

A couple of ideas:
Are you installing under the same Windows account that you are attempting to run it under? Do you have the Setup Project's "InstallAllUsers" property set to True?
Are you sure that you have the ProductName and Title properties in the Setup Project set correctly? Maybe the service is showing up in the list under a different name, i.e., "SetupProject1" or something.
Similarily, in your service's ProjectInstaller class, in design view, look at the properties of the ServiceInstaller and make sure the ServiceName and DisplayName properties are set to what you want.

Related

I can't set the Internet permission in my Xamarin project

I am trying to test a Xamarin Android application that consumes a WCF service. I know that I have to go to project properties and set "Internet" as a needed permission, but I don't see the list of permissions that I could select. I get this:
I know that I should see a list of permissions that I can check or uncheck according to the application's needs.
I am using VS2019 community.
Edit the file AnroidManifest.xml manually.

Including additional files when publishing an app with Visual Studio 2012

I have a console application that I've been developing and I'm just about ready to publish it for consumption.
However, there's a file that the app needs to reference (a couple files actually) and I'd like to try to include these either during install logic or via an outside process. Here's the situation:
The application fires off a load test based on some criteria the user chooses. The load test is defined by a .loadtest file which is created outside of this project.
So what I would like for the installer to do is contain the .loadtest files and just shove them in a default directory that the project can reference.
I can't figure out how to add this specific file as a pre-requisite or anything though, in the publish wizard. Any ideas?
When you add a file to the solution, it does not automatically get attached as part of the build in some cases. If you right click the file in your solution explorer and select "Properties", change the build action to "Content". This will ensure that VS includes the file as part of the build/publish and places it in the output directory of the build process.

Visual Studio 2010 update registry in setup application

I've recently created an application for my brother to use, it has several entries stored in the registry that it uses. I created a Setup Application in VS2010 so he can install the application to his PC with ease and set the entries to some default values for him, which he has changed. e.g.
I have a entry called "SummaryFolder" and the value of "Successfully Installed" - so when it was installed it would have the default value. He will have changed this by now to an actual folder on his PC.
Now I've just made a change to the program and added a couple more registry entries, modified the setup application and added in the new entries for installing. I've changed the build number of the setup app, so when he installs the app, it actually UPDATES his existing version. The problem I'm having is that the existing registry entries he has from the initial installation has been overwritten with the default "Successfully Installed" values, hence removing the folder he set.
So my question is: How can I specify for the setup program to only add the registry entries if they DON'T already exist ??? I want to have the installer to be as simple as possible for him.
Many thanks for any help.
You can try this approach:
select your setup project in Solution Explorer
click Launch Conditions editor button at the top of Solution Explorer
add a new registry search and configure it to search for your registry entry
set the search property to something meaningful, for example SUMMARY_FOLDER_REG (only uppercase letters so its a public property)
in the Registry Editor select your registry value
in its Properties pane set the Condition field to the negated search property:
NOT SUMMARY_FOLDER_REG
This way the registry entry is installed only if the search doesn't find anything.

how to auto update Service References in window phone 7

I have add Service References in my app. References Service is always changing, so I want auto update References Services when in server is update ?
How to update ?
Thank you !
That's not possible. As with any other type of project, Visual Studio will generate the proxy classes when you create the service reference or when you manually update it by right clicking it and selecting "Update Service Reference".
A possibility would be to built up proxy classes dynamically everytime you run the app. An example of an applications that does this is the OData Explorer available here http://www.odata.org/developers/odata-sdk including source.
Good luck!

Setting the manufacturer in a VS 2008 Setup Project

I have a windows setup project that installs a service. All works well except for one thing: The default directory offered to the user during install is of the form "C:\Program Files\Microsoft\ProgramName". I am trying to modify this so that instead of "Microsoft" we would have our company's name.
I found the application folder property of the setup project, and it has a DefaultLocation property of "[ProgramFilesFolder][Manufacturer][ProductName]". So, it looks like all I need to do is set the "Manufacturer" property and I'll be all set. However, I can not find a way to set this property! I had hoped it would take it from the company name in the AssemblyInfo of the primary output project, but it did not.
I could remove "[Manufacturer]" from the DefaultLocation and replace it with our literal company name, but that seems like a hack.
How do I set the Manufacturer name?
Note that I am not using a full-blown WiX project. I have simply added a windows setup project to my solution.
Thanks in advance for any help.
Click on your setup project in Visual Studio, open the Properties and you will notice that there are a number of Properties that you can set like Manufacturer, SupportURL, etc.
Note if you're confused/frustrated doing this seemingly trivial thing: if you open properties by right-clicking on the project and clicking "Properties" in the right-mouse menu, you will get the wrong dialog box. You need to select the project, but then navigate to the properties tag. One way to navigate to the properties tag is from the "View" menu, select "Properties Window".

Resources