$theTitle=wp_title(" - ", false); if($theTitle != "") { ?>
About Virtualization, VDI, SBC, Application Compatibility and anything else I feel like
18 Oct // php the_time('Y') ?>
Sometimes it can be useful to determine what registry key belongs to a registry key handle. And exampling is when hooking RegQueryValue so you can determine the registry key that a value belongs to instead of having to track the registry key when it’s opened.
To obtain the registry key we can pass a handle to the NtQueryKey
API with which has the following signature:
1 2 3 4 5 6 7 | NTSYSAPI NTSTATUS NtQueryKey( [in] HANDLE KeyHandle, [in] KEY_INFORMATION_CLASS KeyInformationClass, [out, optional] PVOID KeyInformation, [in] ULONG Length, [out] PULONG ResultLength ); |
1 2 | [DllImport("ntdll.dll", EntryPoint="NtQueryKey", SetLastError=false)] private static extern UInt32 NtQueryKey(IntPtr KeyHandle, KEY_INFORMATION_CLASS KeyInformationClass, IntPtr KeyInformation, UInt32 Length, ref UInt32 ResultLength); |
To get the keyname we need to pass the KeyNameInformation
enum and we can set the ReturnLength
parameter to 0 to obtain the required buffer size:
1 2 3 4 | UInt32 nts; UInt32 resLen = 0; IntPtr buffer = IntPtr.Zero; nts = NtQueryKey(KeyHandle, KEY_INFORMATION_CLASS.KeyNameInformation, IntPtr.Zero, 0, ref resLen); |
17 Oct // php the_time('Y') ?>
Sometimes I want to download a video from a website for offline usage, for example when I want to watch it whilst travelling.
Most video websites don’t want you do download videos as they of course want to show their ads and receive the clicks. I am not discussing the legal side here, up to you to check if it’s legally allowed to download the video you’re interested.
A very common way to make direct downloading of a video more difficult is to cut a video in many small video files (.ts files). Here’s an example screenshot of the Chrome developer view whilst playing a video from a popular Dutch website called Dumpert, filtering on .ts:
You can of course manually download al the .ts files and re-encode them to a single video file but it would be a lot of work.
The most common way to do this automatically is to use a browser extension or a separate application but in many cases they are either ridden with ads or malware.
So let’s see if we can do this ourselves.
We will need the following tools:
Just the 2 binaries will work, in my case (Windows) youtube-dl.exe and ffmpeg.exe which can you place in the same folder.
I am using the following video in this example: https://www.dumpert.nl/?selectedId=100043775_5cc0ba15
11 Oct // php the_time('Y') ?>
In my lab I have deployed Office 2019 to an Windows 2019 VM to do some testing with Citrix Virtual Apps and Desktops.
The proper way to do this is to customize the Office installation using the Office Deployment Tool (ODT). The page even lists an example containing a value to accept the EULA.
I didn’t do that, I just installed it manually (I know.) and upon first launch of any of the Office components I would always get this EULA nag screen:
So how do you get rid of this nag screen if you didn’t use ODT?
To figure that out I started Outlook whilst I ran SysInternals Process Monitor with the following Filters configured:
What I was looking for was (ideally) a registry key or value that was global to all users (so in HKLM) and for all Office components. And from the Procmon trace this Value seemed a good candidate: