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

Archive for the ‘Development’ Category

Run the latest RDP session in full-screen

Posted by jpluimers on 2021/12/28

MSTSC.exe helptext

MSTSC.exe helptext

I created this small batch file:

:: start last RDP session (or new one with command-line parameters) full-screen
:: see https://interworks.com/blog/ijahanshahi/2012/01/02/mstsc-commands-and-creating-custom-remote-desktop-shortcut/
mstsc /f %*

It is based on [Wayback] MSTSC Commands and Creating a Custom Remote Desktop Shortcut | InterWorks, which has the helptext for MSTSC.exe (which stands for MicroSoft Terminal Services).

Later I found out a way easier method to get that helptext is to run MSTSC.exe /?, which shows a nice dialog:

[Window Title]
Remote Desktop Connection Usage

[Content]
MSTSC [] [/v:<server[:port]>] [/g:] [/admin] [/f[ullscreen]] [/w: /h:] [/public] | [/span] [/multimon] [/edit "connection file"] [/restrictedAdmin] [/remoteGuard] [/prompt] [/shadow: [/control] [/noConsentPrompt]]

"connection file" -- Specifies the name of an .RDP file for the connection.

/v:<server[:port]> -- Specifies the remote PC to which you want to connect.

/g: -- Specifies the RD Gateway server to use for the connection. This parameter is only read if the endpoint remote PC is specified with /v.

/admin -- Connects you to the session for administering a remote PC.

/f -- Starts Remote Desktop in full-screen mode.

/w: -- Specifies the width of the Remote Desktop window.

/h: -- Specifies the height of the Remote Desktop window.

/public -- Runs Remote Desktop in public mode.

/span -- Matches the remote desktop width and height with the local virtual desktop, spanning across multiple monitors, if necessary. To span across monitors, the monitors must be arranged to form a rectangle.

/multimon -- Configures the Remote Desktop Services session monitor layout to be identical to the current client-side configuration.

/edit -- Opens the specified .RDP connection file for editing.

/restrictedAdmin -- Connects you to the remote PC in Restricted Administration mode. In this mode, credentials won't be sent to the remote PC, which can protect you if you connect to a PC that has been compromised. However, connections made from the remote PC might not be authenticated by other PCs, which might impact application functionality and compatibility. This parameter implies /admin.

/remoteGuard -- Connects your device to a remote device using Remote Guard. Remote Guard prevents credentials from being sent to the remote PC, which can help protect your credentials if you connect to a remote PC that has been compromised. Unlike Restricted Administration mode, Remote Guard also supports connections made from the remote PC by redirecting all requests back to your device.

/prompt -- Prompts you for your credentials when you connect to the remote PC.

/shadow: -- Specifies the ID of the session to shadow.

/control -- Allows control of the session when shadowing.

/noConsentPrompt -- Allows shadowing without user consent.

[OK]

–jeroen

Posted in Batch-Files, Development, Power User, Remote Desktop Protocol/MSTSC/Terminal Services, Scripting, Software Development, Windows | Leave a Comment »

Windows: get CPU information on the console

Posted by jpluimers on 2021/12/28

It still seems that WMIC is the quickest way to get CPU information on the console:

T510-PSO C:\bin\rdp> wmic cpu get name,CurrentClockSpeed,MaxClockSpeed
CurrentClockSpeed  MaxClockSpeed  Name
2667               2667           Intel(R) Core(TM) i5 CPU       M 560  @ 2.67GHz

T510-PSO C:\bin\rdp> wmic path win32_Processor get Name,NumberOfCores,NumberOfLogicalProcessors
Name                                             NumberOfCores  NumberOfLogicalProcessors
Intel(R) Core(TM) i5 CPU       M 560  @ 2.67GHz  2              4

Actually, wmic cpu is shorthand for wmic path win32_Processor, so this works fine:

T510-PSO C:\bin\rdp> wmic cpu get name,CurrentClockSpeed,MaxClockSpeed,NumberOfCores,NumberOfLogicalProcessors
CurrentClockSpeed  MaxClockSpeed  Name                                             NumberOfCores  NumberOfLogicalProcessors
2667               2667           Intel(R) Core(TM) i5 CPU       M 560  @ 2.67GHz  2              4

The reason is that cpu is an alias:

