How do I create an InstallShield LE project to install a windows service? - visual-studio-2012

I downloaded Visual Studio 2012 yesterday when it was released on MSDN. I have noticed that a few of the project types that we had in 2010 are gone or different. The biggest difference for me right now is the removal of the Windows Installer project. Now we are being forced to use the InstallShield LE (Limited Edition). The problem here is that I write a ton of Windows Services and I can't see how to setup InstallShield LE. It appears that we (my company) will have to invest in licenses for the professional edition.
Has anyone found a way to install services in InstallShield LE? When using the Windows Installer project, you just set the custom actions.

For Visual Studio 2012 & InstallShield LE, do the following:
Run through the InstallShield project assistant and add the primary output of your service to the Application files section.
After you are done with the project assistant, double click the "Files" item under step two of the setup project.
Right click on the primary output of your service, and go to properties.
Click the "COM and .NET Settings" tab, and place a check in the "Installer Class" checkbox.
Click Ok
Now, once you build and run your install, your service will show up in the Windows Services snap in.
Note that this assumes you added a "Project Installer" to your service project (Right click on the service design sheet and click "add installer"). I can confirm this work on Windows 8 with Visual Studio 2012 / InstallShield LE.

I've recently installed VS 2012 with Install Shield LE. At first I kept getting a ISEXP -5036 internal server error after a build (this was after setting up a ISLE project and running through the Install Shield Project Assistant). Eventually I found out that it was trying to create the MSI in the DVD-5 media type which is where it was failing. For some reason, creating the solution again from scratch somehow recognizes to only build to the CD_ROM and SingleImage media types which works.
Anyway to rectify the 5036 error, click the Build tab in VS 2012 (top menu), select configuration manager and you should see that your IS setup file is selected on the DVD-5 configuration. Change this to CD_ROM and click close. Once you build/rebuild it will complete with no IS 5036 error.

While using the installer class checkbox may work for some instances, you may experience the following error:
Error 1001.The specified service already exists
Here is an excerpt from this link on how to resolve this issue:
For Error: Error 1001.The specified service already exists
This error will occur if the component installing a .NET Service is
incorrectly configured with ".NET Installer Class" set to Yes. The
method to install a .NET Service is to use Component\Advanced
Settings\Services view, not the ".NET Installer Class" setting.
Making definitions in the Component\Advanced Settings\Services view
creates entries in the Windows Installer ServiceControl and
ServiceInstall Tables. These entries are used by the Windows
Installer "InstallServices" action to install the Service.

If your project is .NET, then try then you can use the ServiceProcessInstaller class with InstallShield LE.
To get it to work with InstallShield, you have to go into the InstallShield "files" tree and right click on your file. Then check the checkbox for "Installer class" on the "COM and .NET settings" tab.
I have gotten it to work, but I've had problems on some OS's like Windows 2008R2. Your mileage may vary.
Here is an example: http://www.codeproject.com/Articles/14353/Creating-a-Basic-Windows-Service-in-C

I had all sorts of problems with this.
As follows.
InstallShield takes ages to download
the registration process is a pain.
the configuration options are confusing and overly complex.
the accepted solution on this thread is a hack and it doesn't always work - see 1001 in the documentation - essentially you need to get through the paywall to get the right configuration options to install a windows service.
Solution for me as mentioned elsewhere - was to abandon InstallShield
Very easy from that point.
Edit: Update - install the latest version from here https://wix.codeplex.com/releases/view/115492 for vs 2013 / 2015

Visual Studio setup projects are back in VS 2013 as a visual studio extension.
https://visualstudiogallery.msdn.microsoft.com/9abe329c-9bba-44a1-be59-0fbf6151054d
Please update your solution and projects to VS 2013. If you are still in VS 2010, you are probably better off by upgrading directly to VS 2013.
My experience with Installsheild LE is that it is very quirky but once you figure out the tricks, it is easier to use. However, I think that the limited edition is a way by Microsoft and Flexera to sell the fully featured edition. In other words, first we pay Microsoft a lot of money for Visual Studio and then their partner (in crime) more for Installsheild. Bad strategy which did not work out since they had to bring back the setup projects in VS 2013.

I've written about this subject:
Augmenting InstallShield using Windows Installer XML - Windows Services
Basically you create a merge module using WiX to encapsulate the service and then add it to your installshield project. ( Be sure to associate to the INSTALLDIR directory to make sure your file goes where you expect ). Build and test on a VM. Piece of cake.

