我用C#建立了一個Windows Service程式,也同時建立了一個ProjectInstaller。然後產生服務程式的可執行檔,安裝。
當使用installutil.exe工具進行安裝時,提示輸入使用者名稱和密碼。我輸入了我的管理員的使用者名稱和密碼也不行。
後來即使切換到adminitrator使用者下,重啟,再安裝,也需要輸入使用者名稱和密碼,結果還是不對。
以下是提示資訊,請大家看看,是為什麼。謝謝!
Found .NET Framework version 2.0.50727
Installing service "MyServices.exe"
Microsoft (R) .NET Framework Installation utility Version 2.0.50727.42
Copyright (c) Microsoft Corporation. All rights reserved.
Running a transacted installation.
Beginning the Install phase of the installation.
See the contents of the log file for the C:\Program Files\tech\TS.Services\MySer
vices.exe assembly's progress.
The file is located at C:\Program Files\tech\TS.Services\MyServices.InstallLog.
Installing assembly 'C:\Program Files\tech\TS.Services\MyServices.exe'.
Affected parameters are:
logtoconsole =
assemblypath = C:\Program Files\tech\TS.Services\MyServices.exe
logfile = C:\Program Files\tech\TS.Services\MyServices.InstallLog
An exception occurred during the Install phase.
System.ComponentModel.Win32Exception: No mapping between account names and secur
ity IDs was done
The Rollback phase of the installation is beginning.
See the contents of the log file for the C:\Program Files\tech\TS.Services\MySer
vices.exe assembly's progress.
The file is located at C:\Program Files\tech\TS.Services\MyServices.InstallLog.
Rolling back assembly 'C:\Program Files\tech\TS.Services\MyServices.exe'.
Affected parameters are:
logtoconsole =
assemblypath = C:\Program Files\tech\TS.Services\MyServices.exe
logfile = C:\Program Files\tech\TS.Services\MyServices.InstallLog
The Rollback phase completed successfully.
The transacted install has completed.
The installation failed, and the rollback has been performed.
DONE!!!
Press any key to continue . . .