Skip to content

windows configuration

Kittipong R edited this page Mar 19, 2016 · 7 revisions

Annoyance

Remove files and folders

If you are trying to remove files and folders and ran into a problem -- unable to delete. It usually comes down to these potential problems: files are being used by a process, executable are running, or access permissions. Here are some commands to resolve the problems...

Command

## Listing the task
> tasklist
> tasklist | findstr "firefox.exe"
## Powershell
> get-process

## Kill the task -- pid(/PID), name(/IM)
> taskkill /?

## Display a short name (DOS 8.3-format) and long name
## and delete the file/folder
> dir /x
> rmdir /q /s <shortname>

File Permission

When you migrate or copy files from the old hard drive, permissions of old accounts are still around. Here is how over take it.

Command

## Take ownership of the files. Start a Command Prompt (cmd) as an administrator
> takeown /f file
> takeown /f directory /r

## Give yourself full rights on the file:
> cacls file /G username:F
> cacls directory /T /G username:F

Reference

Host file

  • Windows 7 == %systemroot%\system32\drivers\etc\

Clone this wiki locally