So I recently re-installed my Windows OS on my desktop. Glad to say the experience is general a really good one; most driver install automagically.
I even let it grab the latest updates, as you might expect this includes the Windows 10 1607 version update; aka the anniversary edision.
to my dismay I noticed a Windows.old folder under my C:\ the drive I selected to install windows on. Being a fresh install I was a bit surprised to see this. as it’s usually from a complete Windows upgrade. I guess the 1607 version is a complete new version according to MS?
A quick google search however provided a nice blog by of course my fav HowToGeek .
Sadly even after this, I still had a Windows.old folder. 🙁
I couldn’t figure out why, so I decided to navigate into the folder. I discovered it was a particular file InstAud.sys or something of that nature. I opened up the properties of it and seized ownership of the file, I am the administrator after all.
To my dismay again, I still couldn’t add or remove permissions. I managed to use takeown and cacls to add permissions, but then it stated was locked by a process. Using sysinternals handle and procexp both came up empty handed for any locks.. odd :S.
autoruns also didn’t show anything linked to that file… mmm. Even after, disabling my intl video (I was using a gefore PCI-e video card anyway), disabled it in device manager. and uninstalled the software/drivers. Made sure the service was gone. Yet it pertained I coudn’t delete the file.
So, normally I’d use a linux live USB to mount the partition and wipe it out that way. However I wanted to keep it all Windows and attempt to do this without pointing user to any other site or tools.
And yes…. I did figure it out! hahah. Follow these steps.
Step 1) Click the Action Center Icon (or swipe from the right side on a tablet) and select All Settings -> Update and Security -> Recovery -> (Under Advanced Startup) Restart Now. Step 2) Select Troubleshoot -> Cmd prompt. Step 3) Change to the windows disk drive, generally C:
Now if you attempt to navigate directly to the file you might find the commands you set to provide you account permissions might not have been persistent.
You might also be surprised to find there is no cacls command. well fear not, you’ll just have to use icacls instead.
Step 4) Take Ownership: cd C:\Windows.old takeown /F .\*
Step 5) Grant Permissions: icacls .\ /grant Administrator:F
Step 5) Navigate into the folders, till you find the issue file, use del to delete, use takeown and icacls to take ownership and permissions. Step 6) Once that's done use rmdir /S /Q to delete C:\Windows.old
That’s it! your done, reboot. And See Windows.old is gone! That was tougher than it shoulda been. Now I can re-enable, and re-install my integrated Intel drivers, I’m not sure exactly what happened, it was an update that ran right after installing Windows. I did however use a dedicated Windows 10 USB stick that’s 6 months old or so. Just show how important to get the latest builds whenever possible.