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?