I had several problems recently.
Issue 1:
The issue was that the software I support was unable to install itself, due to permission. The strangest thing was that cacls was not present and had to get it from somewhere else.
After forcing the temp directory to the system user everything worked as a charm. However before rushing - delete the temporary files. It seems that the program was unable to install due to a corrupt directory and because it was not able to write to it from the system user.
1. cacls "C:\WINDOWS\Temp" /G <adminuser>:Fotherwise I can not read the contents of the directory ...2. Rename the corrupt directory. 3. cacls "C:\WINDOWS\Temp" /G SYSTEM:F
Note maybe there is a way to add both users from cacls but I was kind of in a hurry.
Issue 2:
I needed to remotely install the software I support so I needed Remote Registry and RPC enabled. The Firewall had to be shut - note if you haven't enabled Remote Desktop - don't disable the firewall, it is better to set it start manually. Other workaround would be to just enable the service in the firewall - in my case it was file and printer sharing see issue 5. So you can do this with this script. Check the references for further info.
net start RemoteRegistry
net start rpcss
net stop mpssvc
sc config RemoteRegistry start=auto
sc config rpcss start=auto
sc config mpssvc start=disable
Issue 3:
How do you fix a messed up installations remotely? This relates to the above Issue 2. You need 3 things only.
1. Admin rights.
2. Remote Registry you can use the connect to PC feature.
3. Services you can connect to remote PCs.
And that's it, then restart and re-install the software.
Issue 4:
How to get the built in administrator:
net user administrator /active:yes
net user administrator password
Issue 4:
How to get the built in administrator:
net user administrator /active:yes
net user administrator password
Issue 5:
How to enable file and printer sharing
netsh firewall set service type=fileandprint mode=enable
References:
http://support.microsoft.com/kb/149427
http://www.wikihow.com/Change-a-Computer-Password-Using-Command-Prompt
http://www.howtogeek.com/howto/windows-vista/enable-the-hidden-administrator-account-on-windows-vista/
http://technet.microsoft.com/en-us/library/cc737069(v=ws.10).aspx