Setting the manufacturer in a VS 2008 Setup Project - visual-studio

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".

Related

Can't Change Project to x86 in Configuration Manager

I have a solution with over 170 projects in it. I recently needed to add two more projects to this solution. For reasons that are not relevant to this question, the solution is built as at x86.
When I open Configuration Manager, and scroll to my new projects, they say "Any CPU". To change that I select <New...>:
It brings up a dialog to make the new entry. I fill it out like this:
When I select OK, it flashes for a second, then goes back to "Any CPU":
I also tried selecting <Edit...> and I get this:
The Remove button is locked out and I don't have any other options.
How can I get an x86 option setup for my new projects?
I faced a similar problem when I converted C# projects into C# SDK style projects.
I found that after conversion, the project type GUID in the solution file did not change from Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = ... to Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = ....
Solution of this problem in my case was to delete this project from VS solution and add it again. You can also manually edit solution file (.sln) and change wrong project-type-GUID.
In your case, try to check the project type GUID in the solution file and change GUID manually. The list of project type GUIDs can be viewed here.

Visual studio setup project: default installation location based on user choce

Is it possible to change the DefaultLocation proprty based on a user choice on a visual stuio 2013 setup project?
I have inserted a radio button dialog in User interface but I don't know how to use the selected button property to change the DefaultLocation propetry, if it is possible.
There already is a usr choice to specify the output directory. The user interface sequence has an InstallFolder dialog where you specify the Application Folder (as it's called in the File System view). That's the way the user browses to a location that is not the default of [ProgramFilesFolder][Manufacturer][ProductName] .
If you want to change the default location and base it on a search then this should work, assuming you have a registry entry defining the location:
Create a custom folder in the file system view, and give it a default location that's the same as the Application Folder setting, and an uppercase Property there called (for example) MYPATH. Put your files there, not Application Folder.
Add a registry search, in Search Target machine in launch conditions, and refer to the key and registry location, and with the Property MYPATH.
At install time the search will set the path to the value in the registry and install the files there.
The problem is that Visual Studio setup projects don't offer all the capabilities of Windows Installer, although other tools do. With other tools you could run code to set the location, just as an example.

If i want to make a copy of my c# project in the same workspace how can i do it?

In other words lets say i have already completed a project using visual studio. Now i want to make a separate project that is identical to the already completed project(except for some future changes).
How can i do this while keeping the new project in the same workspace as the original without:
creating a new project and copy pasting code over
copy-pasting the folder that holds the project and changing the name of the folder
I'm asking because there must be a better way to do this than the two options above.
Right click on the solution and "Open Folder in File Explorer"
Copy the project folder
Rename the new Project folder
Open the new project folder and rename the .csproj file
Right click on the solution and "Add" "Existing Project" to the solution
Open the "Properties" for the new project
Under "Application", change the assembly name and default namespace
Select "Tools", "Create GUID", Option 6, "Copy"
Under Assembly information, change the name and product
Paste in the GUID and clear the "" suffix
Rename the namespace in the source files to reflect the new
namespace from above.
Depending on your needs, you could get by with a subset of these steps (e.g. steps 1 and 2), however, I think a complete copy requires all of the steps mentioned.
The second option is exactly what you should do: duplicate the folder containing your project and then rename it.
To make this work, you might also have to change the GUID used by the project to avoid clashes. Visual Studio is supposed to do this automatically if another project with the same GUID already exists in the solution. If something goes wrong, you can do it manually by editing the project file (it's the field called ProjectGUID). It's just a standard GUID value, so use any freely-available GUID generator like the one bundled with Visual Studio or one you find online.
Why should there be a better option than this? What would that "better" option look like? It's not like there's going to be a menu command for it, this isn't a very commonly used feature. Most programmers use a source control system that handles branching/duplicating for them automatically and [mostly] without pain.

Windows Service not showing up when installed with Setup project

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.

How to set the Startup Project in VB6?

Can you set the startup Project in the Visual Basic 6 IDE?
I looked all through the Settings and can't find a way to do it.
I assume you have multiple projects in a Group e.g. a dll and a dependent exe and you want to set the exe as the 'start up' project. Do so this, select the exe project in the Project Explorer, right click and choose 'Set as Start Up' from the context menu. The 'start up' project's name will be shown as bold text in the Project Explorer.
Dave and OneDayWhen are correct in saying that you need to right click the desired project in the IDE and select Set as Start Up when you have multiple projects loaded and you want to choose which one is executed.
Anyone know how I can set the VB6 IDE
to load either the last project loaded
or change the default one loaded?
Copy the Icon change the target to something like
"C:\Program Files\Microsoft Visual Studio\VB98\VB6.EXE" "D:\MyProjects\MyOneProject\trunk\MyOneProject.vbp"
Change Startup In to D:\MyProjects\MyOneProject\trunk
I found it more just to change the StartupIn to my Master Project Directory rather than have icons for specific project. Like D:\MyProjects
Rob Conley
P.S. In case you are wondering on why you would ever select a non-EXE project as startup. You do this at times when you are debugging a non-EXE. When you startup a non-EXE you have several options. Among them you can fire up a application,or have sit there until something calls it. Useful when you are debugging a Active DLL or Control and using Excel or another 3rd party software that you don't have the source too.
I'm not aware of a "startup Project" settting in VB6, but you can select the "Startup Object" by opening the Project menu, choosing the last menu item ("X properties", where X is the name of your project), and then selecting the General tab in the Project Properties window. The selector you seek is in the upper-right corner.

Resources