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

Run a batch file when a user connects to a session

Posted by jpluimers on 2019/10/11

Some links:

This is different from Windows: running a batch file during logon of a single or all users, as these do not run when RDP re-connecting to a session that is already logged on.

Related:

–jeroen

Posted in Power User, Windows | Leave a Comment »

How to access a BitLocker-encrypted drive in Ubuntu 16.04?

Posted by jpluimers on 2019/10/07

Interesting: [WayBack] I am using Ubuntu 16.04 along with windows 10. I have encrypted my drives using BitLocker. Now my encrypted drives are not visible in ubuntu 16.04. But I want to access my encrypted drives using.

References: [WayBack] How to access BitLocker encrypted drive in Linux? This article introduces one way to access Bitlocker encrypted drive in Linux

via:

–jeroen

Posted in *nix, Power User, Windows | Leave a Comment »

Enabling IIS log files on Windows 7

Posted by jpluimers on 2019/10/01

Since each Windows version, Microsoft hides the way to first enable, then configure IIS Logging in a different place: [WayBack] Enabling IIS log files on Windows 7.

That should provide me some guidance on how to find it back when it is not displayed at all.

Related:

–jeroen

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

zabbix on Windows: check the configuration before restarting the Zabbix Agent service

Posted by jpluimers on 2019/09/27

If the Zabbix configuration on Windows (especially mismatches in C:\zabbix\zabbix.agentd.conf.d), then the Zabbix Agent will not start at all:

C:\zabbix\bin\win64>zabbix_agentd.exe --start
zabbix_agentd.exe [4711]: ERROR: cannot start service [Zabbix Agent]: [0x0000041D] The service did not respond to the start or control request in a timely fashion.

This is how to check it before starting the service:

C:\zabbix\bin\win64\zabbix_agentd.exe --config C:\zabbix_agentd.conf
zabbix_agentd.exe [43]: ERROR: cannot add user parameter "MyDuplicate[*],PowerShell.exe -File C:\zabbix\UniquePowerShellScript.ps1 "$1"": key "MyDuplicate" already exists

The problem is that in the C:\zabbix\zabbix.agent.conf.d directory, two files had a similar config:

UserParameter=MyDuplicate[*],PowerShell.exe -File C:\zabbix\FirstPowerShellScript.ps1 "$1"
UserParameter=MyDuplicate[*],PowerShell.exe -File C:\zabbix\SecondPowerShellScript.ps1 "$1"

The problem is that the first part of UserParameter (before the [*])  is a key which needs to be unique over all configuration files.

If everything is fine, you will see this:

C:\zabbix\bin\win64\zabbix_agentd.exe --config C:\zabbix_agentd.conf
zabbix_agentd.exe [1581]: use foreground option to run Zabbix agent as console application

If you need to manually start Zabbix as a service, then perform this (the first step is not needed if the service has already been stopped):

C:\zabbix\bin\win64>zabbix_agentd.exe --stop
zabbix_agentd.exe [1642]: service [Zabbix Agent] stopped successfully

C:\zabbix\bin\win64>zabbix_agentd.exe --start
zabbix_agentd.exe [1642]: service [Zabbix Agent] started successfully

–jeroen

Posted in *nix, Linux, Monitoring, Power User, Windows, Zabbix | Leave a Comment »

Some FindStr links

Posted by jpluimers on 2019/08/23

When searching text files on Windows, often FindStr is the only tool at hand. Given the MS-DOS ancestry, it carries quite a bit of history, so here are a few links on the quirks it has:

General references:

–jeroen

Posted in Console (command prompt window), Power User, Windows | Leave a Comment »

Signal messaging downloads

Posted by jpluimers on 2019/08/23

I forgot about the announcement that Signal had also become available on the Desktop, but it is via [WayBack] https://signal.org/download/:

  • Mac
  • Windows
  • Debian based x64 Linux:

$ curl -s https://updates.signal.org/desktop/apt/keys.asc | sudo apt-key add -
$ echo "deb [arch=amd64] https://updates.signal.org/desktop/apt xenial main" | sudo tee -a /etc/apt/sources.list.d/signal-xenial.list
$ sudo apt update && sudo apt install signal-desktop

I like the mix of echo and tee to update the [WayBack] /etc/apt/sources.list.d folder with the signal-xenial.list file.

These links will always give you the latest download filename:

The files you get there will be relative to the path https://updates.signal.org/desktop/ so will be similar to:

You can get the sources at https://github.com/WhisperSystems/Signal-Desktop/releases

Via:

–jeroen

Posted in *nix, Android Devices, Apple, Debian, iMac, iOS, iPhone, Linux, Mac, Mac OS X / OS X / MacOS, MacBook, MacBook Retina, MacBook-Air, MacBook-Pro, MacMini, macOS 10.12 Sierra, Power User, Windows | Leave a Comment »

