Rare addition to the graphics page #

μGiffer 0.9.12 [108k] + Simple screen-to-GIF recorder by the author of Bvckup 2 and Hamachi. 📺

/windows | May 08, 2021

Bluetooth promixity lock for macOS #

Takeshi Sone has generously crafted and shared (under an MIT license) BLEUnlock, "a small menu bar utility that locks and unlocks your Mac by proximity of your iPhone, Apple Watch, or any other Bluetooth Low Energy device." Unlike Unlox (formerly MacID), no iOS app is required and scripting is supported. Vital for protecting data from laptop snatchers. For a wired solution, see Introducing BusKill: A Kill Cord for your Laptop.

/mac | May 06, 2021

How do you measure, ♫ measure a kalpa? #

/misc | May 04, 2021

DLL & dependency horrors #

/windows | May 01, 2021

Identifying unknown devices in Windows #

See also:

/windows | Apr 26, 2021

Carbon Copy Cloner and SuperDuper! ignore EFI partitions #

When making a bootable clone with Carbon Copy Cloner or SuperDuper!, EFI partitions are skipped, since they aren't needed for macOS boot disks:

Though modern Macs support ... EFI booting in order to maintain compatibility with running non-Apple operating system[s] on their hardware, they do NOT need the EFI partition in order to boot [m]acOS. Because of this, the disk clone utilities do not copy the contents of the secondary EFI partition from one drive to another when doing their job.

However, this is problematic when cloning boot disks like the one produced by Ben Sova's Patched-Sur, which depend on the EFI partition for critical functionality.

Here's how to clone the EFI partition as well:

  1. Partition (GUID) and format (HFS+) the target disk

  2. Use Carbon Copy Cloner to clone the source disk to the target disk

  3. Mount the source and target EFI partitions

    % diskutil list
    ...
    /dev/disk2 (external, physical):
       #:                       TYPE NAME                    SIZE       IDENTIFIER
       0:      GUID_partition_scheme                        *126.7 GB   disk2
       1:                        EFI ⁨EFI⁩                     209.7 MB   disk2s1
       2:                  Apple_HFS ⁨Install macOS Big Sur⁩   126.4 GB   disk2s2
    
    /dev/disk3 (external, physical):
       #:                       TYPE NAME                    SIZE       IDENTIFIER
       0:      GUID_partition_scheme                        *61.5 GB    disk3
       1:                        EFI ⁨EFI⁩                     209.7 MB   disk3s1
       2:                  Apple_HFS ⁨SanDisk                 61.2 GB    disk3s2
    % sudo diskutil mount disk2s1
    Volume EFI on disk2s1 mounted
    % sudo diskutil mount disk3s1
    Volume EFI on disk3s1 mounted
  4. Copy the EFI folder from the source disk's EFI partition to the target disk's empty EFI partition via Finder or Terminal

Notes

Sources

/mac | Apr 26, 2021

Windows XP: VSS backup to rotated drives via shadowspawn and robocopy #

Daily backup routine for an ancient Q&A program and database which is always open:

  1. Copy shadowspawn.exe (depends on Visual C++ runtime) and robocopy.exe (found in the Windows Server 2003 Resource Kit Tools; preinstalled in Vista onwards) to %WINDIR%\system32\.

  2. Edit and save this batch script to desired location:

    for /f %%x in ('date /t') do set today=%%x
    if '%today%=='Mon shadowspawn C:\QA4 Q: robocopy q:\ S:\QA4 /B /MIR
    if '%today%=='Tue shadowspawn C:\QA4 Q: robocopy q:\ T:\QA4 /B /MIR
    if '%today%=='Wed shadowspawn C:\QA4 Q: robocopy q:\ U:\QA4 /B /MIR
    if '%today%=='Thu shadowspawn C:\QA4 Q: robocopy q:\ V:\QA4 /B /MIR
    if '%today%=='Fri shadowspawn C:\QA4 Q: robocopy q:\ W:\QA4 /B /MIR
    if '%today%=='Sat shadowspawn C:\QA4 Q: robocopy q:\ X:\QA4 /B /MIR
    if '%today%=='Sun shadowspawn C:\QA4 Q: robocopy q:\ Y:\QA4 /B /MIR
  3. Create a scheduled task to run the batch script daily without a cmd.exe popup.

