Tech Support Forum banner
Status
Not open for further replies.

Completely messed up drive C: permissions, lost access and can't regain ownership

20K views 19 replies 4 participants last post by  dclrf  
#1 ·
Hi to all, and sorry for my first post being such a desperate cry for help.

Two weeks ago I've done something very very stupid :banghead:, very similar to what JonBastyan talked about in this thread: http://www.techsupportforum.com/forums/f217/solved-access-denied-fully-609991.html
Difference is my OS is Win7, but I think that most of the help given to Jon (Win Vista) also applies to Win7.

I managed to make an awful mess while trying to establish different permissions for different OS, so that my Win8.1 partition couldn't access my Win7 partition, and while trying to solve that problem I only got things worse and now I'm at a point where I'm pretty desperate.

So after doing a thorough search all over the web, I found that thread and I thought it could help me, and I know that reinstall is always an option but I'd prefer to solve the problem, I'm stubborn.:smile:

I honestly think I'm getting closer to find the solution to my problem and regaining ownership of my C: drive, but when executing some commands suggested by jenae and jcgriff2, I got some weird results.

As I can't gain access to command prompt with any user(I lost the users while trying to solve this problem:confused:) or admin(still have it but it's useless), using the Win7 DVD I went into RE and used the command prompt to type
Code:
C:
The feedback was Access is denied.
Then I typed
Code:
whoami /user >1 & start notepad 1
The feedback was: 'whoami is not recognized as an internal or external command, operable program or batch file.

So I tried at X:\Sources>
Code:
takeown f C:\windows
The feedback was: SUCCESS: The file <or folder>: "C:\windows" now owned by user "\MINWINPC$".

My first question is, who is user "\MINWINPC$"?
My second questions is, using that user can I take ownership of my C: drive and change its permissions?
Third question, what am I doing wrong?

Everyone's help is most welcome, but jenae and jcgriff2, might be the ones who are more familiarized with this subject, I guess.

Thanks in advance.

dclrf
 
#2 ·
Since you are not logged in as a User in the RE command prompt, the whoami /user command will not work. This must be run at the command prompt in Windows once you are logged in as a user.
Booting off of the Windows DVD and choosing Repair Your Computer, should put most things back in order.
Also Your C: drive may not be the Windows OS drive in the RE.
In the RE command prompt, X:\Sources type this exactly as written.
bcdedit |find “osdevice” (Must inc ” and the |), the | before Find is the Upper case \ key) press enter. This will tell you what drive letter the OS is on.It may not be on the C: drive.
Now use the returned as the drive letter for OS, for this example, assume C: or whatever drive letter is the os device. Then you can run the takeown command with that Drive letter.
at the x: sources type:
sfc/scannow /offbootdir=c:\ /offwindir=c:\windows press enter
sfc will run, it can take awhile
This will replace any missing System Files.
 
Save
#3 · (Edited)
Hi, this could be difficult, depends on what you did. Go into the RE, command prompt, and at the x sources prompt type:-

regedit (press enter)

Registry editor will open, highlight the HKEY_LOCAL_MACHINE key and from the main menu click on "File", then click on "Load Hive" a sources window will open on the left select "Computer" then double click on the Local disk (usually C:).

