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

Archive for the ‘Windows’ Category

Chocolatey Software | NirLauncher

Posted by jpluimers on 2021/12/27

The cool thing about the Chocolatey NirLauncher install, is that it not just installs the launcher in the path, but all the NirSoft tools.

I wanted it in the path initially because I needed InsideClipboard to do some investigation (I wrote a similar tool ages ago, but could not readily find the source or executable, but InsideClipboard is better anyway).

This is cool, as I now can start any of the NirSoft tools from the cmd prompt, including [WayBack] NirLauncher itself, [WayBack] InsideClipboard and [WayBack] NirCmd (so I can now set the sound volume to 25% by running nircmd setsysvolume 16000)

To install:

choco install --yes NirLauncher

An older WayBack link notes a few important issues about anti-virus tools:

Read the rest of this entry »

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

Some links on resetting Windows 10 to a different installation language, but keeping the license

Posted by jpluimers on 2021/12/24

I had a few non English Windows 10 systems that I wanted to keep the license for, but otherwise have a clean Windows 10 English install on.

Some links; hopefully I can later make more notes.

Read the rest of this entry »

Posted in Power User, Windows, Windows 10 | 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 »

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 »

wget proxy: set the http_proxy environment variable

Posted by jpluimers on 2021/11/05

[WayBack] WGET 1.11.4 for Windows (win32) as well as many other tools use the [WayBack] http_proxy envonment variable to specify the http proxy settings.

To set it to a locally running Cntlm proxy, use this syntax:

set http_proxy=http://localhost:3128

–jeroen

Posted in Cntlm, Power User, Windows, Windows-Http-Proxy | Leave a Comment »

Windows 10: remove applications from the uninstall list

Posted by jpluimers on 2021/11/04

After doing Windows upgrades to Windows 10, every now and then I bump into applications that do not fully uninstall themselves and get stuck on the uninstall list (that you get when running appwiz.cpl or browse to the Control Pannel installed programs list).

[WayBack] How to Manually Remove Programs from the Add/Remove Programs List mentions to inspect registry key HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Uninstall, but that didn’t include some of the applications.

Then I found [WayBack] Remove entry from Windows 10 Apps & Features – Super User, where the answers mentions two other keys (thanks users [WayBack] Kreiggott and [WayBack] NutCracker):

  • HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall
  • HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Uninstall

Neat!

So I made the below PowerShell script to dump installed programs.

It grabs the list of registry keys containing installed software and their registry values, then empirically filters out most values that are also now shown in AppWiz.cpl.

Like database work, the values can have properties having a value or being null. So it’s SQL like expression galore to do the filtering.

This post is slightly related to Still unsolved since 2015 NetBeans: Bug 251538 – Your Installer is Creating Invalid Data for the NoModify DWORD Key which crashes enumeration of the Uninstall Key in at least PowerShell, where I already did (without documenting) some Uninstall spelunking.

## The collection of registry keys gives Name and Property of each registry key; where Property is compound containing all registry values of that key.
## Get-ItemProperty will get you all the values on which you can filter, including a few special PS* values that allow you to browse back to the registry key.

# x86 installs on x64 hardware: http://stackoverflow.com/questions/12199372/get-itemproperty-not-returning-all-properties/12200100#12200100
$nonUninstallableSoftwareRegistryKeys = (@
(Get-Item HKCU:\Software\Microsoft\Windows\CurrentVersion\Uninstall\*)) + 
(Get-Item HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\*) + 
(Get-Item HKLM:\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\*)
    
#$nonUninstallableSoftwareRegistryKeys.GetType().FullName
#$nonUninstallableSoftwareRegistryKeys | Get-Member
#$nonUninstallableSoftwareRegistryKeys | Out-GridView
#$nonUninstallableSoftwareRegistryKeys | Get-ItemProperty | Get-Member
#$nonUninstallableSoftwareRegistryKeys | Get-ItemProperty | Out-GridView
#Return
    
$nonUninstallableSoftwareRegistryNameValues = $nonUninstallableSoftwareRegistryKeys | 
    Get-ItemProperty |
    Where-Object {
        $_.SystemComponent -ne 1 -and $_.NoRemove -ne 1 -and
        $_.UninstallString -ne "" -and $_.UninstallString -ne $null
    }
