cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
bme
Level 4

VS2013: How to make installer for windows service?

I have just installed InstallShield LE for VS2013 and have created an setup project (which is very simple due to the lack of features) but the resulting installer doesn't register the service.

How do I make the installer register the service?
0 Kudos
(11) Replies
bme
Level 4

I believe I found it. Close the GUI and find Setup Project->Configure the Target System->Services. Apparently this installer tool cannot see that I am programming a service (the original Windows Installer Setup project could easily see this) and so I have to manually add this. Sigh.

Also, the startup type does not allow for delayed startup of the service which means I have to chose disabled or on demand and manually configure the service after the installation.

I will _never_ buy the full product seeing how crappy this tool is. Full of limitations compared to the old Windows Installer Setup project and I think I'll revert to VS2010 to continue having access to a working installer (which isn't flawless but miles better than InstallShield LE).
0 Kudos
hidenori
Level 17

If you want to register your Windows service via the Installer Class, make sure that you turn on the Installer Class property on the application file in the Files view of InstallShield. Please check out this blog post for more details.
0 Kudos
bme
Level 4

I seriously do not understand what that page is trying to teach me.

1. OK.
2.1. "Express" project? I assume this means a ISLE project (and not a standard VS2013 Express project). For a complete newbie with InstallShield LE (where the name Express has no relation), naming stuff correctly makes a world of difference.
2.2. Ok. Not ok. I was the wrong place (couldn't execute 2.3 because I misunderstoof 2.1.). What you mean to write is this: Inside the ISLE project, open (2) Specify Application Data and double-click on Files.
2.3 - 2.7. Ok.

Seriously, when the old windows installer project could see it was a service and automatically adjust the setup project accordingly, why can't InstallShield?

And what about the Services section in (3) Configure the Target System? Is that to remain empty? If so, why is it present? What if I add my service there? Must I add my service there? Do I have to do the above if I just use the Services section?


Also, let us have the option to hide every "feature" we cannot access due to us using the Limited Edition. It would make for a clearer interface instead of being annoyed at being presented with options we cannot access. It would serve yourself better in that people would generally be nicer towards the LE/Express editions when they aren't served with constant "in your FACE" advertising. Everyone hates that. By removing it, you bring a better experience instead of making people look elsewhere for installer software (such as WiX which to your fortune has absolutely NO GUI).

Also, your GUI is not intuitive, bloated, filled with advertising and clearly hasn't seen any UX designers.
0 Kudos
bme
Level 4

So I added the service in both Files view and Services view and build the project. Then I tried to install it only to be greeted with "Error 1001" during install.

What am I supposed to deduct from that error?
0 Kudos
bme
Level 4

I do get 3 warnings during build, though:

2>ISEXP : warning : -7235: InstallShield could not create the software identification tag because the Tag Creator ID setting in the General Information view is empty.
2>ISEXP : warning : -6245: One or more of the project's components contain .NET properties that require the .NET Framework. It is recommended that the release include the .NET Framework.
2>ISEXP : warning : -6248: Could not find dependent file libc.dll, or one of its dependencies of component MonService.Primary_output

The first one is valid as the Tag Creator ID is empty. I assume this is blocking the install.
The second one is true as well, but as .NET is installed on my pc, this should present any error during install.
The third (and last) warning I simply do not understand as I have not reference libc.dll in my project. Is this the culprit?
0 Kudos
vhe
Level 2

As I've just gone through the tedious task of upgrading a Windows service VS2010 solution with installer to a VS2013 solution with ISLE, I'll try and answer.

2>ISEXP : warning : -7235: InstallShield could not create the software identification tag because the Tag Creator ID setting in the General Information view is empty.
This isn't blocking the install. To remove the warning, go into Setup project -> General Information -> Use Software Identification Tag -> Change value to "NO"
2>ISEXP : warning : -6245: One or more of the project's components contain .NET properties that require the .NET Framework. It is recommended that the release include the .NET Framework.
Annoying warning, but nothing important. Should have information level INFO.
2>ISEXP : warning : -6248: Could not find dependent file libc.dll, or one of its dependencies of component MonService.Primary_output
This just doesn't make sense at all. I got the same warning, but it doesn't block the install or anything else. The service works as it should...

Here's what worked for me:

Make sure you have a project installer item in the service project.
Make sure to check the Installer Class checkbox in the properties dialog on the primary output in the files window.
Ignore the Services section in Configure the Target System.

I'm quite annoyed that source in the Event Viewer is Service1 and not the name of the service though...

I want my old .vdproj back!
0 Kudos
bme
Level 4

I got it to work. The error is due to Flexera forcing your service to be called Service1 somewhere in their scripting engine. For reference, nowhere at all in my project does the name "Service1" exist yet once installed, when I manually start my service, the event log says "Service1" is installed.

Even when using the -> 3 Configure the Target System -> Services section, the service added must be called Service1 despite Flexera's help text stating the service must match the name given in the service's Properties dialog box.

Flexera? Could you please fix this bug? We can't have all our services being started be logged as "Service1"!!!
0 Kudos
bme
Level 4

Or is it possible to ad post-install scripts? And pre-remove scripts?

If so, then I could make my own commands to register the exe file as a server and unregister it upon remove.

So, basically make the "sc create ..." and "sc delete ..." commands myself. The current solution is pure ****.
0 Kudos
perkinm
Level 3

The reply from the InstallShield Engineer resolved the issue I was having, which allowed the installation of the Service itself. I agree, however, that the package/wizard/assistant should be able to determine that a Windows Service is being installed and set the proper flag for the user. This caused me several hours of headache.

I may get used to this installer package, but I must also agree that the "wizard" is not intuitive and I also could do without seeing all the "locked" options. At least give us a chance to turn the showing of them on/off.

mp
0 Kudos
perkinm
Level 3

bme wrote:
I got it to work. The error is due to Flexera forcing your service to be called Service1 somewhere in their scripting engine. For reference, nowhere at all in my project does the name "Service1" exist yet once installed, when I manually start my service, the event log says "Service1" is installed.

Even when using the -> 3 Configure the Target System -> Services section, the service added must be called Service1 despite Flexera's help text stating the service must match the name given in the service's Properties dialog box.

Flexera? Could you please fix this bug? We can't have all our services being started be logged as "Service1"!!!


My observation:

This is more than annoying, it is an inaccurate interpretation of the ServiceName that can be clearly and distinctly specified in the Service Project's ServiceInstaller module. This needs to be fixed!
0 Kudos
bme
Level 4

perkinm wrote:
My observation:

This is more than annoying, it is an inaccurate interpretation of the ServiceName that can be clearly and distinctly specified in the Service Project's ServiceInstaller module. This needs to be fixed!


I can only assume such bugs are commonplace in the full version of InstallShield which is why I for certain cannot ask my boss to shell out the money for it. I am searching for a way to develop my project in VS2013 and build the setup in VS2010. This way, I get the best of both worlds. If it is possible, I don't know, but it will require some hacking for sure.
0 Kudos