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

How to hide an entire drive from prying eyes on Windows 10 | Windows Central

Posted by jpluimers on 2019/02/25

For my link archive: 3 ways to hide drive letters.

TL;DR:

  1. Using diskman.msc (Disk Management) by removing drive letters or/and changing the mount point to be in another drive.
  2. Using regedit.exe (or other Registry Editor like reg.exe) for a bitmap of drive letters to add a value named [WayBackNoDrives to
    • globally to HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer
    • locally for the current user to HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer
  3. Using secpol.msc (Local Security Policy editor, or find it through gpedit.msc) to add a security policy similar to the registry.

Source: [WayBackHow to hide an entire drive from prying eyes on Windows 10 | Windows Central

After setting NoDrive you have to reboot (logoff/logon isn’t sufficient).

For the NoDrive bitmap: these list below has the values to add for each drive to hide, but it’s easier to use the [WayBackNT Drive Calculator – The ‘NoDrives’ Registry Key Value Calculator which calculates the Decimal version of the value needed.

Read the rest of this entry »

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

When Windows 10 doesn’t recognise your DVD device any more

Posted by jpluimers on 2019/02/22

Yes, some people still use DVD devices. My mentally retarded brother does every now and then, so it was a big problem that one day he could not put play a photo DVD any more.

This happened:

The selected device was gone. Reboots (including cold ones) didn’t help.

What helped was selecting the “Dual Channel PCI IDE Controller”, remove it, then reboot so Windows would try to re-install the drivers. After that the DVD drive appeared again.

Later I found these two links with similar solutions:

–jeroen

 

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

Windows 7..10: disable shutdown/hibernate/sleep/restart from UI

Posted by jpluimers on 2019/02/18

I needed this for the Windows 10 machine of my mentally retarded brother: WoL (wake-on LAN) for his machine always works when it is in sleep or deep sleep mode, not every now and then fails when fully powered off.

After it is disabled in the UI, you can still perform it with [WayBackshutdown.exe, so I added these shortcuts first:

Disabling the Shutdown related actions in the UI consists of two steps:

  1. Removing it from the logon screen using the registry
  2. Removing it from the user using gpedit.msc (which is wrapped in mmc.exe)

I will try to get the registry changes for the second using [WayBackRegFromApp – Generate RegEdit .reg file from Registry changes made by application (thanks [WayBack] magicandre1981 for suggesting that at [WayBackwindows – How can I use Process Monitor to detect register changes made by GPEdit modifications? – Super User).
The wrapping mmc.exeis easiest to obtain using Process Explorer, and RegFromApp likely needs to run in elevated mode.

If that fails, I can try Process Monitor as suggested by [WayBack] Tom Wijsman in [WayBackcommand line – Change group policy using windows CMD – Super User.

The reason for the above is that I want to avoid UI based modifications that are hard to script.

Remove Shutdown options from the logon screen

This is just the registry setting below.

It also removes the reboot/hibernate/sleep options from the logon screen, so you need shortcuts for that.

Remove Shutdown for the regular users UI

This can be done using either gpedit.msc (Group Policy Editor) drilling down to the local policies or secpol.msc (the Local Policy Editor):

  1. Drill down to
    1. Local Policies
    2. User Rights Management
  2. Double click Shut down the system
  3. Remove the groups you don’t want the system to shutdown
  4. Press OK to confirm

See the video below how.

I’ve removed the group Users and kept the group Administrators to allow ShutDown.

Administrators now do need to execute the above commands (for instance shutdown.exe /h /f) in with an UAC administrative token enabled!

If you do not want that, add the users that can perform Shutdown commands to a new group, then aadd that group to Shutdown the system.

If you want to perform this system wide for all users, then it’s faster to change the [WayBackWindows Explorer NoClose policy (see also [WayBackGroup Policy Registry Reference).

Read the rest of this entry »

Posted in Ethernet, Network-and-equipment, Power User, Wake-on-LAN (WoL), Windows | Leave a Comment »

Windows <= 10: batch file to open Windows Update panel

Posted by jpluimers on 2019/02/15

Up until Widows 8.1, you could use wuapp to start the Windows Update panel.

For a while, Windows 10 needed a cumbersome language specific workaround described at Windows 10 – language neutral batch file to start Windows.

That stopped working after a few builds, but I forgot to make a note in which build exactly. Already in Windows 10 build 10122, the icon in wucltux.dll, so this might have been shortly after the initial “RTM” (retroactively named 1507).

So for a while, I had this batch file:

Since then I had to maintain too many locales running Windows 10. So here is the batch file:

for /f "delims=" %%A in ('PowerShell -Command "(Get-Culture).Name"') do explorer "%LocalAppData%\Packages\windows.immersivecontrolpanel_cw5n1h2txyewy\LocalState\Indexed\Settings\%%A\AAA_SystemSettings_MusUpdate_UpdateActionButton.settingcontent-ms"

It uses these tricks:

  1. Set output of a command as a variable (in this case a for loop variable)
  2. Execute PowerShell script in a .bat file
  3. PowerShell Get-Culture (which gets a .NET CultureInfo instance)
  4. CultureInfo.Name property (which has the nl-NL, en-US, etc codes in it)

But now I have extended it to support old and new Windows versions:

if exist %windir%\System32\wuapp.exe (
  %windir%\System32\rundll32.exe url.dll,FileProtocolHandler wuapp.exe
) else (
  %windir%\explorer ms-settings:windowsupdate
)

–jeroen

via: Windows Update Shortcut – Create in Windows 10 – Windows 10 Forums

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

VNC, Windows and UAC prompts

Posted by jpluimers on 2019/02/15

Since I needed to maintain a Windows PC behind a VPN connection via the console (so not via RDP sessions) including installation of software, I needed a (preferably free or open source) solution supporting elevation through UAC (User Account Control).

For a good description of differences between RDP and VNC, see [WayBack] remote desktop – TightVNC while an RDP session is running – Super User by [WayBackUser Canadian Luke.

Of the many non functional search results, the one suggesting running UltraVNC as a service is the one that really worked: [WayBack] If you install UltraVNC as a service, you can see the UAC notifications and press the buttons… VNC on windows 7 with administrator rights – Super User.

  1. I only needed the “Ultra VNC Server Silent” installation (see screenshot below).
  2. Run the UltraVNC settings (default location for the settings application is C:\Program Files\uvnc bvba\UltraVNC\uvnc_settings.exe)
    1. In the Security tab, be sure to set good passwords for read/write access (VNC Password) and read-settings (View-Only password)
    2. In the  Service tab, ensure the service is installed and if it is stop+start the service
  3. Optionally ensure a TLS or SSH tunnel (as by default ports 5900 and 5800 are unencrypted)
    • I need to research this further, as there seems to be a plugin possibility.

Now I can use Screen Sharing on my Mac to access the machine via a VPN over the VNC protocol. Combined with a Wake On LAN feature in the remote network, this works splendid.

Read the rest of this entry »

Posted in Power User, Remote Desktop Protocol/MSTSC/Terminal Services, Windows | Leave a Comment »

shared folders not visible · Issue #276 · stascorp/rdpwrap

Posted by jpluimers on 2019/02/11

Reminder to self: check if this rdpwrap issue [WayBackshared folders not visible · Issue #276 · stascorp/rdpwrap has been resolved by now.

–jeroen

Posted in Power User, Remote Desktop Protocol/MSTSC/Terminal Services, Windows | Leave a Comment »

Some commands and links from “Praktijk | Windows PE”; Softlink 1807114 – c’t magazine

Posted by jpluimers on 2019/02/04

Downloads: [WayBack] Softlink 1807114 – c’t magazine

Commands (only execute them from within a Windows PE session!):

  1. Sometimes the network does not start, so you can use the wpeutil command to start it: wpeutil initializenetwork; with wpeutil disablefirewall and wpeutil enablefirewall you can manage the firewall.Background information:
  2. Like regular Windows, net use can map shares to drive letters over a wired network connection. There is a small thing with anonymous logon, see the below links for more, and you might need a network driver that is not automatically loaded, see the next section.
    1. [WayBack] samba – Windows 10 PE Unable to map network drive anonymously – Server Fault
    2. [WayBack] WinPE Network Drivers: Initializing and adding drivers | Microsoft Docs
  3. Windows PE can load most drivers through the drvload command; ensure you have unpacked your drivers and the driver directory contains the appropriate  .inf file, then run drvload E:\driver\drivername.inf where E:\driver is where your driver files are.Background information:
  4. The manage-bde -unlock command can unlock a Bitlocker volume. There are various parameters, but the most used combination is manage-bde -unlock C: -password where C: is the drive you want to unlock and -password (or -pw) causes it to prompt for a password.Background information:
  5. To get information which kind of boot was performed (BIOS or UEFI):

    wpeutil updatebootinfo
    regedit

    Then browse toHKEY_LOCAL_MACHINE\System\CurrentControlSet\Control and check the value for PEFirmwareType: when 1, it is BIOS, when 2, it is UEFI.

    or check out

    [WayBack] Boot to UEFI Mode or Legacy BIOS mode | Microsoft Docs and run this small script:

    wpeutil UpdateBootInfo for /f "tokens=2* delims= " %%A in ('reg query HKLM\System\CurrentControlSet\Control /v PEFirmwareType') DO SET Firmware=%%B
    :: Note: delims is a TAB followed by a space.
    if %Firmware%==0x1 echo The PC is booted in BIOS mode.
    if %Firmware%==0x2 echo The PC is booted in UEFI mode.

You can execute compact.exe with the /compactos parameter from both a regular Windows installation as well as from Windows PE. From Windows PE, you need to provide an extra parameter: the drive to check.

Regular Windows:

  • compact.exe /compactos queries if it is enabled
  • compact.exe /compactos:always enables compactOS

Windows PE:

  • Compact.exe /CompactOS:Query /WinDir:E:\Windows

Background information:

–jeroen

Posted in Power User, Windows | Leave a Comment »

Posted by jpluimers on 2019/02/01

For my memory:

What’s new in this update:

It’s time for the first update of the year! We appreciate all your comments sent to us through the App Store, in-app feedback and email; and continue focusing on making this app better with each release.

In this version we addressed the following issues:

  • Added support for the AVC (420 and 444) codec, available when connecting to current versions of Windows 10.
  • In “fit to window mode”, a window refresh now occurs immediately after a resize to ensure that content is rendered at the correct interpolation level.
  • Fixed a layout bug that caused feed headers to overlap for some users.
  • Cleaned up the Application Preferences UI.
  • Polished the Add/Edit Desktop UI.
  • Made lots of fit and finish adjustments to the Connection Center tile and list views for desktops and feeds.

Please continue to send us feedback. We read it all and factor it into our planning. If you encounter any errors, you can always contact us via Help > Report an Issue.

NOTE: There is a bug in macOS 10.14.0 and 10.14.1 that can cause the “.com.microsoft.rdc.application-data_SUPPORT/_EXTERNAL_DATA” folder (nested deep inside the ~/Library folder) to consume a large amount of disk space. To resolve this issue, delete the folder contents and upgrade to macOS 10.14.2. Note that a side-effect of deleting the folder contents is that snapshot images assigned to bookmarks will be deleted. These images will be regenerated when reconnecting to the remote PC.

Read the rest of this entry »

Posted in Apple, Mac OS X / OS X / MacOS, Power User, Remote Desktop Protocol/MSTSC/Terminal Services, Windows | Leave a Comment »

Tools for TCP tunnels over HTTP/HTTPS

Posted by jpluimers on 2019/01/16

With the advent of WebSockets, it looks like TCP tunnels over HTTP/HTTPS are gaining more ground and I need to put some research time in them.

Some old to new links:

CONNECT requests are not supported by many HTTP proxies, especially in larger organisations, so chisel and crowbar have a much bigger chance there.

And of course there is SoftEtherVPN/SoftEtherVPN: A Free Cross-platform Multi-protocol VPN Software. * For support, troubleshooting and feature requests we have http://www.vpnusers.com/. For critical vulnerability please email us. (mail address is on the header.).

However, that is a VPN solution which is much broader than just a single TCP tunnel. You can so similar things with OpenVPN, but over HTTP/HTTPS, also requires CONNECT:

SoftEtherVPN seems to be more versatile though. I blogged about that before, but back then didn’t have needs for it yet. VPN over HTTPS: Ultimate Powerful VPN Connectivity – SoftEther VPN Project.

–jeroen

via: [WayBackVPN through only http – Server Fault answer by [WayBack] neutrinus

Posted in Communications Development, Development, HTTP, https, Internet protocol suite, Network-and-equipment, OpenVPN, Power User, TCP, VPN, WebSockets, Windows-Http-Proxy | Leave a Comment »

In windows, can I redirect stdout to a (named) pipe in command line? – Super User

Posted by jpluimers on 2019/01/14

Interesting thought [WayBackIn windows, can I redirect stdout to a (named) pipe in command line? – Super User.

The only problem seems to be a good way of creating/removing those pipes.

–jeroen

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