• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 141
  • Last Modified:

Insatll Windows service Windows 7

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.

Tyler
0
tybarton
Asked:
tybarton
1 Solution
 
tybartonAuthor Commented:
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.

Tyler
0

Featured Post

Prep for the ITIL® Foundation Certification Exam

December’s Course of the Month is now available! Enroll to learn ITIL® Foundation best practices for delivering IT services effectively and efficiently.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now