-
Notifications
You must be signed in to change notification settings - Fork 0
windows configuration
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\
If you have two or more network interfaces (eg Wifi and LAN), OS determines which interface to use first by "metric" value. The lower the value, the higher the precedence. You can see these values by running the command:
> netsh int ip show config
The decision is based on IntefaceMetric + GatewayMetric values. So if you want to use Wifi(ex: 20) over LAN(ex: 10), just redefine the GatewayMetric value on those interfaces with route delete/add/change command.
///////////////////////////////////////////////////////////////// /// Setting Network and Sharing Center (Control Panel\Network and Internet\Network Connections) * Right click the interface (ex: LAN) -> Properties * "Networking" tab -> select "TCP/IPv4" -> "Properties" button * Click "Advanced" button * Under "IP Settings" you can add metric to... ** Gateway -- Add/Edit/Remove button ** Interface -- Unclick "Automatic metric" and set the value
/////////////////////////////////////////////////////////////////
/// Command line
$ route print
Interface List
12...xxxxx ......Intel(R) Centrino(R) Ultimate-N 6300 AGN /// wifi wanted interface to use
11...xxxxx ......Intel(R) 82579LM Gigabit Network Connection /// LAN
Active Routes:
Network Destination Netmask Gateway Interface Metric
0.0.0.0 0.0.0.0 10.147.16.1 10.147.19.33 10
0.0.0.0 0.0.0.0 192.168.0.1 192.168.0.123 20
/// $ route delete 0.0.0.0 if <interface-id>
/// $ route -p add 0.0.0.0 mask 0.0.0.0 <ip of gateway> metric <delay metric value> if <interface-id>
///
/// Add delay to Wifi
/// $ route delete 0.0.0.0 if 12
/// $ route -p add 0.0.0.0 mask 0.0.0.0 192.168.0.1 metric 5 if 12
///
/// Add delay to LAN
$ route delete 0.0.0.0 if 11
$ route -p add 0.0.0.0 mask 0.0.0.0 10.147.16.1 metric 25 if 11
$ route print
...
Active Routes:
Network Destination Netmask Gateway Interface Metric
0.0.0.0 0.0.0.0 10.147.16.1 10.147.19.33 35
0.0.0.0 0.0.0.0 192.168.0.1 192.168.0.123 20