Installing a process as a service on Windows 8 without "Administrator" account?

0

I am trying to start httpd.exe on windows 8 as a service. This is the instruction that is giving me problems:

Start apache in a DOS box:
>httpd.exe
Install as a service:
>httpd.exe -k install

The first command works fine, but the second fails as follows:

C:\Apache24\bin>httpd.exe -k install
Installing the Apache2.4 service
(OS 5)Access is denied.  : AH00369: Failed to open the WinNT service
manager, perhaps you forgot to log in as Adminstrator?

The account I am using is a local account with administrator privileges. When using this account I am able to install software, administer other users accounts, etc. I do not see an "Adminstrator" or "Administrator" account on the "Control Panel\All Control Panel Items\User Accounts\Manage Accounts" screen. I have tried the following, as suggested in another post:

runas /noprofile /user:Administrator cmd

That results in a prompt for a password, which I do not seem to know. The PC came with Windows 8 preinstalled and if I was ever asked for an Administrator password I can not recall my response.

So my question is, how can I install a running application as a service on Windows 8 without knowing the password to the "Administrator" account? Or, how can I discover or reset the password to the "Administrator" account?

sdewey

Posted 2014-01-02T03:48:36.710

Reputation: 1

Question was closed 2014-01-05T12:31:03.137

1Did you tried to run the cmd as an admin by right click on it and then select the "Run as Admin"?\ – avirk – 2014-01-02T03:58:10.813

Answers

1

The account I am using is a local account with administrator privileges.

Wrong, and the source of your problems.

With the advent of Windows NT 6.0 ("Vista") came what is known as User Account Control. There's a long story behind it, which is too much detail for an answer here. But the short of it is that you are not using an account with administrator privileges. You are using a filtered process token for running all of your programs that only has ordinary privileges.

There's a lot of mechanism under the covers that is mostly hiding this from you, including mechanisms that recognize the setup/installation utilities for various softwares and (subject to administrator approval via a dialogue box) run those programs with the administrator privileges that have been filtered out of the process token that you are normally using.

Those mechanisms aren't recognizing httpd.exe as a setup program. (There's a long discussion to be had of whether applications should combine privileged and non-privileged operations in a single everything-but-the-kitchen-sink program, too. But that's too much for this answer, as well.) So you have to explicitly run it with administrator privileges. Either run your command interpreter with administrator privileges using its Run as administrator context menu option, or similarly run httpd.exe directly (supplying the command arguments of course) with administrator privileges.

Further reading

JdeBP

Posted 2014-01-02T03:48:36.710

Reputation: 23 855

0

You will not be able to start it as a non admin user or "discover" the password. Either reset the admin password or move on with your life. Try a boot disc to do this. See: How do I reset the Windows XP Administrator password?

MDT Guy

Posted 2014-01-02T03:48:36.710

Reputation: 3 683

When you say "a non admin user" what do you mean? As I said, my regular account does have admin privileges. I am the only one who ever does anything on this computer. It is my personal machine and I have been managing it since I got it. Now all of a sudden I am being asked to use the "Adminstrator" account, which I have never seen or heard of with regards to this machine. I can even stop and restart services in the "Component Services" dialog. But I can't start a new service?!! Something doesn't sound right. – sdewey – 2014-01-02T04:21:33.980

0

The reason why you cannot find the Admin account on your "Control Panel\All Control Panel Items\User Accounts\Manage Accounts" is that the Admin account is disabled. since your account has admin rights, you can go to "Computer management\Local Users and Groups\Users", Enable the Administrator account and set the password for it (Not a blank password) because cmd is going to reject it, then run the "runas /noprofile /user:Administrator cmd" command or log in as an Administrator to test if the execution file will run under those conditions.

Trader

Posted 2014-01-02T03:48:36.710

Reputation: 26