I get following error while installing my Windows service through Command prompt
Access to the path 'C:\Windows\Microsoft.NET\Framework\v2.0.50727\InstallUtil.In
stallLog' is denied.
I am using following command:
C:\Windows\Microsoft.NET\Framework\v2.0.50727>installutil.exe "C:\Hive-WindowsService\HiveBatchProcess\HiveBatchProcess\bin\Debug\HiveBatchProcess.exe" -i
What could be wrong?
Try running from a different directory (eg %TEMP%)- it just needs access to write the log file to the current directory, and by default non-administrators can't write to {{c:\Windows}} subdirectories.
eg:
cd %TEMP%
"C:\Windows\Microsoft.NET\Framework\v2.0.50727\installutil.exe" "C:\Hive-WindowsService\HiveBatchProcess\HiveBatchProcess\bin\Debug\HiveBatchProcess.exe" -i
Depending on what the install logic in HiveBatchProcess.exe does, you may or may not need additional permissions (eg registry access, write access to other directories, etc). But running installutil.exe
does not strictly require administrator permissions.
do you have administrator rights ? Try to run the service setup by launching the command prompt as administartor.
cd "%temp%" then "C:\Windows\Microsoft.NET\Framework\v2.0.50727\installutil.exe" "\ourServiceexe.exe"
i changed the service password to admin password of the server
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With