-
Notifications
You must be signed in to change notification settings - Fork 0
windows configuration
Kittipong R edited this page Mar 19, 2016
·
7 revisions
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...
- http://superuser.com/questions/914782/how-do-you-list-all-processes-on-the-command-line-in-windows
- http://www.techrepublic.com/blog/windows-and-office/quick-tip-kill-rogue-processes-with-taskkill-in-microsoft-windows/
- https://www.youtube.com/watch?v=02C4VCc5eUg
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>
When you migrate or copy files from the old hard drive, permissions of old accounts are still around. Here is how over take it.
- http://superuser.com/questions/60700/how-do-i-get-permissions-to-delete-files-on-windows-7
- https://web.archive.org/web/1/http://articles.techrepublic.com.com/5100-10878_11-5034333.html
- http://ss64.com/nt/cacls.html
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
- Windows 7 == %systemroot%\system32\drivers\etc\