none
Window Service Install Security Error in Vista RRS feed

  • Question

  •  Hey Everyone ,I create window service in .net so i install window service use installutility here my short code 



    private static bool CallInstallUtil(string installUtilArguments)

    {

    try

    {

    Process proc = new Process();

    proc.StartInfo.FileName = Path.Combine(InstallUtilPath, "installutil.exe");

    proc.StartInfo.Arguments = installUtilArguments;

    proc.StartInfo.WindowStyle = ProcessWindowStyle.Maximized;

    proc.StartInfo.RedirectStandardOutput = true;

    proc.StartInfo.UseShellExecute = false;

    // proc.StartInfo.CreateNoWindow = true;

    proc.Start();

    string outputResult = proc.StandardOutput.ReadToEnd();

    proc.WaitForExit();

    // check result

    if (proc.ExitCode != 0)

    {

    Console.WriteLine("{0} : failed with code {1}", DateTime.Now, proc.ExitCode);

    Console.WriteLine(outputResult);

    return false;

    }

    }

    catch (Exception ex)

    { }

    return true;

    }


    My window service successfully install in Xp but in Vista they give error like this


    Installing service InternetDetect...

    Creating EventLog source InternetDetect in log Application...

    An exception occurred during the Install phase.

    System.Security.SecurityException: The source was not found, but some or all event logs could not be searched. Inaccessible logs: Security.

    The Rollback phase of the installation is beginning.

    Affected parameters are:

    account = LocalSystem

    logtoconsole =

    Restoring event log to previous state for source InternetDetect.

    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.

    The Rollback phase completed successfully.

    The transacted install has completed.

    The installation failed, and the rollback has been performed.





    please help..... 
    Saturday, December 13, 2008 8:38 PM

Answers

  • Hi!

    This is not a .NET Framework setup error, so you're offtopic. Ask your question in the C# Forum.

    Regards,
    Lucian Baciu, MCTS, http://studentclub.ro/lucians_weblog
    • Marked as answer by Figo Fei Tuesday, December 16, 2008 4:41 AM
    Monday, December 15, 2008 11:08 AM