WindowsService問題



正在開始安裝的“安裝”階段。
查看日志文件的內容以獲得 C:\Users\Ramon.Fu\Documents\Visual Studio 2005\Projects
\Test_Service\Test_Service\bin\Debug\test_service.exe 程序集的進度。
該文件位於 C:\Users\Ramon.Fu\Documents\Visual Studio 2005\Projects\Test_Service\
Test_Service\bin\Debug\test_service.InstallLog。
正在安裝程序集“C:\Users\Ramon.Fu\Documents\Visual Studio 2005\Projects\Test_Ser
vice\Test_Service\bin\Debug\test_service.exe”。
受影響的參數是:
logtoconsole =
assemblypath = C:\Users\Ramon.Fu\Documents\Visual Studio 2005\Projects\Test_S
ervice\Test_Service\bin\Debug\test_service.exe
i =
logfile = C:\Users\Ramon.Fu\Documents\Visual Studio 2005\Projects\Test_Servic
e\Test_Service\bin\Debug\test_service.InstallLog
正在安裝服務 Service1...
正在日志 Application 中創建 EventLog 源 Service1...

在“安裝”階段發生異常。
System.Security.SecurityException: 未找到源,但未能搜索某些或全部事件日志。不可
訪問的日志: Security。


正在開始安裝的“回滾”階段。
查看日志文件的內容以獲得 C:\Users\Ramon.Fu\Documents\Visual Studio 2005\Projects
\Test_Service\Test_Service\bin\Debug\test_service.exe 程序集的進度。
該文件位於 C:\Users\Ramon.Fu\Documents\Visual Studio 2005\Projects\Test_Service\
Test_Service\bin\Debug\test_service.InstallLog。
正在回滾程序集“C:\Users\Ramon.Fu\Documents\Visual Studio 2005\Projects\Test_Ser
vice\Test_Service\bin\Debug\test_service.exe”。
受影響的參數是:
logtoconsole =
assemblypath = C:\Users\Ramon.Fu\Documents\Visual Studio 2005\Projects\Test_S
ervice\Test_Service\bin\Debug\test_service.exe
i =
logfile = C:\Users\Ramon.Fu\Documents\Visual Studio 2005\Projects\Test_Servic
e\Test_Service\bin\Debug\test_service.InstallLog
正在將事件日志還原到源 Service1 的前一狀態。
在 System.Diagnostics.EventLogInstaller 安裝程序的“回滾”階段發生異常。
System.Security.SecurityException: 未找到源,但未能搜索某些或全部事件日志。不可
訪問的日志: Security。
在安裝的“回滾”階段發生異常。將忽略該異常並繼續回滾。但是,在完成回滾后計算機可
能無法完全還原到它的初始狀態。

“回滾”階段已成功完成。

已完成事務處理安裝。
安裝失敗,已執行回滾。

 

解決方案:

 

用管理員身份運行 cmd.exe 然后再次嘗試 installutil,這個問題多半是因為 UAC 導致的。

您的系統看上去像是 Windows Vista 或者 Windows 7,所以需要管理員身份運行它。


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM