Drag and Drop from the GExperts Grep Results

Another episode from the series “GExperts features that I didn’t know about”:

It’s possible to drag an entry from the GExperts Grep to any other Windows program, e.g. to the Explorer, which will copy that file to the directory it was dragged to, or to an editor which will open that file.

I just now found out about this because I wondered why it was using Anders Melander’s DropSource unit (version 3.6 from 1999, maybe I should have a look if an update is possible).

Btw: I’m about to make the stand alone Grep tool a real stand alone executable that does not require the GExperts DLL (and its package dependencies). The reason is that I can’t find the cause for an Access Violation that happens in the Delphi 10.4 and 11 DLLs when opening the Grep window from an external program. It’s somewhere in the OnCreate event handler of TDockableForm, for which the source code is not available, so it’s difficult to debug.

User cannot change his Samba AD password from Windows

Note to self:

If a user cannot change his password on a Samba AD Domain from a Windows (10) computer getting the following error message:

Check that the user didn’t already change the password on the same day because the default setting for minimum password age is 1 (day). To change that setting, use samba-tool:

root:/root# samba-tool domain passwordsettings set --min-pwd-age=0
Minimum password age changed!
All changes applied successfully!

Note that Samba apparently does not support changing this setting (and other password policy settings) with the Windows Group Policy Editor.

To check these settings, also use the samba-tool:

root:/root# samba-tool domain passwordsettings show
Password information for domain 'DC=ad,DC=example,DC=com'

Password complexity: off
Store plaintext passwords: off
Password history length: 0
Minimum password length: 7
Minimum password age (days): 1
Maximum password age (days): 42
Account lockout duration (mins): 30
Account lockout threshold (attempts): 0
Reset account lockout after (mins): 30

(Note that the above are not my actual password settings in a production environment but rather test settings to find out which settings caused the problem.)

Registration problems in Delphi Praxis solved

There was a technical problem with the software of the international Delphi Praxis forum which prevented many new user registrations. This has now been solved, so creating new user accounts should be possible again.

Here is Daniel’s announcement:

We have solved a technical problem which was due to a misconfiguration of the software. Some – but not all – newly created user accounts were not activated, but intended for manual activation by the admin. Unfortunately, there was no notification and since not all accounts were affected, there were indeed constant new registrations. This way, this bug could remain undetected for too long.

I am very sorry for those who waited in vain for an activation.

Unfortunately, in the queue of accounts that have not been activated, in addition to regular users, you will also find the usual amount of spam bots that every forum has to deal with. Separating these groups cleanly from each other and manually activating only the real users is unfortunately an impossibility.

With this in mind, I made the hard decision to remove all queued accounts. The way is now free for new registrations and I would like to ask all interested people to register again. At the same time I apologize for the double effort.

Verification is now done – as usual with most forums – via an email containing a confirmation link.

See you there.

Small improvements to GExperts

Some of the experts in GExperts have seen small improvements lately:

The Goto expert now allows incremental search in the list by typing in the number field. This feature was contributed by Achim Kalwa.

The Grep search expert now takes the name of the currently selected control on the form designer if it is opened while the form designer is active. Again, this feature was contributed by Achim Kalwa. The idea was from Peter Panettone.

The Todo expert now has a filtering function. The idea was from Peter Panettone, who also provided an implementation. Unfortunately I had to reimplement it because his code did not work with older Delphi versions.

Thanks again to everybody who contributes to the project. I might take a while to commit such changes but I try to do my best.

Remember: Windows 10 will automatically restart for updates

Note to self: If you have anything important running on your Windows 10 computer for a longer time (e.g. over night), make sure to prevent Windows Update to become active. It will force a restart of your computer if it fancies so, regardless of the programs that might still be active.

Guess what happened last night? I not only lost some work but it also aborted a critical maintenance task running for our server infrastructure, which means I have to repeat that task next weekend and endanger company data for another week.

Judging by the results of search for "prevent windows reboot" I am not the first one who got hit by this "feature".

(And to add insult to injury I was now looking for the settings to disable automatic updates for a while and can’t bloody find it. Entering "Windows Update" into the search field of the control panel doesn’t find it.
The search box in the start menu does find it though. WTF?)

Of course as of Windows 10 users can no longer prevent Windows Update to restart their computer (We’re Microsoft, we know best 🙁 ). They have only the following options:

  1. Pause Windows Update for 7 days.
  2. Pause Windows Update until a fixed date, which can be up to about 1 month into the future.
  3. Set the “active hours”, that is the times between which Windows Update will not restart your computer. That period is limited to up to 18 hours.

On Windows 10 professional (home users are out of luck) there are some settings in the Local Group Policy Editor which might help here, but I haven’t yet figured out what to set. One that looks promising is:

No auto-restart with logged on users for

Specifies that to complete a scheduled installation, Automatic Updates will wait for the computer to be restarted by any user who is logged on, instead of causing the computer to restart automatically.

If the status is set to Enabled, Automatic Updates will not restart a computer automatically during a scheduled installation if a user is logged in to the computer. Instead, Automatic Updates will notify the user to restart the computer.

Be aware that the computer needs to be restarted for the updates to take effect.

If the status is set to Disabled or Not Configured, Automatic Updates will notify the user that the computer will automatically restart in 5 minutes to complete the installation.

Note: This policy applies only when Automatic Updates is configured to perform scheduled installations of updates. If the “Configure Automatic Updates” policy is disabled, this policy has no effect.

But unfortunately that policy is already enabled and obviously didn’t prevent the restart last night. I guess that’s what the “Note” is about. The Configure Automatic Updates policy is disabled. I guess I’ll have to figure out what to configure there.

But why is there no option like "Don’t restart if a user is logged on and a program is running."? For their own programs (e.g. Explorer or anything MS Office) they could create fancier solutions as "If a program is running but doing nothing, notify it (e.g. an Explorer window or MS Word with an unchanged document) and restart it afterwards.".

If I remember correctly there is some Win32 API option to prevent manual shutdowns or restarts. Maybe that will also prevent a restart caused by Windows Update.

Edit: Within a few minutes after I posted this, several people have made me aware of Ulrich Decker’s Reboot-Blocker tool. Thanks everybody!