Enable/Disable Windows 10 “tray” notification area icons

Posted by jpluimers on 2019/08/19

It looks like they reorganised the way you can enable/disable the Windows Notification Area icons (often called “Icon Tray”) in Windows 10.

Up until Windows 8.1, you could run this:

%SystemRoot%\System32\rundll32.exe shell32.dll,Options_RunDLL 5

There you would end up editing the application specific icons.

As of Windows 10, you need to:

  1. Run %SystemRoot%\System32\rundll32.exe shell32.dll,Options_RunDLL 6
  2. Click on “Select which icons appear on the task bar” (or Dutch “Selecteren welke pictogrammen op de taakbalk worden weergegeven”)

So both the index changed, and you need an extra click to get at the application specific icons.

Further more, you can now only turn them on or off, where up until Windows 8.1, you could also choose only show notifications. I think on means only show notifications as for instance the Java Updater with a setting on on Windows 10 disappears after a Java Update has been installed, whereas on Windows 8.1 it would stay unless you switched from on to only show notifications.

The above commands are based on [WayBack] Create Direct Shortcut for “Notification Area Icons” in Windows Vista and Later – AskVG and

–jeroen

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

Windows: running “mklink” as Administrator “You do not have sufficient privilege to perform this operation.”

Posted by jpluimers on 2019/08/19

Via “mklink” “You do not have sufficient privilege to perform this operation.”:

The [WayBackmklink tool can create NTFS links so multiple directory entries point to the same object.

It requires the [WayBackSeCreateSymbolicLinkPrivilege (in English Windows versions [WayBack] “Create symbolic links”) which is by default not granted to users as it can expose security vulnerabilities.

Even if a user in the Windows Administrators group has the privilege, it still cannot be executed from a regular command-prompt:

C:\Users\Develope>mklink "%temp%\Recycler" c:\$RECYCLE.BIN
You do not have sufficient privilege to perform this operation.

If you grant a regular user the privilege you can execute if from a regular command prompt.

However, as member of the Administrators group, you have to run this from an elevated command-prompt:

C:\Windows\system32>mklink "%temp%\Recycler" c:\$RECYCLE.BIN
symbolic link created for C:\Users\Developer\AppData\Local\Temp\Recycler <<===>> c:\$RECYCLE.BIN

The reason is that members of the Administrators group get two security tokens when they logon: an elevated full-access token and a regular filtered access token.

They key here are the words full-access and filtered: the elevated token gets more access permissions than the account is configured for, but the regular token gets less access permissions than the account is configured for.

This means that a standard command prompt will not get all the access you might exec, as the regular token is the access permissions minus the filtered permissions.

By now you probably guessed that – despite the documentation [WayBack] Windows Vista Application Development Requirements for User Account Control Compatibility leaving out SeCreateSymbolicLinkPrivilege – that is actually part of the filter. So the regular command-prompt lacks the SeCreateSymbolicLinkPrivilege permission and gives you an error message when executing mklink.

This is opposite to a regular user: if you grant it the “Create Symbolic Links” any command-prompt will get the SeCreateSymbolicLinkPrivilege permission.

–jeroen

via:

Posted in Power User, Windows | Leave a Comment »

O&O ShutUp10

Posted by jpluimers on 2019/08/12

Interesting: free and portable (no install required: just unzip and go): [WayBack] O&O ShutUp10.

Via [WayBack] Jeroen Wiert Pluimers – Google+ (which I think I got via Twitter)

–jeroen

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

When an installer errors out with “Please re-run this installer as a normal user instead of”…

Posted by jpluimers on 2019/08/12

Via [WayBack] Anyone with a hint on how to work around this: … “Please re-run this installer as a normal user instead of”… – Jeroen Wiert Pluimers – Google+

This happened for instance when trying to install Source Tree 2.x on Windows (1.9.x works fine):

[Window Title]
SourceTreeSetup-2.3.1.0.exe

[Main Instruction]
Installation has failed

[Content]
Please re-run this installer as a normal user instead of “Run as Administrator”.

[Close]

The problem was by accident the machine got in a state to run commands without UAC approval, so the run dialog would already look have “This task will be created with administrative privileges”:

It was odd, as the machine didn’t have it enabled in the security policy (secpo.msc):

So I did a bit more digging, bumped into [WayBack] Why does my Run dialog say that tasks will created with administrative privileges? – The Old New Thing and had one of those #facepalm moments: Explorer had crashed, and I had started it from Process Explorer, forgetting Process Explorer had an UAC token.

The solution is easy:

  1. Logoff / Logon
  2. Verify the Windows-R shows a “normal” run:

Then you can just run the installer:

–jeroen

Posted in Batch-Files, Console (command prompt window), Development, Power User, Scripting, Software Development, The Old New Thing, Windows, Windows Development | Leave a Comment »