Hi Richard,

I did use the Customer Action Install/Uninstall combination to install
mywinservice.exe.

I change my Custom Action Install/Uninstall option to Install the Primary
Output from mywinservice.exe, that sort of helped me to get around this
problem. Now I can install/reinstall my service without any problem.

Now I am running into other problem, mywinservice works fine on my local
development machine. I deployed successfully to my test machine. I tried to
start the service which is configured with
Start Type : Manual
Log On As : LocalSystem

I am getting this error

"Could not start the mywinservice service on Local Computer.
Error 1053: The service did not respond to the start or control request in a
timely fashion."

I found an error log to the Event log also which is from .NET Runtime.

Did you ever had this problem ?

thanks

Raj

-----Original Message-----
From: Moderated discussion of advanced .NET topics.
[mailto:[EMAIL PROTECTED] Behalf Of Hein, Richard
Sent: Tuesday, September 09, 2003 11:30 PM
To: [EMAIL PROTECTED]
Subject: Re: [ADVANCED-DOTNET] Automating Windows Service Installation


I have had these problems before myself.

Have you added a custom action for the uninstall action?  If not, be
sure to add one.

Make sure to check the event logs for any MSI errors or warnings as
well.

You say you "tried" to uninstall the service using installutil /u.  Does
that mean the attempt failed?  If so, what was the error message
returned from installutil?  You can use the /showcallstack switch for
more information to aid in debugging.  If you cannot uninstall your
service using installutil /u, you will not be able to uninstall the
service using MSI.

If you cannot stop your service, you cannot uninstall it.  Try to kill
it in task manager if this is the case.  If that doesn't work, set the
start mode to disabled and reboot (from the sounds of it, this is not
the problem, however, and assumes that your service is set to start
automatically).

If none of the above works, try to delete the registry keys that refer
to your service.  You should be able to find it under
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\[YourServiceName].
Reboot so the SCM can refresh the list of services, then try installing
your new version.

If MSI still says you already have a version installed, then the problem
is that MSI still thinks the service is installed, even when it isn't.
Check your MSI tables for the product GUID used for the service and
search for them in the registry and delete them.  You can find the
product GUID listed in your Setup project properties, or use ORCA (if
you need more information, I will try to help, but I have only done that
once and can't remember exactly what I did - maybe someone else will
have more information about that).  Reboot and try again.

Of course, the best solution is to have a nice clean ghost image or
other form of backup to revert to, before you test your new software. ;)
I have learned the hard way.

HTH,

Richard A. Hein

-----Original Message-----
From: Muthuraj Velayutham [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 09, 2003 6:11 PM
To: [EMAIL PROTECTED]
Subject: Re: [ADVANCED-DOTNET] Automating Windows Service Installation

Hi Pete,

I uninstalled my windows service using Add/Remove programs. I tried to
reinstall after somechanges to my windows service, but I haven't changed
anything to the Setup/Install Project.

Now I am getting error from Windows Installer

"Another version of this product is already installed. Intallation of
this
version cannot continue. To configure or remove the existing version of
this
product use Add/Remove Programs on the Control Panel"

I stopped the windows service. I tried to uninstall my Windows Service
using
installutil /u mywindowsservice.exe.

I ran Add/Remove program again to remove the windows service.

I deleted the directory of the windows directory. I restarted the
machine.

When I try to install it again I am getting the same error as

"Another version .... blah blah blah"

I don't know why doesn't allow to uninstall the service.

Raj

-----Original Message-----
From: Moderated discussion of advanced .NET topics.
[mailto:[EMAIL PROTECTED] Behalf Of Brown, Peter
Sent: Tuesday, September 09, 2003 9:37 AM
To: [EMAIL PROTECTED]
Subject: Re: [ADVANCED-DOTNET] Automating Windows Service Installation


You don't need to do all that if you add the custom installer to your
project and then add a deployment project to the solution.

I'm almost positive that installutil fails if you don't have the
installer
in your project anyway, so I'm not sure where the original disconnect
is.

Pete

------------------------------------------------------------------
 Pete Brown - Lead Systems Architect, MCAD.Net, MCSD 5,6
 Personal Site : http://www.irritatedVowel.com
    (wallpaper, games, .net, model railroading, birds, photography)
------------------------------------------------------------------
 Be sure to check out www.vb-faq.com and www.codehound.com


-----Original Message-----
From: Paulo Sacramento [mailto:[EMAIL PROTECTED]
Sent: Monday, September 08, 2003 6:56 PM
To: [EMAIL PROTECTED]
Subject: Re: [ADVANCED-DOTNET] Automating Windows Service Installation

I'm not sure this is close to what you want, but here goes anyway. I
wrote
it with the same intention as you but with a command-line install.

The parameter "string version" is the runtime version, which will be
something like "v1.0.3705" or "v1.1.4322" (releases 1.0 and 1.1
respectively). It's a bit messy but it works:

private static void RunProcess(string version)

{

    Process p = new Process();

    ProcessStartInfo psi = new ProcessStartInfo();


psi.FileName="\""+Environment.GetEnvironmentVariable("windir")+"\\Micros
oft.
Net\\Framework\\"+version+"\\"+"installutil.exe\"";

    psi.Arguments = "BirthdayService.exe"; //replace this by the name of
your service executable

    psi.UseShellExecute = false;

    psi.RedirectStandardOutput=true;

    p.StartInfo = psi;

    p.Start();

    p.WaitForExit();

    Console.WriteLine(p.StandardOutput.ReadToEnd());

}


Paulo Sacramento

===================================
This list is hosted by DevelopMentor(r)  http://www.develop.com
NEW! ASP.NET courses you may be interested in:

2 Days of ASP.NET, 29 Sept 2003, in Redmond
http://www.develop.com/courses/2daspdotnet

Guerrilla ASP.NET, 13 Oct 2003, in Boston
http://www.develop.com/courses/gaspdotnet

View archives and manage your subscription(s) at
http://discuss.develop.com

===================================
This list is hosted by DevelopMentor(r)  http://www.develop.com
NEW! ASP.NET courses you may be interested in:

2 Days of ASP.NET, 29 Sept 2003, in Redmond
http://www.develop.com/courses/2daspdotnet

Guerrilla ASP.NET, 13 Oct 2003, in Boston
http://www.develop.com/courses/gaspdotnet

View archives and manage your subscription(s) at
http://discuss.develop.com

===================================
This list is hosted by DevelopMentor.  http://www.develop.com
NEW! ASP.NET courses you may be interested in:

2 Days of ASP.NET, 29 Sept 2003, in Redmond
http://www.develop.com/courses/2daspdotnet

Guerrilla ASP.NET, 13 Oct 2003, in Boston
http://www.develop.com/courses/gaspdotnet

View archives and manage your subscription(s) at http://discuss.develop.com

===================================
This list is hosted by DevelopMentor�  http://www.develop.com
NEW! ASP.NET courses you may be interested in:

2 Days of ASP.NET, 29 Sept 2003, in Redmond
http://www.develop.com/courses/2daspdotnet

Guerrilla ASP.NET, 13 Oct 2003, in Boston
http://www.develop.com/courses/gaspdotnet

View archives and manage your subscription(s) at http://discuss.develop.com

Reply via email to