This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Re: Windows Services and InstallShield 2011 LE
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Nov 03, 2010
09:57 AM
Windows Services and InstallShield 2011 LE
Hi,
I am using VS 2010 with the new MS recommended Install Shield 2011 LE.
Using the old VS deployment porjects I could easily create a windows service installer that registered my service.
I cannot for the life of me find this functionality in the LE version...to top that I've spent 3 days trying to find even a simple example on the web with no luck.
Is this something that only the professional edition will handle?
cheers,
Woka
I am using VS 2010 with the new MS recommended Install Shield 2011 LE.
Using the old VS deployment porjects I could easily create a windows service installer that registered my service.
I cannot for the life of me find this functionality in the LE version...to top that I've spent 3 days trying to find even a simple example on the web with no luck.
Is this something that only the professional edition will handle?
cheers,
Woka
(14) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 10, 2011
07:06 AM
Hi Woka,
I am in exactly the same position. I have previously used the built in VS installers to register and start my Windows Services, and although the functionality is limited, it works and is pretty straightforward.
I called Flexera today to ask the simple question "Does the LE product allow you to install services" and the chap could not or would not answer. What he DID say is that Microsoft plan to ONLY support Installshield in future versions of VS and that I should buy Installshield Professional.
The fact that you have not received a reply to your simple straightforward question in several months, along with Flexera advising me I have to spend £1500 to continue doing what I have been doing in Visual Studio for years leads me to believe that lobbying Microsoft to not drop their own installer, or force Flexera to provide a straight answer to a straight question is the way to go.
One more try.
Flexera, can Installshield LE install, register and start a Windows Service or not? If so, please provide an example.
Thank you.
I am in exactly the same position. I have previously used the built in VS installers to register and start my Windows Services, and although the functionality is limited, it works and is pretty straightforward.
I called Flexera today to ask the simple question "Does the LE product allow you to install services" and the chap could not or would not answer. What he DID say is that Microsoft plan to ONLY support Installshield in future versions of VS and that I should buy Installshield Professional.
The fact that you have not received a reply to your simple straightforward question in several months, along with Flexera advising me I have to spend £1500 to continue doing what I have been doing in Visual Studio for years leads me to believe that lobbying Microsoft to not drop their own installer, or force Flexera to provide a straight answer to a straight question is the way to go.
One more try.
Flexera, can Installshield LE install, register and start a Windows Service or not? If so, please provide an example.
Thank you.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 13, 2011
03:56 AM
As far as I know this functionality is not included in InstallShield LE. However I also can't find it in Visual Studio Setup&Deployment projects. How did you do it in VS?
Stefan Krueger
InstallSite.org
InstallSite.org
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 15, 2011
05:41 PM
Probably the same way *everybody* does it in VDPROJ:
http://blog.deploymentengineering.com/2006/07/msi-vs-net.html
Assuming IS 2010 LE ( Is there a 2011 LE yet? ) doesn't support authoring ServiceInstall / ServiceControl rows ( I haven't looked ) ... the easiest and best quality thing to do would be to create a merge module using WiX to encapsulate the file as a service and then bring it in as a dependency of your IS 2010 LE project.
In fact, that's a good way to make LE do many things it wasn't designed to do. But if you do any serious work with installs you probably will eventually want Professional edition.
http://blog.deploymentengineering.com/2006/07/msi-vs-net.html
Assuming IS 2010 LE ( Is there a 2011 LE yet? ) doesn't support authoring ServiceInstall / ServiceControl rows ( I haven't looked ) ... the easiest and best quality thing to do would be to create a merge module using WiX to encapsulate the file as a service and then bring it in as a dependency of your IS 2010 LE project.
In fact, that's a good way to make LE do many things it wasn't designed to do. But if you do any serious work with installs you probably will eventually want Professional edition.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 17, 2011
09:30 AM
Assuming IS 2010 LE ( Is there a 2011 LE yet? ) doesn't support authoring ServiceInstall / ServiceControl rowsCorrect, it doesn't. (And there's no 2001 release of LE yet.)
Probably the same way *everybody* does it in VDPROJ
Installer Class custom actions can be used in InstallShield LE, so the same method should be possible.
If you want to do the "right thing" and use the Service tables, you need to buy a higher edition of InstallShield.
(If I recall correctly: if your service is a .NET assembly in the GAC you can't use the Service tables but must use a custom action, maybe even after InstallFinalize)
Stefan Krueger
InstallSite.org
InstallSite.org
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 17, 2011
10:05 AM
I love you Stephen but....
NO NO NO NO NO NO NO NO
Do not use InstallUtil custom actions!!!! It's reinventing the wheel at best and catastrophic at worst. Been there, done that, will never, ever do it again.
I just decribed a work around using merge modules to inject the desired behavior into LE without having to fork out extra money for Pro. Although I do believe Pro is inevitable.
NO NO NO NO NO NO NO NO
Do not use InstallUtil custom actions!!!! It's reinventing the wheel at best and catastrophic at worst. Been there, done that, will never, ever do it again.
I just decribed a work around using merge modules to inject the desired behavior into LE without having to fork out extra money for Pro. Although I do believe Pro is inevitable.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 17, 2011
09:07 PM
Stefan Krueger wrote:
Installer Class custom actions can be used in InstallShield LE, so the same method should be possible.
I'm looking at LE and I don't see anywhere to wire up an InstallUtil CA. I do see where you can call EXE's so even a simple call to SC.EXE would be better then InstallUtil.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 18, 2011
10:14 AM
NO NO NO NO NO NO NO NO
I'm sorry if my previous post was misleading. I don't mean you should do this, I only wanted to mention that it's possible.
You can right-click the file and check "Installer Class". This should cause the assembly’s Install, Commit, Rollback, and Uninstall methods (derived from System.Configuration.Install.Installer) during installation.
Stefan Krueger
InstallSite.org
InstallSite.org
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 19, 2011
02:27 AM
I am using VS 2010 Professional with InstallShield LE.
I have a C# project which will run as a Windows Service.
My plan is to have a self installing service.
I modified my Program.cs as follows:
[CODE]
namespace hackawaysprogram
{
static class Program
{
///
/// The main entry point for the application.
///
public static void Main(string[] args)
{
if (args.Length > 0 && args[0].Equals("/i") || args[0].Equals("/u"))
{
if (args[0] == "/i")
{
System.Configuration.Install.ManagedInstallerClass.InstallHelper(new[] { Assembly.GetExecutingAssembly().Location });
}
else if (args[0] == "/u")
{
System.Configuration.Install.ManagedInstallerClass.InstallHelper(new[] { "/u", Assembly.GetExecutingAssembly().Location });
}
return;
}
ServiceBase[] ServicesToRun;
ServicesToRun = new ServiceBase[]
{
new DSmsService()
};
ServiceBase.Run(ServicesToRun);
}
}
}
[/CODE]
I have tested this and it works. It installs or uninstalls the service. No paths etc required.
Now I plan to have a VBScript or JScript executing the /i & /u from the InstallShield LE project. Thing is that all this is new to me and I have never used any of those scripting languages nor have I used any custom actions or such.
Can anyone help?
I have a C# project which will run as a Windows Service.
My plan is to have a self installing service.
I modified my Program.cs as follows:
[CODE]
namespace hackawaysprogram
{
static class Program
{
///
/// The main entry point for the application.
///
public static void Main(string[] args)
{
if (args.Length > 0 && args[0].Equals("/i") || args[0].Equals("/u"))
{
if (args[0] == "/i")
{
System.Configuration.Install.ManagedInstallerClass.InstallHelper(new[] { Assembly.GetExecutingAssembly().Location });
}
else if (args[0] == "/u")
{
System.Configuration.Install.ManagedInstallerClass.InstallHelper(new[] { "/u", Assembly.GetExecutingAssembly().Location });
}
return;
}
ServiceBase[] ServicesToRun;
ServicesToRun = new ServiceBase[]
{
new DSmsService()
};
ServiceBase.Run(ServicesToRun);
}
}
}
[/CODE]
I have tested this and it works. It installs or uninstalls the service. No paths etc required.
cmd > hackaways.exe /i
or
cmd > hackaways.exe /u
Now I plan to have a VBScript or JScript executing the /i & /u from the InstallShield LE project. Thing is that all this is new to me and I have never used any of those scripting languages nor have I used any custom actions or such.
Can anyone help?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 19, 2011
02:32 AM
I am using VS 2010 Professional with InstallShield LE.
I have a C# project which will run as a Windows Service.
My plan is to have a self installing service.
I modified my Program.cs as follows:
[CODE]
namespace hackawaysprogram
{
static class Program
{
///
/// The main entry point for the application.
///
public static void Main(string[] args)
{
if (args.Length > 0 && args[0].Equals("/i") || args[0].Equals("/u"))
{
if (args[0] == "/i")
{
System.Configuration.Install.ManagedInstallerClass.InstallHelper(new[] { Assembly.GetExecutingAssembly().Location });
}
else if (args[0] == "/u")
{
System.Configuration.Install.ManagedInstallerClass.InstallHelper(new[] { "/u", Assembly.GetExecutingAssembly().Location });
}
return;
}
ServiceBase[] ServicesToRun;
ServicesToRun = new ServiceBase[]
{
new DSmsService()
};
ServiceBase.Run(ServicesToRun);
}
}
}
[/CODE]
I have tested this and it works. It installs or uninstalls the service. No paths etc required.
Now I plan to have a VBScript or JScript executing the /i & /u from the InstallShield LE project. Thing is that all this is new to me and I have never used any of those scripting languages nor have I used any custom actions or such.
Can anyone help?
I have a C# project which will run as a Windows Service.
My plan is to have a self installing service.
I modified my Program.cs as follows:
[CODE]
namespace hackawaysprogram
{
static class Program
{
///
/// The main entry point for the application.
///
public static void Main(string[] args)
{
if (args.Length > 0 && args[0].Equals("/i") || args[0].Equals("/u"))
{
if (args[0] == "/i")
{
System.Configuration.Install.ManagedInstallerClass.InstallHelper(new[] { Assembly.GetExecutingAssembly().Location });
}
else if (args[0] == "/u")
{
System.Configuration.Install.ManagedInstallerClass.InstallHelper(new[] { "/u", Assembly.GetExecutingAssembly().Location });
}
return;
}
ServiceBase[] ServicesToRun;
ServicesToRun = new ServiceBase[]
{
new DSmsService()
};
ServiceBase.Run(ServicesToRun);
}
}
}
[/CODE]
I have tested this and it works. It installs or uninstalls the service. No paths etc required.
cmd > hackaways.exe /i
or
cmd > hackaways.exe /u
Now I plan to have a VBScript or JScript executing the /i & /u from the InstallShield LE project. Thing is that all this is new to me and I have never used any of those scripting languages nor have I used any custom actions or such.
Can anyone help?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 19, 2011
10:07 AM
I will have to look into alternative paths. Wix & Merge module is one alternative as previously mentioned.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 25, 2011
05:04 AM
You don't need script to run an .exe as a custom action (or is this functionality blocked in the Limited Edition?).
Stefan Krueger
InstallSite.org
InstallSite.org
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 25, 2011
05:08 AM
Stefan Krueger wrote:
You don't need script to run an .exe as a custom action (or is this functionality blocked in the Limited Edition?).
OK, well all this is so new to me that I don't know.
I know that the only scripts I can execute is VBScript or JScript not the InstallScript. Anyways, I solved it using .msm and Wix together with IS2011.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 25, 2011
06:31 AM
And you don't need an EXE to install a service.
http://blog.deploymentengineering.com/2011/01/augmenting-installshield-using-windows_19.html
Also if I needed to run an EXE in a 2010 LE project, I'd use the WiX QuietExecCA pattern. It eliminates the cmd window popup, logs the output and handles a host of other problems that can occur when calling EXE's.
http://blog.deploymentengineering.com/2011/01/augmenting-installshield-using-windows_19.html
Also if I needed to run an EXE in a 2010 LE project, I'd use the WiX QuietExecCA pattern. It eliminates the cmd window popup, logs the output and handles a host of other problems that can occur when calling EXE's.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 25, 2011
06:40 AM
Christopher Painter wrote:
And you don't...
Anyone having questions regarding creating a service then check Christopher's blog post on the subject. Big thanks to Christopher!