Skip to content

Junctions, loops, search, and more

Compare
Choose a tag to compare
@JFLarvoire JFLarvoire released this 21 Feb 13:54
· 200 commits to master since this release

Would you believe it... It's been almost a year since the last SysToolsLib release.
In between lots of things have changed. Here are the main ones:

New tools:

  • junction.exe: Easily manage junctions. A faster and more powerful replacement for Microsoft SysInternals junction.exe.
    Includes unique features for easily managing junctions as if they were relative links, including on network drives.
    See the help screen for details and limitations.
  • ShareInfo.exe: Get information about a shared folder on a remote server. Useful to improve the support for junctions on network drives.
  • encoding.exe: Detect the text encoding for one or more files (Ex: Binary/ASCII/Windows system code page/UTF-8/UTF-16/UTF-32),
    with several optional heuristics for improving that detection.
  • Search.bat: Query the Windows Search Service indexed files, using the Advanced Query Syntax. Very fast, as it's using the system index.
    The results are listed in an Explorer window, ordered by rank of relevance. Changing the view to Details allows reordering by date, etc.
  • subsh: The Linux equivalent of subcmd.bat: Open a sub-shell, and change the prompt to show the depth in the shell stack.
  • ShellApp.ps1: Enumerate shell applications, i.e. File Explorers and Control Panels.

Major changes under the hood:

  • All tools using the MsvcLibX library (Ex: junction.exe, update.exe, etc) now manage junctions on network drives as if they were relative symbolic links.
    This is very useful to people using junctions as a poor man's symbolic link. See the update.exe help screen for details and limitations.
  • Likewise, tools using the MsvcLibX library are now immune to link and junctions loops. They detect them, and avoid entering them.
    (Whereas, in case of a loop, Microsoft SysInternals junction.exe lists longer and longer paths, until reaching its redirection limit.)
    (I initially created the junction.exe tool as a test for that feature... After being bitten by actual loops on my hard disk! Loops happen!)
  • Window.ps1: Major rewrite. Now much faster at enumerating windows, and outputs more information about them.

Other highlights

  • Shell/Library.sh: A sourceable library of useful Bourne Shell routines. Much more limited than Library.bash,
    but useful when compatibility with all (and possibly old) Unix shells is desired.
  • update.exe, zap.exe: Can now handle any NTFS file name, including usually impossible names like "end space " or "nul".
    (Which cannot be created by normal Windows apps, but can be created by Linux apps in the WSL.)
    To distinguish files like "nul" from their homonym "nul" system devices, always pass a path for the file. Ex: ".\nul"
  • Batch\Library.bat: Added routines :GetEchoState, :ReplaceEquals (Two non trivial things to do in batch!), and :UrlEncode.
  • sector.exe and gpt.exe can now manage partitions larger than 2TB.
  • sector.exe has a new -lp option for listing partitions.
  • conv.exe can now convert to and from UTF-16 and UTF-32.
  • remplace.exe, conv.exe, trim.exe, detab.exe, deffeed.exe: If no change was made to the data, use the input file timestamp for the output. (Or preserve it when using the -= switch.)
  • dirsize.exe: Added option -f to follow links to directories.
  • smbios.exe: Decode several new table types.
  • chars.exe: Fixed the output in the new Windows Terminal in code page 437.

And as usual, lots of bug fixes, etc.