# Filters out most things that AppWiz.cpl will leave out as well.
# Might need more fine tuning, but is good enough for now.

# PSPath shows the path to the underlying registry key of each value
$nonUninstallableSoftwareRegistryNameValues |
    Select-Object SystemComponent, NoRemove, DisplayName, DisplayVersion, UninstallString, PSChildName <#, PSPath #> |
    Sort-Object DisplayName |
    Out-GridView
# Need to find a good way to output this in a really wide Format-Table text format.

–jeroen

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

Terminating a script in PowerShell – Stack Overflow

Posted by jpluimers on 2021/11/03

I have the same problem mentioned in the answer to [WayBack] Terminating a script in PowerShell – Stack Overflow: confused by most answers, and keeping to forget what each method means (there is Exit, Return, Break and (if you love exception handling to do simple flow control), Throw.

So here is the full quote of what [WayBack] User New Guy answered:

Read the rest of this entry »

Posted in *nix, CommandLine, Development, Power User, PowerShell, PowerShell, Scripting, Software Development, Windows | Leave a Comment »

NTLM proxy authentication and Dropbox: need to try NTLMAPS and cntlm

Posted by jpluimers on 2021/11/01

Interesting:

Some corporate networks are behind HTTP proxy servers that use NTLM authentication. Dropbox currently doesn’t support this kind of proxy authentication. However, some users have reported some success using an intermediate proxy, such as [WayBack] NTLMAPS or [WayBackcntlm, to get Dropbox running on their network.

This article explains steps on various systems to install proxies that support NTLM authentication: [WayBackAllow Dropbox to Authenticate With a NTLM Proxy Server – The Unofficial Dropbox Wiki.

Need to try these. Maybe they work for Copy.com too (:

Some other links around HTTP Fiddler that might be relevant:     Read the rest of this entry »

Posted in Cntlm, Copy.com, DropBox, NTLM, Power User, SocialMedia, Windows, Windows-Http-Proxy | Leave a Comment »

Windows: unblocking SMB/NetBIOS/CIFS/File-and-Printer-sharing traffic from other subnets

Posted by jpluimers on 2021/10/29

If you enable File and Printer sharing on Windows, by default the firewall only enables it on private networks for the local subnet as remote address (for domain networks, it allows “Any”) as seen on the picture below.

When your network consists of multiple subnets, for instance when it is large, or multiple sites are connected via site-to-site VPN (often called LAN-to-LAN VPN) solutions, then these subnets cannot access each others files or printers.

Realising these default blocks, they are easy to resolve as explained in for instance [WayBack] Windows firewall blocking network shares through VPN server – Server Fault by [WayBack] Brian:

I realize this is almost three years late, but I just spent today fighting with the same problem. I did get it working, so I figured I’d share. Note that I’m using a Windows 7 PC as the file server; other versions might need slightly different configuration.

In the “Windows Firewall with Advance Security”, there are several “File and Printer Sharing” rules:

  • File and Printer Sharing (NB-Datagram-In)
  • File and Printer Sharing (NB-Name-In)
  • File and Printer Sharing (NB-Session-In)
  • File and Printer Sharing (SMB-In)

(There are additional rules, but I didn’t care about printer sharing. The same changes would apply if you want those.)

File and Printer Sharing appears to default to “Local subnet” only. You’ll need to add the subnet of your VPN clients.

Modify each of those rules as follows:

  1. Open the Properties dialog for the rule.
  2. Navigate to the Scope tab.
  3. In the Remote IP address section, the “These IP addresses” radio button should be selected.
  4. Click “Add…” next to the list of addresses. By default, only “Local subnet” is in the list.
  5. In the “This IP address or subnet:” field, enter the subnet assigned to your VPN clients (this is probably 192.168.1.0/24 in the OP, but if not, it’s the subnet assigned to the VPN adapter on the client side), then click OK.
  6. If you’re also using IPv6, add the VPN client IPv6 subnet as well.

That was enough for me to access file shares over the VPN.

(If you want to do it manually, you need to open TCP ports 139 and 445, and UDP ports 137 and 138, in the file server’s firewall.)

Hopefully I will find some time in the future to automate this using PowerShell, as netsh names are localised do hard to make universal.

These links might help me with that:

Read the rest of this entry »

Posted in Communications Development, Development, Internet protocol suite, Power User, SMB, TCP, Windows | Leave a Comment »