Click here to Skip to main content
15,881,882 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
Hi anybody
I wrote a windows service by visual studio 2010 .
I installed and tested it on my laptop by InstallUtil.exe(from windows\.net\ framework 2 folder).
But when installing it on a windows server 2008 it raise this error:
Please note I have administrator privileged on this server .
C:\c:\Windows\Microsoft.NET\Framework\v2.0.50727\InstallUtil.exe
-i c:\FileManitor\AspcFileManitor.exe
Microsoft (R) .NET Framework Installation utility Version 2.0.50727.4927
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:\FileManitor\AspcFileManitor.exe asse
mbly's progress.
The file is located at c:\FileManitor\AspcFileManitor.InstallLog.
Installing assembly 'c:\FileManitor\AspcFileManitor.exe'.
Affected parameters are:
   logtoconsole =
   assemblypath = c:\FileManitor\AspcFileManitor.exe
   i =
   logfile = c:\FileManitor\AspcFileManitor.InstallLog
Installing service ASPC File Monitor...
Creating EventLog source ASPC File Monitor in log Application...
An exception occurred during the Install phase.
System.Security.SecurityException: The source was not found, but some or all eve
nt logs could not be searched.  Inaccessible logs: Security.
The Rollback phase of the installation is beginning.
See the contents of the log file for the c:\FileManitor\AspcFileManitor.exe asse
mbly's progress.
The file is located at c:\FileManitor\AspcFileManitor.InstallLog.
Rolling back assembly 'c:\FileManitor\AspcFileManitor.exe'.
Affected parameters are:
   logtoconsole =
   assemblypath = c:\FileManitor\AspcFileManitor.exe
   i =
   logfile = c:\FileManitor\AspcFileManitor.InstallLog
Restoring event log to previous state for source ASPC File Monitor.
An exception occurred during the Rollback phase of the System.Diagnostics.EventL
ogInstaller installer.
System.Security.SecurityException: The source was not found, but some or all eve
nt logs could not be searched.  Inaccessible logs: Security.
An exception occurred during the Rollback phase of the installation. This except
ion will be ignored and the rollback will continue. However, the machine might n
ot fully revert to its initial state after the rollback is complete.
The Rollback phase completed successfully.
The transacted install has completed.
The installation failed, and the rollback has been performed.

and here is the log file:
Installing assembly 'c:\FileManitor\AspcFileManitor.exe'.
Affected parameters are:
   logtoconsole =
   assemblypath = c:\FileManitor\AspcFileManitor.exe
   i =
   logfile = c:\FileManitor\AspcFileManitor.InstallLog
Installing service ASPC File Monitor...
Creating EventLog source ASPC File Monitor in log Application...
Rolling back assembly 'c:\FileManitor\AspcFileManitor.exe'.
Affected parameters are:
   logtoconsole =
   assemblypath = c:\FileManitor\AspcFileManitor.exe
   i =
   logfile = c:\FileManitor\AspcFileManitor.InstallLog
Restoring event log to previous state for source ASPC File Monitor.
An exception occurred during the Rollback phase of the System.Diagnostics.EventLogInstaller installer.
System.Security.SecurityException: The source was not found, but some or all event logs could not be searched.  Inaccessible logs: Security.
An exception occurred during the Rollback phase of the installation. This exception will be ignored and the rollback will continue. However, the machine might not fully revert to its initial state after the rollback is complete.
Posted
Updated 19-Jul-11 19:55pm
v2
Comments
Herman<T>.Instance 20-Jul-11 3:29am    
you use the installutil in the CMD command (DOS Box)? Did you start the CMD command with run as administrator option?
Sergey Alexandrovich Kryukov 20-Jul-11 3:37am    
What are you talking about? There is not such thing as "DOS Box" (anymore). This is no a "command" either, just a regular application CMD.EXE.
--SA
Herman<T>.Instance 20-Jul-11 3:45am    
this is how most people still see it. A DOSBox whether it exists or not anymore. The point was that he had to run it as administrator.
Sergey Alexandrovich Kryukov 20-Jul-11 3:54am    
Sure, a good point. But why repeat wrong terms, only to further confuse people?
--SA
Herman<T>.Instance 20-Jul-11 3:55am    
maybe it is the new term that confuses people ;)

It solved !
However I has administrator privileged , I should run Command prompt windows With "As administrate" option !
I found this link:Service application installation fail[^]
 
Share this answer
 
Comments
[no name] 20-Jul-11 3:47am    
Perfect. +5.
[no name] 20-Jul-11 3:48am    
Bookmarked it for future reference.
Sandeep1686 11-Jun-13 6:53am    
Thanks. Your solution helped me.
An additional variation.
I find it easier to copy installutil.exe,InstallUtilLib.dll and InstallUtil.exe.config to the target directory.
Then navigate the commandprompt to the target directory and run installutil -i Target.exe
I get sick of mistyping long directory paths and having installutil complain it can't find the target file.
 
Share this answer
 
yes by running visual basic cmd prompt as run as administrator it solve the error like
"installation failed,and rollback has been performed".
 
Share this answer
 
Comments
CHill60 20-Feb-15 6:44am    
The question is over 3 years old and you have added nothing at all to the previous solutions. This is likely to attract downvotes

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900