473,434 Members | 1,462 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,434 software developers and data experts.

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 2636

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

Similar topics

2
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
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
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
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
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
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
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
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
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
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
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,...
0
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
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
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...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.