I'm using VS2012 and Installshield LE Spring Edition. I did not have to use Wix.
If you encounter the error "Could not create _isconfig.xml for use with InstallUtilLib.dll", please create a folder with the same name as your setup project and inside the setup project folder.
Credits to http://community.flexerasoftware.com/showthread.php?165929-Could-not-create-_isconfig-xml-for-use-with-InstallUtilLib-dll

I just got some problems finding where to add installer as referred in the answer. So here it is how.
Double click on your service class within your Windows service Project
A blank screen with the text "To add components to your class, drag them from the Toolbox and use the Properties window to set their properties..."
Right click anywhere but on the links and select "Add Installer"
see ya

Bear in mind that all the above explanation will not help you if you plan to create later an upgrade of that setup. InstallShiled LE can't stop the running service when you upgrade. You can't do it either from Window Service Installer -> BeforeInstall event.

Wanted to put this here;
On VS 2015, when doing this, I ran into the 1001 error upon installation repeatedly.
Answer on this page explained that on the newer versions (anything past 2012), apparently you need to explicitly leave the installer class option unchecked, and then add your windows service under the Services section under Step 3 of the installer project:
Error 1001 when installing custom Windows Service

Related

VSTO Addin Creates 2 items in Add/Remove programs

I have created a vsto addin in VS2012. I have added an installation project to the solution using Installsheild LE. After installing the exe that I get, I get the expected item added to my add/remove programs. However when I open Word, I get prompted with a Microsoft Office Customization Installer prompt which says the publisher is unknown. I click OK to this and it adds my addin as expected, which all works fine but I also get a second item appear in my add/remove programs.
Can anyone tell me why I am getting the second item in add/remove programs and offer any advice about what I should do to avoid this?
You have to add "|vstolocal" to the addin registry value that points to your addin file. This tells ClickOnce to run it directly and not install it per-user.
You also want to digitally sign the addin using a certificate issued by someone in the users trusted root. This could be VeriSign or others. If you create your own certificate you have to use custom actions to install the root certificate in the certificate store and to register the publisher cert as a trusted publisher.
I've created about a dozen of these installers over the last 8 years and it's tricky at first but gets easier over time. Several of my customers are using InstallShield LE to get the prereqs installed but then I factor all the components out into a WiX merge module where I can use things like the Util extension to install certificates.
It looks like you use ClickOnce and MSI installers to deploy the add-in. You need to remove any of them. Both kind of installers are described in the following articles in MSDN:
Deploying an Office Solution by Using ClickOnce
Deploying an Office Solution by Using Windows Installer
Is that your dev machine and got Visual Studio in it? I have seen this happened with Windows 7 during development the addin is added in to add/remove programs. This has gone later when I updated my Windows 7 machine. Some updates from Microsoft has removed this later.

Visual Studio 2015 Preview - Full IIS

Any idea how to run ASP.NET 5 project in full IIS (not express) from within Visual Studio 2015 (via start debugging with F5 key)?
Atm I'm getting:
Couldn't determine an appropriate version of KRE to run.
I know it's not officially supported yet, but since IIS Express can do it, so should full IIS?!?
Let's say you created an ASP.NET 5 web application out of the template provided in VS 2015 Preview, then you can follow either of the approaches below:
Run the kpm pack command to create the deployable package with the appropriate options.
Example:
kpm pack --runtime KRE-CLR-x86.1.0.0-beta2-10690 --out "C:\MyWebApps\WebApplication1" --wwwroot-out wwwroot --configuration Release
Right click on the web application project and do a Publish to local file system directory.
Once the above step is done, in IIS, you can create a virtual directory application (or Website if you wish) to this deployable package's wwwroot folder. Example: "C:\MyWebApps\WebApplication1\wwwroot"
I just had a similar issue with beta4.
Note that the names have changed now so instead of a KRE it's now a DNX, although IIS was still showing the error calling it KRE despite this.
Anyway the solution for me was to:
right click the project in question in Solution Explorer
select "project name" Properties
tick Use Specific DNX version
tell it exactly which one you want to use, for me that was 1.0.0-beta4, .NET Core, x64
The project then ran in the browser for me.

visual studio express 2012 version control