Now navigate to the following folder C:\windows\System32\Config\Software (it is the file that say's only "software") highlight this and click on Open.

A load hive box will open in the key name type:- UAC (press OK).

The registry editor will reappear you will see a new key called UAC press the + next to it to expand, navigate to the following key:-

Software\Microsoft\Windows\CurrentVersion\Policies\System click on "System"
in the right payne locate "EnableLUA" right click on this and select "Modify" in the value data box change the 1 to 0, press OK.

Collapse the expanded keys back to UAC and highlight it, go to "File" and select "Unload Hive" Restart computer.

Now log into your "Admin" account and go to start search and type:-cmd, right click on the returned cmd.exe and select "run as administrator" let us know if cmd prompt opens and the heading includes "administrator"
 
#4 ·
First of all, thank you so much to both of you for taking the time to help me.

@ spun.funk Problem is, that booting with Windows 7 DVD and choosing repair your computer didn't do the trick... I've already tried that before I posted, sorry if I wasn't thorough in my explanation of the situation I'm facing and what I've done to try and repair my Win7 installation. I've also ran the bcedit command before, and I know for sure that Win 7 is on C: and Win 8.1 is on D:
Then I typed at the X: sources the command sfc/scannow /offbootdir=c:\ /offwindir=c:\windows pressed enter, the sfc ran quite fast and then I was presented with many options, I didn't choose any of them as you didn't instruct me to choose any, only thing I did was trying the takeown command once again. The feedback was: SUCCESS: The file <or folder>: "C:\windows" now owned by user "\MINWINPC$".
Still I wonder who or what the h**l is \MINWINPC$ :confused:


@ jenae. Difficult is good and brings me hope, as the feedback I've got from other people that tried to help me was that my Win 7 installation was completely FUBAR :banghead: Of course they weren't Microsoft tech team :wnk:

I was able to do everything you told me until this part “then click on "Load Hive" a sources window will open on the left select "Computer" then double click on the Local disk (usually C:)” that's where the problem began, as I can't open Local Disk C:
I had no problem opening Local Disk D:, the one I have with Win 8.1, but no luck with C:


Any suggestions on how to overcome this situation?
 
#5 ·
Hi, are you using the windows 7 OS dvd to access the RE? If not try using it instead of the advanced boot option "repair your computer". Go into the RE select command prompt, at the prompt type:-

icacls c: /grant Administrators:(OI)(CI)(IO)(F) /T /C (press enter, be patient if this runs, it will take quiet awhile)

Next type:-
icacls c: /grant SYSTEM:(OI)(CI)(IO)(F) /T /C (press enter, be patient)

Next type:-
icacls c: /grant Users:(OI)(CI)(GR,GE) /T /C (press enter , be patient)

When finished restart, log in as your admin account. Afraid you might have to reinstall, so be prepared. Let us know how you get on.
 
#6 ·
Hi jenae,

Yes I was using the Windows 7 OS DVD...
Bad news is when I typed at the command prompt the first command you told me to, the message it returned was:
c: Access is denied.
Sucessfully processed 0 files; Failed processing 1 files

Not good, is it?

Does reinstall means I have to buy a new Win 7 license?
I remember that a few years ago I had to reinstall Win XP on my laptop, and I was able to reinstall it 4 or 5 times, before Microsoft told me that license was no longer valid. Problem solved, now it runs Ubuntu, but I wouldn't like that for my desktop(I have it on dual boot) as Windows has the enourmous advantage of most software being developed for it. So saving my Win 7, if possible, was very important.

Once again, thanks for your help.
 
#7 ·
Your C: drive may not be the Windows OS drive in the RE.
In the RE command prompt, X:\Sources type this exactly as written.
bcdedit |find “osdevice” (Must inc ” and the | ), the | before Find is the Upper case \ key) press enter. This will tell you what drive letter the OS is on.It may not be on the C: drive.
 
Save
#8 ·
I've also ran the bcedit command before, and I know for sure that Win 7 is on C: and Win 8.1 is on D:
Kindly follow spunk.funk's directive because Windows RE ignores the drive letters assigned in the offline Windows installation(s) and does reassign letters to mounted drives/volumes for use in that particular instance of RE, hence the possibility of your Win 7 partition having a letter that differs from the one assigned in Windows. You could also run DISKPART then LIST VOLUME from Command Prompt to see the drive letter assigned to the Seven partition, then use that drive letter in the instructions provided by jenae and team.
 