T510-PSO C:\bin\rdp> wmic alias cpu list brief
FriendlyName  PWhere              Target
CPU           Where DeviceID='#'  Select * from WIN32_PROCESSOR

Via:

–jeroen

Posted in Batch-Files, Console (command prompt window), Development, Power User, Scripting, Software Development, T510, ThinkPad, Windows | Leave a Comment »

Sometimes you wish that companies – especially banks – would pay you for testing their sites instead of you paying them for using their sites

Posted by jpluimers on 2021/12/28

People around me often wonder why things that seem so obvious does not work, and ask me if I bump into similar things.

I do, and often wonder why banks do not pay users to do testing for them instead of the other way around.

Below the fold a few Twitter threads. They might be mainly involving ING, but that’s just because I use their business and consumer portals more than those of other banks.

Here are the summaries:

Read the rest of this entry »

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

bolkedebruin/rdpgw: Remote Desktop Gateway in Go for deploying on Linux/BSD/Kubernetes

Posted by jpluimers on 2021/12/23

On my list of things to try: an open source golang implementation of the Remote Desktop Gateway protocol: [Wayback/Archive.is] bolkedebruin/rdpgw: Remote Desktop Gateway in Go for deploying on Linux/BSD/Kubernetes.

[Wayback] [MS-TSGU]: Terminal Services Gateway Server Protocol | Microsoft Docs:

Specifies the Terminal Services Gateway Server Protocol, which is a mechanism to transport data-link layer (L2) frames on a Hypertext Transfer

Via: [Wayback] linux – Create RDP gateway in Raspberry Pi or Ubuntu – Super User

–jeroen

Posted in *nix, Development, Go (golang), Power User, Remote Desktop Protocol/MSTSC/Terminal Services, Software Development, Windows | Leave a Comment »

Fixing a classic Ring Chime that does not power on any more (no blue light)

Posted by jpluimers on 2021/12/23

A well known classic Ring Chime problem is that shortly after warranty expires, it won’t power on any more (no blue light visible at all):

[Wayback] Ring Chime Pro no power – Products / Accessories – Ring Community

Usually the built-in power supply is toast, and it is relatively easy to replace this with a USB power supply.

The below video shows how to do that for a classic Ring Chime Pro.

I’ve repeated the steps for a classic Ring Chime (model 8AC3S5-0EU0) that I got from [Archive.is] Ring Chime – WLAN Türgong für Video Türklingel, weiß: Amazon.de: Alle Produkte

–jeroen

Read the rest of this entry »

Posted in Development, Hardware Development, IoT Internet of Things, Network-and-equipment, Power User, Ring Doorbell/Chime (Amazon) | Leave a Comment »

If you change to a 2FA, then do not just mention the month, but also the year

Posted by jpluimers on 2021/12/22

[Wayback] Contact opnemen | Persoonsgebonden budget | SVB had this:

UX: 2FA needed as of October, but which year?

UX: 2FA needed as of October, but which year?

If you are going to introduce a change in a certain period of time, ensure you not just mention only a part of when it occurs: include at least year and month, possibly even day and time.

That way your users know if they still have some time left to setup 2FA, or won’t be able to logon without 2FA at all.

Read the rest of this entry »

Posted in Development, SocialMedia, Software Development, User Experience (ux), WhatsApp | Leave a Comment »

Twitter wayback_exe generates screenshots of old websites in old browsers every two hours

Posted by jpluimers on 2021/12/22

Classic browsers

Classic browsers

Going back to in time old web-pages using old web-browsers is fun!

[Archive.is] wayback_exe (@wayback_exe) | Twitter automatically does it for you.

A short introduction is at [Wayback] muffinlabs – @wayback_exe.

There is a playground at [Archive.is] oldweb.today where you can choose which classic browser to use for viewing and what page to view with it.

You can fiddle around with the node.js based code that is available on GitHub: [Wayback/Archive.is] muffinista/wayback_exe: code for twitter bot @wayback_exe

Some screenshots:

 

–jeroen

Read the rest of this entry »

Posted in Development, Fun, JavaScript/ECMAScript, Node.js, Power User, Scripting, Software Development, Web Browsers | Leave a Comment »

Delphi design-time packages: “%1 is not a valid Win32 application”

Posted by jpluimers on 2021/12/22

