Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Windows Service Error: Installog access is Denied

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?

like image 777
Parth Bhatt Avatar asked Mar 28 '11 13:03

Parth Bhatt


3 Answers

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.

like image 195
crimbo Avatar answered Oct 24 '22 11:10

crimbo


do you have administrator rights ? Try to run the service setup by launching the command prompt as administartor.

like image 44
Felice Pollano Avatar answered Oct 24 '22 12:10

Felice Pollano


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

like image 22
Shenbaga Priya Avatar answered Oct 24 '22 10:10

Shenbaga Priya