Windows Notes
Move files older than some access dateEdit
ROBOCOPY "C:\Apps\Siemens\Teamcenter14" "C:\old" /move /minlad:100 /E
The above example moves all files that were last accessed at least 100 days ago from source (Teamcenter14) to destination (old). Switch /E includes empty directories. Many more combinations of options are available[1] including last write date etc.
Find files by accessed date[2][3]Edit
Get-ChildItem -Path c:\temp\icons -Recurse | Where-Object { $_.LastAccessTime -ge "09/20/2022 16:23:00" }
The example above searches in c:\temp\icons recursively and returns objects whose last access time is greater than 20 Sept 2022 at 16:23:00
.LastWriteTime and other options are available.
USB Pen drive boot and multiple iso images / os installEdit
This software[4] will allow for the writing of multiple iso installer images and a menu to select them so that one pen drive can be used to boot/install any number of OSs.
Finding process that is locking a file[5]Edit
Use the Resource Monitor for this which comes built-in with Windows 7, 8, 10 and 11!
- Open Resource Monitor, which can be found
- By searching for Resource Monitor or resmon.exe in the start menu, or
- As a button on the Performance tab in your Task Manager
- Go to the CPU tab
- In the Processes section, select all processes by clicking the checkbox next to "Image" in the headers.
- Use the search field in the Associated Handles section
- See blue arrow in screen shot below
When you've found the handle, identify the process by looking at the Image and/or PID column.
Try to close the application as you normally would, or, right-click the handle and kill the process directly from there.
Clipboard - Windows 10Edit
Follow these steps to turn the “Clipboard History” feature on:[6]
1 – Click the Start button.
2 -Click the Settings icon (it looks like a “gear” or “cog“).
3 – Click System.
4 – In the left-hand pane, scroll down and click Clipboard.
5 – Toggle the “Clipboard history” setting to On (the slider should turn from gray to blue).
NetworkingEdit
Windows FirewallEdit
Can be amended edited etc from the command line as detailed here.[7]
Decompile a Windows CHM .chm file (compiled help)[8]Edit
This uses the Windows binary hh.exe to decompile a chm file into its individual components.
Syntax is as below example: hh.exe -decompile <destination folder> <input file>
c:\Windows\hh.exe -decompile c:\temp c:\temp\net_ref.chm
Add static routeEdit
To add an entry to the routing table, use the following syntax:
ROUTE ADD 10.0.3.36 MASK 255.255.255.255 192.168.1.221
This allows access to 10.0.3.36 via 192.168.1.221 The equivalent Linux command is:
ip route add 10.0.3.36/24 via 192.168.1.221
Optimise network card settingsEdit
This software is a portable application and fixes all software network settings!
SG TCP Optimizer[9]Edit
Details: The TCP Optimizer is a free, easy Windows program that provides an intuitive interface for tuning and optimizing your Internet connection. There is no installation required, just download and run as administrator.
The program can aid both the novice and the advanced user in tweaking related TCP/IP parameters in Windows, making it easy to tune your system to the type of Internet connection used. The tool uses advanced algorithms, and the bandwidth*delay product to find the best TCP Window for your specific connection speed. It provides for easy tuning of all related TCP/IP parameters, such as MTU, RWIN, and even advanced ones like QoS and ToS/Diffserv prioritization. The program works with all current versions of Windows, and includes additional tools, such as testing average latency over multiple hosts, and finding the largest possible packet size (MTU).
The TCP Optimizer is targeted towards broadband internet connections, however it can be helpful with tuning any internet connection type, from dialup to Gigabit+ :) It is completely free, works with most Windows versions from XP to Windows 11, requires no installation, and has been downloaded over 10 Million times over the years.
If you need help with the program, check the TCP Optimizer documentation, read our broadband tweaking articles, the Optimizer FAQ, and/or visit our Forums. The program can be freely (re)distributed, as long as you give us proper credit as the author, and it is not sold for profit.
TCP Optimizer Download[10]
Standard Windows FontsEdit
Fonts are taken from here[11]
Activation Windows 11[12]Edit
Method 1 - PowerShell (Recommended)Edit
- Right-click on the Windows start menu and select PowerShell or Terminal (Not CMD).
- Copy and paste the code below and press enter
irm https://get.activated.win | iex
PowertoysEdit
https://github.com/microsoft/PowerToys/releases/
Install from above link to get lots of useful goodies.
Edit
Utilise the local passwd and group files. The location for these files are:
C:\windows\system32\drivers\etc\passwd C:\windows\system32\drivers\etc\group
The format should be:
passwd: [domain]\<UnixUser>:x:<UnixUID>:<UnixGID>:Description:C:\Users\<UnixUser> group: [domain]\<UnixGroup>:x:<UnixGID>:<UnixUID>
Here are the contents of both files in my lab VM:
mechanic:x:1000:100:Windows User,,,:c:\users\mechanic wheel:x:0:0
Then the process is as simple as mounting with the nolock option.
mount -o nolock \\192.168.28.155\mnt\NAS0\media G:
ReferencesEdit
- ↑ https://ss64.com/nt/robocopy.html
- ↑ https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.management/get-childitem?view=powershell-7.3
- ↑ https://stackoverflow.com/questions/17616045/find-files-on-windows-modified-after-a-given-date-using-the-command-line
- ↑ https://www.pendrivelinux.com/universal-usb-installer-easy-as-1-2-3/
- ↑ https://superuser.com/questions/117902/find-out-which-process-is-locking-a-file-or-folder-in-windows/643312#643312
- ↑ https://www.ricksdailytips.com/windows-10-clipboard-stores-multiple-items/
- ↑ https://superuser.com/questions/468475/viewing-windows-firewall-settings-from-the-command-line-and-a-gui
- ↑ https://social.technet.microsoft.com/wiki/contents/articles/34963.how-to-decompile-a-compiled-html-help-chm-files-and-extract-information-using-powershell.aspx
- ↑ https://www.speedguide.net/downloads.php
- ↑ https://www.speedguide.net/files/TCPOptimizer.exe
- ↑ https://www.brightcarbon.com/wp/wp-content/uploads/2018/10/Windows-fonts.pdf
- ↑ https://github.com/massgravel/Microsoft-Activation-Scripts
- ↑ https://blog.edie.io/2018/06/16/mounting-nfs-shares-in-windows-using-identity-mapping/