3

VS 2010 (32 ビット) を使用して Windows サービスを開発しましたが、「任意の CPU」用にコンパイルしました。

必要な exe およびその他のファイルを Windows 2012 Server (Standard エディション - 64 ビット) に転送し、InstallUtil を使用してインストールしようとしています。

コマンドプロンプトのパスを「C:\Windows\Microsoft.NET\Framework64\v4.0.30319」に変更し、コマンドを実行しました

InstallUtil "D:\MyPath\MyService.exe"

しかし、インストールはエラーで失敗します

    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.

InstallUtil管理者として実行してみました。サーバーに Visual Studio コマンド プロンプトがありません。

どうすればこれを解決できますか?

4

1 に答える 1

-1

拡張子(.exe)を付け、引用符を付けないでください。それは:

InstallUtil.exe D:\MyPath\MyService.exe

また、"Windows PowerShell" を使用している場合は、"/." を追加する必要があります。それは:

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

常にオンになったらC:\Windows\Microsoft.NET\Framework\v4.0.30319、管理者として実行します。

于 2014-03-20T20:09:29.157 に答える