473,511 Members | 15,477 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Install c++ windows service on the system

Hi,
I created a windows service with Visual Studio 2008 C++ Express Edition
(dotnet 3.0).

The service is running fine. I can start and stop it and is working.

But I can only install it by installing a dummy service and then modify
the call for the service in the registry. This is not an elegant way of
installing it :-(

In the code I have the following relevant lines:
[RunInstallerAttribute(true)]
public ref class LucyServiceInstaller: public Installer {
private:
ServiceInstaller^ serviceInstaller;
ServiceProcessInstaller^ processInstaller;

public:
LucyServiceInstaller() {
processInstaller=gcnew ServiceProcessInstaller();
serviceInstaller=gcnew ServiceInstaller();

processInstaller->Account =ServiceAccount::LocalSystem;
serviceInstaller->StartType =ServiceStartMode::Manual;
serviceInstaller->ServiceName="LucyInstaller";

Installers->Add(serviceInstaller);
Installers->Add(processInstaller);
}

};
I can't find any installutil.exe on my system for dotnet 3.0 so I found
out that I should use the installutil of dotnet 2.0.
I tried it but it failed with the following error:
C:\LucyService>c:\WINDOWS\Microsoft.NET\Framework\ v2.0.50727\InstallUtil.exe
LucyService.exe
Microsoft (R) .NET Framework-Installationsprogramm, Version 2.0.50727.832
Copyright (c) Microsoft Corporation. Alle Rechte vorbehalten.

Beim Initialisieren der Installation ist eine Ausnahme aufgetreten:
System.IO.FileLoadException: Es wird versucht, eine nicht überprüfbare
ausführba
re Datei mit Fixups zu laden (IAT mit mehr als 2 Abschnitten oder ein
TLS-Abschnitt). (Ausnahme von HRESULT: 0x80131019)

Sorry this is a german version. It means that one file is not
verifiable. But which file?

Thanks for any hints, Gérôme

Nov 6 '08 #1
0 2645

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
5874
by: René Beumer | last post by:
I am trying to install a windows service written in .net 2003 on my Windows 2000 computer. I have followed the walkthru given in msdn but the service fails to install with 'requested registry...
4
386
by: DraguVaso | last post by:
Hi, I developped a Windows Service in VB.NET (2005). I need to have it installed two times on 1 machine. When I want to install it a second time, the setup doesn't allow me to install it again...
0
2746
by: Stuart Whelan | last post by:
I am writing a service in C# with an internal service installer. I am running XP Pro SP with VS7.1 and .NET 1.1 It installed okay the first time, but during uninstall the app crashed. Now I...
3
56929
by: Jeremy S. | last post by:
On my dev machine (XP/Pro with VS.NET 2003) I have been developing a Windows Service and installing it on the local machine by opening the Visual Studio Command Prompt and then executing . Now I...
2
7971
by: Fan Wang | last post by:
Hi All, I wrote a windows service with C# as below. But I can't install it with installutil.exe. I got an error message " Exception occurred while initializing the installation:...
5
11652
by: Alex Nitulescu | last post by:
Hi. I'm trying to make MSMQ work, so I go to Control Panel, Windows Components, I select MSMQ (Message Queuing Client Setup, actually) and about half-way through I get a nice message box saying ...
3
4002
by: Chad Smith | last post by:
Hi, I have created a .NET deployment project in Visual Studio 2003. I have specified an entry point into my own code in this installer which launches into the familiar: public override void...
5
7704
by: Ajith Menon | last post by:
I have to install .NET framework 3.0. I already have .NET Framework 1.1 installed on my machine. I don't want to remove framework 1.1 since some of the critical applications are using it. While...
1
20330
by: =?Utf-8?B?Qi5BaGxzdGVkdA==?= | last post by:
Hi all, This is something that I have been toying with for about a week now. What I want to achieve is Install a Service with Customised parameters (using InstallUtil.exe) for User Name. Example...
1
5240
by: Israel | last post by:
I found it surprisingly unintuitive and difficult to get the installation code to work properly and I found very little help on the google groups so I figured I’d post the things that burned me so...
0
7252
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7153
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7371
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7432
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7093
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5676
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5077
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3230
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
1
791
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.