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,861 other subscribers

Archive for the ‘Windows Development’ Category

pipe – Windows how to redirect file parameter to stdout? (Windows equivalent of `/dev/stdout`) – Super User

Posted by jpluimers on 2022/02/02

TL;DR:

  • Windows has CON: which is an equivalent for /dev/tty
  • Windows has no equivalent for /dev/stdout (the standard output stream)
  • There is a C# PipeServer.cs proof-of-concept that allows to simulate /dev/stdout through a temporary named pipe
  • Windows pipe names start with \\.\pipe\ for names on the local machine
  • The above for /dev/stdout on Windows also holds for /dev/stdin (the standard input stream)

All via [Wayback] pipe – Windows how to redirect file parameter to stdout? (Windows equivalent of /dev/stdout) – Super User.

Read the rest of this entry »

Posted in .NET, C#, Development, Software Development, Windows Development | Leave a Comment »

Easiest way to move the C:\MSOCache directory to another drive is to create symbolic link to the new location

Posted by jpluimers on 2021/12/15

I always forget that, when moving a folder, instead of finding all references to that folder and fixing them, you can create an NTFS symlink from the old location to the new one.

[Wayback] how to move MSOCACHE folder from C-drive to D-drive ?? – Microsoft Community (thanks [Wayback] tgunda numbering and casing updates mine):

There are too much entries in the registry to correct them manually one by one.

An easier and quicker solution is to copy the full MSOCache folder to a new place and to make a soft link to it:
  1. Create a new folder, e.g. F:\MSOCache
  2. Copy everything from C:\MSOCache to the new one.
  3. Rename the old folder  C:\xMSOCache  (Don’t delete it, just in case).
  4. Open a command prompt window in administrator mode.
  5. Write:  mklink /d c:\MSOCache f:\MSOCache
Now there is an MSOCache link at C, pointing to the new place.
If everything is OK, you can delete  C:\xMSOCache

This can be very handy when moving around large software development installations, circumventing a full uninstall/install sequence loosing lots of configuration settings.

–jeroen

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

How to build a CD ISO image file from the windows command line? – Stack Overflow

Posted by jpluimers on 2021/12/07

As I might need this in the future, some highlights from [Wayback] How to build a CD ISO image file from the windows command line? – Stack Overflow:

–jeroen

 

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

Writing desktop apps: use native tools, not web-tools

Posted by jpluimers on 2021/11/24

Despite the Electron framework, you might really want to consider writing desktop applications using native tools as it is extremely hard to write performant desktop applications otherwise.

It isn’t by coincidence that last year, Firefox by default makes the backspace key not go back to the previous web-page: it is still a problem in a truckload of interactive web applications, often even in web-based desktop applications:

I am not alone on this opinion:

In practice, “native” applications based on web-tools are notoriously hard to navigate by keyboard, which essential for swift operation.

I have filed a few bugs, and others many more on this, for example:

Also web-developers tend to love to introduce their own custom UX, like for a 6-digit numeric field, use 6 separate digit fields making it extremely hard to copy/paste numbers.

–jeroen
Read the rest of this entry »

Posted in Development, Software Development, Web Development, Windows Development | Leave a Comment »

Interesting situation now UWP isn’t panacea any more: for Windows development, native is back to center stage

Posted by jpluimers on 2021/11/17

Summary: UWP (Universal Windows Platform) is dying, long live native Windows development.

Source: [Wayback/Archive] Native Windows is Back to Center Stage

With the downplay of UWP, native development is again the primary Windows development model, after 20 years (given we had .NET in between). Native is what Delphi does at its best, so this is great news

Via:

–jeroen

Posted in Delphi, Development, Software Development, Windows Development | Leave a Comment »

[MS-ERREF]: NTSTATUS Values | Microsoft Docs

Posted by jpluimers on 2021/11/11

Searching for Windows error codes (like the ones in blue screens) often leads to web-sites with an incomplete list.

This is very complete: [WayBack] [MS-ERREF]: NTSTATUS Values | Microsoft Docs

–jeroen

Posted in Development, Software Development, Windows Development | Leave a Comment »

Zombie Processes are Eating your Memory | Random ASCII

Posted by jpluimers on 2021/10/21

Zombies probably won’t consume 32 GB of your memory like they did to me, but zombie processes do exist, and I can help you find them and make sure that developers fix them…

Source: [WayBackZombie Processes are Eating your Memory | Random ASCII

For my link archive via [WayBack] In short, close handles after process opening or creation, or it leaks and zombie process stays consuming 64k. – Ilya S – Google+

–jeroen

Posted in Development, Software Development, Windows Development | Leave a Comment »

Some Windows 10 updates remove registry values; not sure how widely

Posted by jpluimers on 2021/10/12

After watching an autologon system not logging on automatically over the past years, the pattern seems to be that at least major, and some less minor Windows updates remove autlogon parts of the registry.

I’m not sure where the boundary between “major” and “less minor” lies (though I suspect “cumulative updates” and larger), nor if more than these values are affected:

  • key "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon"
    • value name AutoAdminLogon gets removed or becomes value 0
    • value DefaultUserName gets removed
    • value DefaultPassword gets removed

This means that now after each startup, I need to schedule a task that runs a script setting the values I need depending if a password is needed or not.

The script also needs credentials, so I need to figure out how to properly do that.

I still need to decide between PowerShell or batch file script, as I already have the batch file from How to turn on automatic logon in Windows and automatic logon in Windows 2003.

For my future reference, some more links on things that can get deleted:

Hopefully these links will help me writing the scripts:

–jeroen

Posted in Batch-Files, CommandLine, Development, Power User, PowerShell, PowerShell, Scripting, Software Development, Windows, Windows 10, Windows Development | Leave a Comment »

Use the System File Checker tool to repair missing or corrupted system files

Posted by jpluimers on 2021/09/30

[WayBack] Use the System File Checker tool to repair missing or corrupted system files:

Read the rest of this entry »

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

Windows Sandbox: a feature I forgot about

Posted by jpluimers on 2021/09/29

The Windows Sandbox can be useful, but since it was never there in the first decades of my Windows usage, I forgot it was added.

I wonder how it is implemented, as it is really useful to test out new stuff, but I wonder what it protects against.

A few years back, I bumped into this because the [WayBack] Desktop Goose by samperson got viral (it can be downloaded from [WayBack/Archive.is] Desktop Goose v0.2.zip)

via [Archive.is] Samperson on Twitter: “I made a goose that destroys your computer Download it free here: samperson.itch.io/desktop-goose” / Twitter

So here are some links (you need at least build 1903 ([WayBack] Windows 10 May 2019 or 19H1) or Insider Preview Build 18305):

You can install it even if your Windows machine itself is a VM. For a physical machine, hardware virtualisation needs to be enabled (usually in the BIOS); for a VM, nested virtualisation enabled (check that in your virtualisation environment: Hyper-V, ESXi and others vary slightly on how to enable this).

Installation inside the Windows machine can be done via PowerShell (or the UI):

Note that starting the SandBox from an x86 process might require you to run a different WindowsSandBox.exe; see [WayBack] Launching Wsb (Windows Sandbox Config file) gives error – Total Commander:

you can use C:\WINDOWS\Sysnative\WindowsSandbox.exe in stead of C:\WINDOWS\System32\WindowsSandbox.exe in TC 32bit.

Also see:
[WayBack] On 64-bit Windows versions, some files and folders shown by Windows Explorer are not shown by Total Commander!

[WayBack] Windows x64: Explorer vs TC: Content of System32 different

–jeroen

Read the rest of this entry »

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