I have been sent a working project from a coworker to start learning Visual Studio. The project is under version control, however I don't want to have access to final customer product. So when I try to open the solution file I first get a message that the project is under source control:
"Team Foundation Server Version Control
The solution you are opening is bound to source control on the following Team foundation Serer:
http:// . Would you like to contact this server to try to enable source control integration?"
[yes] [no] [help]
I press no, then I get an error:
"The solution appears to be under source control, but its binding information cannot be found. Because it is not possible to recover the missing information automatically, the projects whose bindings are missing will be treated as not under source control."
[ok] [help]
I proceed and press ok, and another message pops up:
"projectname\projectname.tsproj: The application which this project type is based on was not found. Please try this link for further information: http://go.microsoft.com/fwlink/?prd=12395&pver=11&sbp=ProjectTypeDeprecated&plcid=0x409&clcid=0x409&ar=MSDN&sar=ProjectCompatibility&o1=B1E792BE-AA5F-4E3C-8C82-674BF9C0715B"
My coworker tells me he sent the whole project, so I can't figure out why I cant get visual studio to open it. I am new to visual studio, but I have some programming experience.
Any help is much appreciated.
Thank you
It is doubtful that version control has something to do with your problem. There are two possibilities I could think of:
Your coworker uses full version of VS2012 and you are now having problems due to the fact that Visual Studio Express comes in two main flavours - Web and Desktop. It is unable to load Web(or Desktop) project because it just does not have any tools to work with it. Ask your coworker whether they mix web and desktop in their solutions. If it is so you should either use full VS or be given a reduced set of projects.
Nearly the same - your coworker uses some very old or very new version of particular project type (something like ASP.NET MVC that(as I remember) has different project type for each version). Again ask your coworker if it is so. In this case you will just have to install the needed templates and SDKs.
P.S. I was unable to open your link - it opens microsoft.com/default(maybe due to some regional problems). Search by key words brought to me similar problem for VS2010 http://connect.microsoft.com/VisualStudio/feedback/details/728847/could-not-open-vs2010-solution-with-mvc-project - may be it could help you more specifically.

Creating MSI in VS 2012

I have a website developed using VS 2012 and created an MSI (Deployment Package) using the "Install Shield Limited Edition Project" available in VS 2012. While i am trying to install this application in a Win 7 system, it is creating a new AppPool as "ASP.NET v4.0 DefaultAppPool" and installing the application with this AppPool.
But if there are any previous application installed in the same system with the application pool as "DefaultAppPool", then my application's AppPool ("ASP.NET v4.0 DefaultAppPool") is getting applied for those previously installed applications (which has "DefaultAppPool" as its application pool) too.
Is there any settings that i am missing while creating the MSI using the Install Shield? Please advise on this
If you need flexibility in IIS installation the only serious alternative in my opinion is the open source WIX toolset.
I don't have time to write a proper answer right now, but please try these two earlier posts:
Wix generate single component id for entire tree
Warning in Wix Setup
Also check this post out to get an explanation of why WiX is best for this purpose. And definitely read the section on using dark.exe to decompile an existing MSI to get a WiX source file to start with.

Adding Prerequisites using InstallShield 2010

I am very new to Installshield 2010. I have created a basic MSI setup for my application.
I need to check a few prerequisites for my application those are as below.
Microsoft frame work 3.5 with SP1.
Sql Express 2005.
Visual C++ redistributable
If any of the above things are not installed before means, I have to install while installing my application.
Can anyone guide me How I can install all these prerequisites before I installing my application?
Take a look at "Setup Prerequisites" and "Feature Prerequistes" They are the same except that the former are installed by setupe.exe before calling your MSI and the latter are installed by setup.exe (conditionally) after your feature selection and prior to the execution of the execute sequence in your msi.
If you go for the former, you probably also want to author AppSearch/System Search and Launch Conditions to block your MSI in case the user doesn't enter through the setup.exe.
InstallShield has predefined prereqs ( .PRQ's ) for each of those although I will caution you to atleast use SQL 2005 SP3 as there is a nasty bug in SP2 that can blue screen an XP machine. I'd actually really consider going with SQL 2008 R2.
Also found more info here in this page: http://kb.flexerasoftware.com/doc/Helpnet/InstallShield2011/IHelpSetPrereqCustom.htm
This one took me quite a while to find, hopefully I'll save you some time.
If you just want to force your user to have some applications installed (e.g. 'Visual C++ redistributable') or some specific configuration (e.g. specific Windows version/ reg value etc.)
You can use 'Behavior and Logic -> System Search' add the search for what you need (file/folders/registry entries/ini files values/XML file values),
On "What do you want to do with the value?" dialog select Store the values in the property and use the property in an Install Condition".
This will cause the Search to be executed when your installation package starts and will display an error popup to the user saying what ever message you've entered for the condition.
Few notes:
- If you're looking for a x64bit registry entry - mark the "Search the 64-bit portion of the Registry" check box.
- Did not find a way to edit the Condition once created, when tried to edit it it just lets me see and change the search parameters, but for the condition it only allows to enter it from scratch; as a workaround you can save the project as XML file (Installation Information -> General Information -> Project File Format) and edit the XML externally.
Good luck.

Resources