The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,528 other followers

Archive for the ‘Windows 10’ Category

Delphi Code Monkey: Cool Advanced Troubleshooting Technique – WinDbg

Posted by jpluimers on 2019/04/11

This so much reminds me of a struggle in the Toshiba Tecra 750CDT era: [WayBackDelphi Code Monkey: Cool Advanced Troubleshooting Technique – WinDbg.

First about Warren’s issue:

His laptop froze only in Windows 10, but not Windows 7, after doing some debugging work. Display is on, but non-responsive. He ruled out a lot of things, thought it was a video issue, looked for pointers how to research it ending to force memory dumps by keyboard then running WinDbg to further pinpoint the cause.

He solved the issue by removing the Lenovo supplied Intel graphics driver and forcing the Intel HD Graphics 520 OEM drivers onto the system and posted a few interesting links:

Then some history:

Back in the 750CDT days, the problem was the combination of Toshiba using OEM S3 Virge/MX video drivers, Windows GDI and TImageList with a lot of images in them (basically: the component palette).

Result: interrupt freeze of the laptop, so not even mouse or keyword would work.

Solutions:

  • use Windows NT, not Windows 95
  • disable all S3 hardware acceleration
  • use the Toshiba 780 series video drivers

From then on, I’ve never developed on Windows 9x based systems any more, but Windows NT based systems (even though it was much harder to get drivers for all hardware components), this despite the fact that with Windows NT 4, Microsoft video drivers from ring 3 to ring 0 (they were at ring 3 until and including Windows NT 3.51 [Archive.is]). On the one hand the move to ring 0 caused more blue screens, on the other hand made it a lot harder to directly access hardware from user software running at ring 3.

 

–jeroen

Posted in Development, Power User, Software Development, Windows, Windows 10 | Leave a Comment »

Windows: force a CHKDSK of a non system disk at boot time

Posted by jpluimers on 2019/03/22

Just out of curiosity, I wanted to try run a CHKDSK at boot time of a non-system disk.

The trick appears to be to ensure something locks the drive. An easy way to do that is have a command prompt open inside a directory on that drive.

The below example show just that: a regular command prompt locking the E: drive and an administrative command prompt scheduling the check at boot time:

In text

Regular command prompt:

Microsoft Windows [Version 10.0.15063]
(c) 2017 Microsoft Corporation. All rights reserved.

C:\Users\jeroenp>e:

E:\>cd $RECYCLE.BIN

E:\$RECYCLE.BIN>

Administrative command prompt:

C:\WINDOWS\system32>chkdsk /R /F E:
The type of the file system is NTFS.

Chkdsk cannot run because the volume is in use by another
process.  Chkdsk may run if this volume is dismounted first.
ALL OPENED HANDLES TO THIS VOLUME WOULD THEN BE INVALID.
Would you like to force a dismount on this volume? (Y/N) n

Chkdsk cannot run because the volume is in use by another
process.  Would you like to schedule this volume to be
checked the next time the system restarts? (Y/N) y

This volume will be checked the next time the system restarts.

C:\WINDOWS\system32>

–jeroen

Posted in Power User, Windows, Windows 10, Windows 7, Windows 8, Windows 8.1 | Leave a Comment »

Windows 10: force to sleep at night, but allow wake up for Windows Updates

Posted by jpluimers on 2019/03/04

I do not like a machine that sleeps after a certain amount of inactivity as I might have a long running job going on.

Usually however, I do like to have a machine off at night, even if I forget to put it asleep.

Exceptions for sleeping are just two:

  • automatic back-up schedule
  • allowing Windows Updates

Luckily you can tell Windows 10 to allow for all cases.

Enabling wake-up during Windows Updates

Note I’m not fully sure which BIOS settings you need to enable – if any- to have this work on all systems. Wake up works on my machine for these [WayBackpsshutdown parameter combinations:

  • psshutdown.exe -h -t 0 (Hibernate)
  • psshutdown.exe -d -t 0 (Suspend)

It fails with these:

  • psshutdown.exe -s -t 0 -f (Shutdown without poweroff)
  • psshutdown.exe -k -t 0 (Poweroff)

The odd thing: Wake-on-LAN can usually wake up the last two.

This is done with the gpedit.msc (via [WayBackHow to prevent Windows 10 waking from sleep when traveling in bag? – Super User, thanks xxxbence)

Follow this path:

  1. Local Computer Policy
  2. Computer Configuration
  3. Administrative Templates
  4. Windows Components
  5. Windows Update

Double click Enabling Windows Update Power Management to automatically wake up the system to install scheduled updatesto show the below dialog.

Enable it:

so it looks like this:

Forcing sleep (in my case hibernate) using the Task Scheduler

In Windows 7..10: disable shutdown/hibernate/sleep/restart from UI I wrote about shutdown /h /f to hibernate a machine. You can force to run this from the taskschd.msc (Windows Task Scheduler):

I wanted history for tasks, so I started taskschd.msc as Administrator, then on the right Actions Pane, I clicked on Enable All Tasks History:

 also explained in [WayBackHow can I enable the Windows Server Task Scheduler History recording? – Stack Overflow and can be verified/set on the console as well:

  • Get as any user: wevtutil get-log Microsoft-Windows-TaskScheduler/Operational
  • Set as Administrator: wevtutil set-log Microsoft-Windows-TaskScheduler/Operational /enabled:true

I named the task __ sleep at 2300 with these settings:

Ensure the Program/script itself is shutdown and the parameters are /h /f:

–jeroen

Posted in Power User, Windows, Windows 10 | Leave a Comment »

Windows 10: mounting an ISO to a specific drive letter and keeping that drive letter after boot

Posted by jpluimers on 2019/03/01

I tried finding a way with the built-in Windows tools to keep an ISO mounted to a specific drive letter (some software remembers the drive letter it got installed from and disallows changing it).

I couldn’t. Luckily there is WinCDEmu which supports more formats than the built-in Windows tools as well.

[WayBackWinCDEmu – How to keep images mounted

  1. Right click the ISO file
  2. Choose Select drive letter & mount
  3. In the popup dialog, put check marks if you need any of these options:
    • Disable autorun for this time
    • Keep drive after restart

So I can add that to the list of WinCDEmu features I wrote about before (from newer to older):

WinCDEmu is open source; if you want to build it from scratch, you need these repositories:

 

–jeroen

Posted in Power User, Windows, Windows 10 | Leave a Comment »

Windows 10 Feature Focus: Backup and Recovery – Thurrott.com

Posted by jpluimers on 2019/03/01

I totally forgot that the Windows 7/8/8.1. stuff (that makes a back-up to VHD/VHDX) is still in the Control Panel:

While Windows 10 doesn’t actually add any new backup or recovery tools, it provides great upgrades to the tools it previously offered in Windows 7 and 8.

Source: [WayBackWindows 10 Feature Focus: Backup and Recovery – Thurrott.com

Read the rest of this entry »

Posted in Power User, Windows, Windows 10 | Leave a Comment »

 
%d bloggers like this: