3

I developed a windows service using VS 2010 (32 bit), but compiled it for 'Any CPU'.

I have transferred the required exe and other files onto a Windows 2012 Server (Standard edition - 64 bit), and am now trying to install it using InstallUtil

I have changed the path on my command prompt to "C:\Windows\Microsoft.NET\Framework64\v4.0.30319", and run the command

InstallUtil "D:\MyPath\MyService.exe"

But the install fails with the error

    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.

I have tried running InstallUtil as an administrator. The server doesn't have the Visual Studio command prompt.

How can I solve this?

p.campbell
  • 98,673
  • 67
  • 256
  • 322
user1953684
  • 59
  • 1
  • 5

1 Answers1

-1

I think it should be with the extension (.exe) and without the quotes. It is:

InstallUtil.exe D:\MyPath\MyService.exe

And if you are in "Windows PowerShell" you should add "/.". It is:

./InstallUtil.exe C:\ServicesExample\Services.MyService.exe

Always once you are on: C:\Windows\Microsoft.NET\Framework\v4.0.30319 and running as Admin.

p.campbell
  • 98,673
  • 67
  • 256
  • 322
Daniel Silva
  • 817
  • 8
  • 16