/windows | Apr 18, 2021

Windows XP: Schedule a batch script to run hidden #

Running a scheduled bacth script as SYSTEM (no password required) hides the cmd.exe window. In Windows 7, this can be done from the Task Scheduler GUI (Properties → Change User or Group...).

While Windows XP's Scheduled Tasks GUI appears to offer the same option (Properties → Run as:), tasks set to run as SYSTEM will fail with "Could not start"; see Microsoft KB223375, "Cannot Configure Scheduled Tasks to Use System Account"*:

SYMPTOMS
When you create or modify a task in the Scheduled Tasks tool to use the System account, the task does not run as scheduled.

When you view the Scheduled Tasks log file, you receive the following error message:

The attempt to log on to the account associated with the task failed, therefore, the task did not run.

The specific error is: 0x80070057: The parameter is incorrect. Verify that the task's Run-as name and password are valid and try again.

CAUSE
This issue occurs because you cannot configure a task to use the System account using the Scheduled Tasks Wizard.

RESOLUTION
Currently, the only way to schedule a task as the System Account is to use AT.EXE to schedule the task. This command is shipped in Windows 2000 for backward compatibility for NT 4.0 scheduled events. Its defaults are to schedule jobs to run as the Task Scheduler service account (System by default).

To access this tool, open a Command Prompt (cmd.exe) and type AT /?. Be aware that after a job is scheduled using AT, manipulation of the task through the Scheduled Tasks folder will permanently change the job and turn it into a Windows 2000 Scheduled Tasks Job object (.JOB files). During this process, you must enter new credentials, and the only way to return the scheduled event to its original state using the system account is to delete and reschedule the event using AT.EXE.

An issue with using AT.EXE to schedule the task (e.g., at 09:00 /every:M,T,W,Th,F,S,Su c:\path\to\script.bat) is that properties are greyed out in the Scheduled Tasks GUI.

Tasks created with schtasks.exe, however (e.g., schtasks.exe /create /RU "SYSTEM" /SC daily /SD 04/18/2021 /ST 09:00:00 /TN "MyTask" /TR "C:\path\to\script.bat"), do not suffer from this limitation.

* In my testing, Scheduled Tasks → Advanced → View Log reported a different specific error:

"MyTask.job" (script.bat) 4/14/2021 7:52:32 PM ** ERROR **
    The attempt to log on to the account associated with the task failed, therefore, the task did not run.
    The specific error is:
    0x80041314: The task has been configured with an unsupported combination of account settings and run time options.
    Verify that the task's Run-as name and password are valid and try again.

/windows | Apr 18, 2021

Convert color PDF to black and white #

After exhausting the usual suspects (Adobe Acrobat, ImageMagick, Ghostscript, etc.), stumbled onto the cleanest results and smallest file size by pairing Preview.app and IrfanView:

  1. Open color.pdf (96.9MB) in Preview.app
  2. Open bw.pdf (235.4MB) in Preview.app
  3. Open bw.tif (109.5MB) in IrfanView
  4. Open bw2.tif (3.9MB) in IrfanView

/misc | Apr 15, 2021

Emergent is fine as the adjectival form of emergency #

Despite regrettably miguided notions to the contrary, "emergent" is fine as the adjectival form of "emergency", at least for those willing to accept the testimony of Webster's:

Emergent definition from merriam-webster.com: calling for prompt action : URGENT

and the OED (replete with usage examples spanning the centuries):

Emergent definition from the OED: urgent, pressing

/misc | Apr 12, 2021


Subscribe or visit the archives.