Windows Service Error: Installog access is Denied

21,522

Solution 1

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

Solution 2

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.

Solution 3

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

Share:
21,522

Related videos on Youtube

Parth Bhatt
Author by

Parth Bhatt

I am iPhone and iPad developer. https://github.com/akashraje/BidirectionalCollectionViewLayout ^[-_,A-Za-z0-9]$ NSRegularExpression *reg = [NSRegularExpression regularExpressionWithPattern:@"(#[a-zA-Z0-9_-]+)" options:NSRegularExpressionCaseInsensitive error:nil]; NSString *stringData = @"This is Parth known as #parth and this is an awesome place. I am fan of #scganguly."; int count = [reg numberOfMatchesInString:stringData options:0 range:NSMakeRange(0, [stringData length])]; NSLog(@"%d",count); if(count>0) { NSArray *array = [reg matchesInString:stringData options:0 range:NSMakeRange(0, [stringData length])]; NSLog(@"%@",array); NSMutableArray *stringArray = [[NSMutableArray alloc] init]; for (NSTextCheckingResult *result in array) { NSString *stringFinal = [stringData substringWithRange:result.range]; if(stringFinal != nil) { [stringArray addObject:stringFinal]; } } NSLog(@"stringArray: %@",stringArray); } For @user: @"(@[a-zA-Z0-9_]+)" NSLog(@"Request String: %@", requestString); NSData *requestData = [NSData dataWithBytes: [requestString UTF8String] length: [requestString length]]; // NSString *fileLoc = [[NSBundle mainBundle] pathForResource:@"url" ofType:@"plist" ]; // NSDictionary *fileContents = [[NSDictionary alloc] initWithContentsOfFile:fileLoc]; // NSString *urlLoc = [fileContents objectForKey:@"baseURL"]; NSString *urlLoc = @"http://portal.abc.com/candidate/post-info"; NSLog(@"URL is %@",urlLoc); NSMutableURLRequest *request = [[NSMutableURLRequest alloc] initWithURL: [NSURL URLWithString: urlLoc]]; NSString *postLength = [NSString stringWithFormat:@"%d", [requestData length]]; [request setHTTPMethod: @"POST"]; [request setValue:postLength forHTTPHeaderField:@"Content-Length"]; [request setValue:@"application/json" forHTTPHeaderField:@"Content-Type"]; [request setHTTPBody: requestData]; http://blog.stackoverflow.com/archive/ https://developer.apple.com/library/prerelease/ios/documentation/General/Conceptual/CocoaTouch64BitGuide/Introduction/Introduction.html http://nscookbook.com/2013/03/ios-programming-recipe-19-using-core-motion-to-access-gyro-and-accelerometer/ http://code4app.net/category/coremotion http://www.devx.com/wireless/Article/44799 upload audio file to php ios Android post request on IOS https://developers.facebook.com/docs/ios/share https://github.com/oliverbarreto/FastFavs/blob/master/TODO2.h

Updated on July 09, 2022

Comments

  • Parth Bhatt
    Parth Bhatt almost 2 years

    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?

    • seva titov
      seva titov about 13 years
      Either of these would work. Just make sure you run the command prompt elevated (right click -> run as administrator).
  • Parth Bhatt
    Parth Bhatt about 13 years
    I am running it as Administrator. But still the error doesnt get solved. What could be wrong?
  • Parth Bhatt
    Parth Bhatt about 13 years
    Thanks got it working. Just right clicked the VS2008 Command Prompt and Clicked Run as Administrator. Thanks Felice Pollano. :)
  • crimbo
    crimbo almost 8 years
    Running installutil.exe does not absolutely require administrator permissions. It just hooks into the install code in the executable being installed - so the permissions required depend on that executable. The error message specified in the question is just about permissions to create the log file, which does not require running as administrator. See my answer below...
  • SaundersB
    SaundersB over 7 years
    I had to run Powershell as an Administrator and then installed the service.

Related