#11 ·
When I boot from the Win 7 OS DVD, I go to a first menu when I choose the language of the keyboard, where I’m also able to choose to reinstall or repair Windows. Obviously I click on the link underneath that gives me the possibility of repairing Windows. That takes me to another window where I have to choose which windows installation I want to repair, Win 7 or 8.1. I have to check the radio button of the OS I want to repair, and the options are D: Win 8.1 or C: Win 7 , so I guess it is more than proven that my win 7 is installed on drive C:
Another curious, and maybe important, thing I forgot to mention in my previous posts, is that in the above referred window, where I have to choose which OS I want to repair, drive D: shows the correct space that it’s allocated, but drive C: says 0 bytes. I guess this means that even Windows RE can’t read or access that drive… :banghead:
 
#9 ·
Hi, I wish for your sake it was as simple as using my bcdedit cmd to locate the OS, ( which correctly is:- bcdedit | find "osdevice") unfortunately you have been assigned C: drive in the RE (you receive a "device is not ready", if you use the wrong drive letter, not "access is denied")

If you take the drive out of the computer and connect it to an other computer you may be able to access the drive, if so see if you can disable UAC.. worth a shot

Otherwise I am afraid that you ( unless someone else has an idea) have no option now then to do a reinstall, I would do a clean install,
 
#10 ·
How about you perform the commands below from your Windows 8.1 installation, but start with taking ownership of the whole volume/partition. Note that the drive letter will no longer be C when doing this from Win 8.1 because the 8.1 installation assigns its drive the letter C whenever its online, so make sure use the drive letter assigned to the Seven partition by the online Windows 8.1.

Code:
icacls c: /grant Administrators:(OI)(CI)(IO)(F) /T /C (press enter, be patient if this runs, it will take quiet awhile)

Next type:-
icacls c: /grant SYSTEM:(OI)(CI)(IO)(F) /T /C (press enter, be patient)

Next type:-
icacls c: /grant Users:(OI)(CI)(GR,GE) /T /C (press enter , be patient)
This will hopefully allow you access to the seven partition and let you load the hive(registry) of the seven installation and modify it as instructed earlier.
 
#14 ·
How about you perform the commands below from your Windows 8.1 installation, but start with taking ownership of the whole volume/partition. Note that the drive letter will no longer be C when doing this from Win 8.1 because the 8.1 installation assigns its drive the letter C whenever its online, so make sure use the drive letter assigned to the Seven partition by the online Windows 8.1.

Code:
icacls c: /grant Administrators:(OI)(CI)(IO)(F) /T /C (press enter, be patient if this runs, it will take quiet awhile)

Next type:-
icacls c: /grant SYSTEM:(OI)(CI)(IO)(F) /T /C (press enter, be patient)

Next type:-
icacls c: /grant Users:(OI)(CI)(GR,GE) /T /C (press enter , be patient)
This will hopefully allow you access to the seven partition and let you load the hive(registry) of the seven installation and modify it as instructed earlier.
This didn' do the trick either.:sad:
 
#12 ·
run DISKPART then LIST VOLUME from Command Prompt to see the drive letter assigned to the Seven partition, then use that drive letter in the instructions provided by jenae and team.
Follow the instructions from Stancestans in the quote above. If it lists the volume as Offline, with 0 bytes, you will not be able to repair this volume.
You will be able to use recovery software like the free TestDisk program to recover any files and then you will have to format and reinstall.
 
Save
#13 ·
I ran diskpart and then list volume, and volume 1 C: is healthy and it shows it has 240 Gb. However it doesn't know which type of files that are in that partition. The Fs column is blank.
On volume 2 D: (win 8,1) it has nop problem saying those files are NTFS.
This is getting weird and weird :confused:
 
#15 ·
I ran diskpart and then list volume, and volume 1 C: is healthy and it shows it has 240 Gb. However it doesn't know which type of files that are in that partition. The Fs column is blank.
If the filesystem is not recognized for the 240GB volume, then it's definitely corrupt. Run a disk check on that volume using CHKDSK X: /F from Windows 8 or while logged into the Windows 8 installation from the recovery environment. Make sure to subtitute the volume X: with that of the 240GB volume.
 
Status
Not open for further replies.
You have insufficient privileges to reply here.