For my link archive, as I hardly see this (it happens in many Delphi versions and always has to do with missing/wrong DLLs), so always forget how to solve it.

Basically it is the same fix as for Fixing hg.exe “ImportError: DLL load failed: %1 is not a valid Win32 application.”:

If you get the below error when running hg.exe, then you are mixing a 64-bit Mercurial with 32-bit dependencies.

[Wayback] XE2 – “%1 is not a valid Win32 application” when installing a package – embarcadero.delphi.ide with entries by [Wayback] Remy Lebeau and [Wayback] Jeff Overcash:

I don't know what I did, but when trying to install a set of freshly built 
Delphi Win32 packages into the IDE, XE2 is giving me this error message now:

{quote}
Can't load package ...
%1 is not a valid Win32 application.
{quote}

a


> Often that is caused by the same named 32 and 64 bit run time packages
> and the OS finding the 64 bit first when the IDE must load the 32 bit.  If
> that is the case check your path variable and make sure the 32 bit paths
> appear first.

That was the problem.  The Windows PATH variable had a 64-bit folder in front 
of the 32-bit folder.  Deleted the 64-bit files and the error went away. 
 Noe I'm getting a new error:

{quote}
The program can't start because <RuntimePackage>.bpl is missing from
your computer. Try reinstalling the program to fix this problem.
{quote}

But the "missing" package is in the same folder as the design-time package 
I am trying to install.

Since the design time location is known it is explicitely 
loaded, but the run time is implicitly loaded and follows the dll loading rules. 
  Both are dynamically loaded.

The reason you only see this the next time you restart the IDE is because the 
working directory changes to your project directory when you load a project so 
if the runtime is there it is found that way, but the next time you load the IDE 
the working directory starts in the bin directory.

I thought it was, but turns out the 32-bit output folder had been moved and 
the PATH was not updated accordingly.  Fixed the PATH and now the packages 
install.

–jeroen

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

Busybox ash/dash – Hexadecimal To Decimal in Shell Script (via Stack Overflow)

Posted by jpluimers on 2021/12/21

This works fine on “BusyBox v1.29.3 (2019-05-21 15:22:06 PDT) multi-call binary.” that is included with VMware ESXi 6.5 update 3:

[Wayback] bash – Hexadecimal To Decimal in Shell Script – Stack Overflow

Dealing with a very lightweight embedded version of busybox on Linux means many of the traditional commands are not available (bc, printf, dc, perl, python)

echo $((0x2f))
47

hexNum=2f
echo $((0x${hexNum}))
47

Credit to [Wayback] Peter Leung for this solution.

–jeroen

Posted in *nix, *nix-tools, ash/dash, ash/dash development, Development, Power User, Scripting, Software Development | Leave a Comment »

DroidCam – Webcam for PC – Apps on Google Play

Posted by jpluimers on 2021/12/21

Since most phones still have better cameras than most laptops, this is on my list of things to try:

Android app: [Wayback/Archive] DroidCam – Webcam for PC – Apps on Google Play (there is also an iOS app, but I don’t use iOS devices)

Client software for Windows and Linux:  [Wayback/Archive] Dev47Apps

DroidCam turns your phone/tablet into a webcam for your PC.
Use it with chat programs like Zoom, MS Teams, and Skype.

Main Features:
– Chat using “DroidCam Webcam” on your computer, including Sound and Picture.
– Connect over WiFi or USB cable.
– Unlimited free usage at standard definition.
– Keep using your phone with DroidCam in background (Android).
– Simple, safe, efficient, and trusted by millions of people worldwide.

DroidCamX Pro Features:
– Switch to HD Mode for 720p/1080p high definition video.
– Camera controls: toggle light, enable continuous auto focus, zoom in/out.
– Rotate, Flip & Mirror the video to better match your setup.
– Adjust brightness, contrast, add video delay and adjust audio volume (Windows).
– USB-Only mode for extra privacy and security.
– Option to auto-mute phone calls.
– No Ads.

I am really curious how they did this on the software side: developing and signing drivers; low-latency communications protocol, etc.

Via: [Wayback/Archive] Apple deelt workaround die scherm verkleint voor MacBook Pro-notch-problemen – Computer – Nieuws – Tweakers

–jeroen

Posted in Development, Hardware Interfacing, Power User, USB, WebCam | Leave a Comment »