Insatll Windows service Windows 7

Posted on 2011-10-26
Last Modified: 2012-05-12
I have a service I created and cannot get it to install on Windows 7. I recently upgraded my PC from Vista where I never had an issue. I ran the same command I do on Vista but keep getting an error. See below.

Installing assembly 'C:\LHSystemHealth\LHSystemHealth.exe'.
Affected parameters are:
   logtoconsole =
   logfile = C:\LHSystemHealth\LHSystemHealth.InstallLog
   assemblypath = C:\LHSystemHealth\LHSystemHealth.exe
Installing service LHSystemHealthMon...
Creating EventLog source LHSystemHealthMon in log Application...
Rolling back assembly 'C:\LHSystemHealth\LHSystemHealth.exe'.
Affected parameters are:
   logtoconsole =
   logfile = C:\LHSystemHealth\LHSystemHealth.InstallLog
   assemblypath = C:\LHSystemHealth\LHSystemHealth.exe
Restoring event log to previous state for source LHSystemHealthMon.
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.

So I then changed to an older version of the .Net framework and got a error that the path to the .Net framework folder was not accessible due to permissions. I am logged in as an administrator so there should not be any issues.

Help would be appreciated.

The service is located in a folder on the C drive.

Question by:tybarton
    1 Comment

    Accepted Solution

    I just got it to work by running the command window as an administrator. Although it worked It seems stupid to have to do that.


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    A while ago, I was working on a Windows Forms application and I needed a special label control with reflection (glass) effect to show some titles in a stylish way. I've always enjoyed working with graphics, but it's never too clever to re-invent …
    1.0 - Introduction Converting Visual Basic 6.0 (VB6) to Visual Basic 2008+ (VB.NET). If ever there was a subject full of murkiness and bad decisions, it is this one!   The first problem seems to be that people considering this task of converting…
    Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
    This video is in connection to the article "The case of a missing mobile phone (". It will help one to understand clearly the steps to track a lost android phone.

    794 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now