none
Service application installation fail RRS feed

  • Question

  • The service application was made by using C# and the following errors are displayed
    at the installation, and I do not understand the cause and am embarrassed.
    Could the person who knows the method of settlement teach someone?
    By the way, the error is displayed before the user/password is input.

    ---------------------------------------
    Running a transacted installation.
                   :
    An exception occurred during the Install phase.
    System.Security.SecurityException: The source was not found, but some or all eve
    nt logs could not be searched.  Inaccessible logs: Security.

    Wednesday, April 23, 2008 8:45 AM

Answers

  •  

    From what I understand, you have an application called installutil correct?

    This throws an error during installation of a service, correct?

    you are running Windows Vista correct?

     

    If so, do the following.

     

    go to start > All Programs > Microsoft Visual Studio 2005 (or 2008) > Visual Studio Tools

     

    and right click on "Visual Studio version Command Prompt" and go to "Run as Administrator"

     

    Enter the command you are using to install your service.

     

    What happens now?

    Thursday, April 24, 2008 10:10 AM
    Moderator
  • it appears that the service cannot install due to permissions with the user account.

     

    So, make sure the user has administrator priviledges to install your application.

    Wednesday, April 23, 2008 8:57 AM
    Moderator

All replies

  • it appears that the service cannot install due to permissions with the user account.

     

    So, make sure the user has administrator priviledges to install your application.

    Wednesday, April 23, 2008 8:57 AM
    Moderator
  • Thank you for your quick reply.

    User has Administrator when installutil.

    To wonder is to be displayed the error before it logs it in.

    Mitsuo

     

    Wednesday, April 23, 2008 9:28 AM
  •  

    Are you running custom actions within your installer?
    Wednesday, April 23, 2008 9:54 AM
    Moderator
  • Sorry, I can't understand custom installation.

    I am installing as follows.

     

    (standard out)

    C:\test>c:\windows\Microsoft.NET\Framework\v2.0.50727\installutil C:\test\SCRUM_
    Service.exe
    Microsoft (R) .NET Framework Installation utility Version 2.0.50727.312
    Copyright (c) Microsoft Corporation.  All rights reserved.


    Running a transacted installation.

    Beginning the Install phase of the installation.
    See the contents of the log file for the C:\test\SCRUM_Service.exe assembly's pr
    ogress.
    The file is located at C:\test\SCRUM_Service.InstallLog.
    Installing assembly 'C:\test\SCRUM_Service.exe'.
    Affected parameters are:
       logtoconsole =
       assemblypath = C:\test\SCRUM_Service.exe
       logfile = C:\test\SCRUM_Service.InstallLog
    Installing service Service1...
    Creating EventLog source Service1 in log Application...

    An exception occurred during the Install phase.
    System.Security.SecurityException: The source was not found, but some or all eve
    nt logs could not be searched.  Inaccessible logs: Security.

    The Rollback phase of the installation is beginning.
    See the contents of the log file for the C:\test\SCRUM_Service.exe assembly's pr
    ogress.
    The file is located at C:\test\SCRUM_Service.InstallLog.
    Rolling back assembly 'C:\test\SCRUM_Service.exe'.
    Affected parameters are:
       logtoconsole =
       assemblypath = C:\test\SCRUM_Service.exe
       logfile = C:\test\SCRUM_Service.InstallLog
    Restoring event log to previous state for source Service1.
    An exception occurred during the Rollback phase of the System.Diagnostics.EventL
    ogInstaller installer.
    System.Security.SecurityException: The source was not found, but some or all eve
    nt logs could not be searched.  Inaccessible logs: Security.
    An exception occurred during the Rollback phase of the installation. This except
    ion will be ignored and the rollback will continue. However, the machine might n
    ot fully revert to its initial state after the rollback is complete.

    The Rollback phase completed successfully.

    The transacted install has completed.
    The installation failed, and the rollback has been performed.

    C:\test>

     

    (Install log)

     

    Installing assembly 'C:\test\SCRUM_Service.exe'.
    Affected parameters are:
       logtoconsole =
       assemblypath = C:\test\SCRUM_Service.exe
       logfile = C:\test\SCRUM_Service.InstallLog
    Installing service Service1...
    Creating EventLog source Service1 in log Application...
    Rolling back assembly 'C:\test\SCRUM_Service.exe'.
    Affected parameters are:
       logtoconsole =
       assemblypath = C:\test\SCRUM_Service.exe
       logfile = C:\test\SCRUM_Service.InstallLog
    Restoring event log to previous state for source Service1.
    An exception occurred during the Rollback phase of the System.Diagnostics.EventLogInstaller installer.
    System.Security.SecurityException: The source was not found, but some or all event logs could not be searched.  Inaccessible logs: Security.
    An exception occurred during the Rollback phase of the installation. This exception will be ignored and the rollback will continue. However, the machine might not fully revert to its initial state after the rollback is complete.

    Regards,

     

    Wednesday, April 23, 2008 10:25 AM
  • 1) Which Operating System are you running?

    2) Are you logged in as the Administrator user when installing this service?

    3) How is the installer created?

    4) Does this happen on this particular machine or other machines also?

    Wednesday, April 23, 2008 10:29 AM
    Moderator
  •  Thank you for your consideration.

     

    1) Which Operating System are you running?

    Windows Vista.

     

    2) Are you logged in as the Administrator user when installing this service?

    Yes,both user has Administrator privileges.

     

    3) How is the installer created?

    I am not create, only be running as standard out.

     

    4) Does this happen on this particular machine or other machines also?

    Yes! I tried on Windows 2003 Server , then installutil has completed successfully.

    Why can't install at vista(Ultimate)?? 

     

    Mitsuo

     

     

     

     

    Thursday, April 24, 2008 1:29 AM
  • Looks like a UAC issue, so when running the application in Vista, right click on it and go to "Run as Administrator"

     

    What happens now?

     

    Thursday, April 24, 2008 7:01 AM
    Moderator
  • Thank you for your consideration.

    I tried with notepad.exe, and execute as administrator, but no special message were displayed.

    And notepad.exe started normally.

     

    Mitsuo

     

     

    Thursday, April 24, 2008 9:12 AM
  • Have you tried it with the application in question?

    Thursday, April 24, 2008 9:20 AM
    Moderator
  • Thank you,

    The meaning of the application is not understood.
    Is it a service application?
    The message is only displayed execution from service if it is so.
    Mitsuo

     

    Thursday, April 24, 2008 10:00 AM
  •  

    From what I understand, you have an application called installutil correct?

    This throws an error during installation of a service, correct?

    you are running Windows Vista correct?

     

    If so, do the following.

     

    go to start > All Programs > Microsoft Visual Studio 2005 (or 2008) > Visual Studio Tools

     

    and right click on "Visual Studio version Command Prompt" and go to "Run as Administrator"

     

    Enter the command you are using to install your service.

     

    What happens now?

    Thursday, April 24, 2008 10:10 AM
    Moderator
  • Thank you for your consideration.

    That's correct , sorry I did not know the existence of the tool.

    Following are stdout of Visual Studio version Command Prompt

    -----------------------------------------------------------------------------------------------------

    C:\test>c:\windows\Microsoft.NET\Framework\v2.0.50727\installutil C:\test\SCRUM_
    Service.exe
    Microsoft (R) .NET Framework Installation utility Version 2.0.50727.312
    Copyright (c) Microsoft Corporation.  All rights reserved.


    Running a transacted installation.

    Beginning the Install phase of the installation.
    See the contents of the log file for the C:\test\SCRUM_Service.exe assembly's pr
    ogress.
    The file is located at C:\test\SCRUM_Service.InstallLog.
    Installing assembly 'C:\test\SCRUM_Service.exe'.
    Affected parameters are:
       logtoconsole =
       assemblypath = C:\test\SCRUM_Service.exe
       logfile = C:\test\SCRUM_Service.InstallLog
    Installing service Service1...
    Creating EventLog source Service1 in log Application...

    An exception occurred during the Install phase.
    System.InvalidOperationException: Cannot open Service Control Manager on compute
    r '.'. This operation might require other privileges.
    The inner exception System.ComponentModel.Win32Exception was thrown with the fol
    lowing error message: ?????????????.

    The Rollback phase of the installation is beginning.
    See the contents of the log file for the C:\test\SCRUM_Service.exe assembly's pr
    ogress.
    The file is located at C:\test\SCRUM_Service.InstallLog.
    Rolling back assembly 'C:\test\SCRUM_Service.exe'.
    Affected parameters are:
       logtoconsole =
       assemblypath = C:\test\SCRUM_Service.exe
       logfile = C:\test\SCRUM_Service.InstallLog
    Restoring event log to previous state for source Service1.

    The Rollback phase completed successfully.

    The transacted install has completed.
    The installation failed, and the rollback has been performed.
    -------------------------------------------------------------------------------------------

    Following are InstallUtil.log

    -------------------------------------------------------------------------------------------

    Running a transacted installation.

    Beginning the Install phase of the installation.
    See the contents of the log file for the C:\test\SCRUM_Service.exe assembly's progress.
    The file is located at C:\test\SCRUM_Service.InstallLog.

    An exception occurred during the Install phase.
    System.InvalidOperationException: Cannot open Service Control Manager on computer '.'. This operation might require other privileges.
    The inner exception System.ComponentModel.Win32Exception was thrown with the following error message: アクセスが拒否されました。.

    The Rollback phase of the installation is beginning.
    See the contents of the log file for the C:\test\SCRUM_Service.exe assembly's progress.
    The file is located at C:\test\SCRUM_Service.InstallLog.

    The Rollback phase completed successfully.

    The transacted install has completed.

    -------------------------------------------------------------------------------------------

     

     

    Thursday, April 24, 2008 11:30 AM
  • Thank you for kindly explaining.
    The problem was solved.
    The cause was UAC as having pointed out by you.
    It seems to have temporarily to turn off UAC for VISTA and to register service.

    We wish to express our gratitude as you are kind.
    Thank you.

    Mitsuo

     

    Friday, April 25, 2008 7:51 AM
  • thanks for your help. It solve my problem quickly.
    Monday, March 1, 2010 11:59 AM
  • This works! Thanks!

     

     

    From what I understand, you have an application called installutil correct?

    This throws an error during installation of a service, correct?

    you are running Windows Vista correct?

     

    If so, do the following.

     

    go to start > All Programs > Microsoft Visual Studio 2005 (or 2008) > Visual Studio Tools

     

    and right click on "Visual Studio version Command Prompt" and go to "Run as Administrator"

     

    Enter the command you are using to install your service.

     

    What happens now?


    Tuesday, March 23, 2010 10:15 AM
  • If you are looking to install a Windows Service that you developed in C# Express, right-click on "Command Prompt" in the Start menu and select "Run as administrator". Once the command prompt window has opened, navigate to C:\Windows\Microsoft.NET\Framework\v[whatever your version of VS is]. Then enter...

    installutil [path to your service's exe file (surround the path in double quotes if the path contains white space)]

    This will work if you have added an Installer class to your project. My installer looks like this...

     

    using System;

    using System.Collections;

    using System.Collections.Generic;

    using System.ComponentModel;

    using System.Configuration.Install;

    using System.Linq;

    using System.ServiceProcess;

     

    namespace DCCrime

    {

        [RunInstaller(true)]

        public partial class DCCrimeServiceInstaller : Installer

        {

            private ServiceProcessInstaller svcProcessInstaller;

            private ServiceInstaller svcInstaller; 

     

            public DCCrimeServiceInstaller()

            {

                InitializeComponent();

            }

     

            // added

            private void InitializeComponent()

            {

                this.svcProcessInstaller = new ServiceProcessInstaller();

                this.svcProcessInstaller.Account = ServiceAccount.LocalSystem;

                this.svcProcessInstaller.Username = null;

                this.svcProcessInstaller.Password = null;

     

                this.svcInstaller = new ServiceInstaller();

                this.svcInstaller.Description = "Downloads DC Crime data and inserts it into an Oracle database.";

                this.svcInstaller.DisplayName = "DCCrimeService";

                this.svcInstaller.ServiceName = "DCCrimeService";

                this.svcInstaller.StartType = ServiceStartMode.Automatic;

                this.Installers.AddRange(new Installer[] { this.svcProcessInstaller, this.svcInstaller });

            }

        }

    }

    Sunday, February 6, 2011 9:00 PM
  • Click to serviceProces­sInstaller1 and change the Account property to a value you need. It's an account under which the system runs the service. Account descriptions can be found in ServiceAccount enumeration.

     

    http://www.csharp-examples.net/create-windows-service/

     

    That work for me, i have the same problem...

    Thursday, August 11, 2011 4:35 PM
  • Hi ahmedilyas,

    I got the same problem and solved when Command Prompt is run as Administrator. There are lot of problems that can be solved in this way. Reason is Win07 runs executable not in the Admin mode by default.

    Thank you.

    Thursday, January 5, 2012 7:01 AM
  • Thanks man
    Thursday, July 19, 2012 6:10 AM
  • Thanks a lot..... it works !!! Though i am working VS 2010. I tried several ways of giving permissions to different folders.
    Wednesday, September 12, 2012 11:11 PM
  • I just restarted my computer and it installs fine now for some reason. It may be because I'm on my work domain (when I go home, I'm not sure if my computer adjusts the domain settings properly and it screws up a lot of stuff). 

    Anyways, you may want to try turnin it off an on again.

    Tuesday, June 11, 2013 5:48 PM
  • Thanks ahmedilyas its work fine .A lot of thanks

    Alert

    Tuesday, May 6, 2014 12:43 PM