<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Remko's Blog</title><link>https://remkoweijnen.nl/blog/</link><description>Recent content on Remko's Blog</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Mon, 27 Feb 2023 10:00:00 +0000</lastBuildDate><atom:link href="https://remkoweijnen.nl/blog/index.xml" rel="self" type="application/rss+xml"/><item><title>Quip hangs with waiting cursor</title><link>https://remkoweijnen.nl/blog/2023/02/27/quip-hangs-with-waiting-cursor/</link><pubDate>Mon, 27 Feb 2023 10:00:00 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2023/02/27/quip-hangs-with-waiting-cursor/</guid><description>&lt;p&gt;It's been a little while since I had a "nice" application problem to blog about. It's weird but I actually enjoy looking into those issues, well probably means I'm weird which is probably right.&lt;/p&gt;&lt;p&gt;I use a Virtual Desktop as my primary work desktop since my day 1 at work (and all the day 1's after).&lt;/p&gt;</description></item><item><title>Get registry key name from a handle</title><link>https://remkoweijnen.nl/blog/2022/10/18/get-registry-key-name-from-a-handle/</link><pubDate>Tue, 18 Oct 2022 10:00:00 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2022/10/18/get-registry-key-name-from-a-handle/</guid><description>&lt;p&gt;&lt;img loading="lazy" decoding="async" src="https://remkoweijnen.nl/blog/wp-content/uploads/2025/08/Regedit_thumb.webp" alt="Regedit" width="64" height="64" class="wp-image-4421 alignleft" /&gt;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.&lt;/p&gt;</description></item><item><title>Downloading a Video from the Web without Browser Extension</title><link>https://remkoweijnen.nl/blog/2022/10/17/downloading-a-video-from-the-web-without-browser-extension/</link><pubDate>Mon, 17 Oct 2022 00:00:00 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2022/10/17/downloading-a-video-from-the-web-without-browser-extension/</guid><description>&lt;p&gt;Sometimes I want to download a video from a website for offline usage, for example when I want to watch it whilst travelling.&lt;/p&gt;&lt;p&gt;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.&lt;/p&gt;</description></item><item><title>Get Rid of the Office 2019 Licensing Nag Screen</title><link>https://remkoweijnen.nl/blog/2022/10/11/get-rid-of-the-office-2019-licensing-nag-screen/</link><pubDate>Tue, 11 Oct 2022 10:00:00 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2022/10/11/get-rid-of-the-office-2019-licensing-nag-screen/</guid><description>&lt;p&gt;In my lab I have deployed Office 2019 to an Windows 2019 VM to do some testing with Citrix Virtual Apps and Desktops.&lt;/p&gt;
&lt;p&gt;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.&lt;/p&gt;</description></item><item><title>The AWS Access Key Id you provided does not exist in our records using AWS PowerShell Cmdlets</title><link>https://remkoweijnen.nl/blog/2022/06/17/the-aws-access-key-id-you-provided-does-not-exist-in-our-records-using-aws-powershell-cmdlets/</link><pubDate>Fri, 17 Jun 2022 10:00:00 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2022/06/17/the-aws-access-key-id-you-provided-does-not-exist-in-our-records-using-aws-powershell-cmdlets/</guid><description>&lt;p&gt;After changing AWS accounts I resetup my API key so I could use the AWS PowerShell CmdLets.&lt;/p&gt;&lt;p&gt;However even though I was sure I configured everything correctly I couldn't call any EC2 cmdlet. More about that further below but let's refresh how to setup an API key for PowerShell:&lt;/p&gt;</description></item><item><title>Ubuntu crash when pasting files from VMware</title><link>https://remkoweijnen.nl/blog/2022/06/15/ubuntu-crash-when-pasting-files-from-vmware/</link><pubDate>Wed, 15 Jun 2022 10:00:00 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2022/06/15/ubuntu-crash-when-pasting-files-from-vmware/</guid><description>&lt;p&gt;It's been a while since I last wrote a post but it does feel good so I'm expecting to pick up blogging in a more regular cadence soon!&lt;/p&gt;&lt;p&gt;This one is a quicky though, as I had an annoying issue with Ubuntu 22.04 VM's running on VMware workstation.&lt;/p&gt;</description></item><item><title>No internet access from Edge and other Microsoft apps</title><link>https://remkoweijnen.nl/blog/2019/10/16/no-internet-access-from-edge-and-other-microsoft-apps/</link><pubDate>Wed, 16 Oct 2019 15:30:57 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2019/10/16/no-internet-access-from-edge-and-other-microsoft-apps/</guid><description>&lt;p&gt;I had a strange issue today: I couldn't open any webpage in the Edge browser on my Windows 10 machine:&lt;/p&gt;
&lt;figure class="wp-block-image"&gt;&lt;img width="678" height="525" loading="lazy" decoding="async" src="https://remkoweijnen.nl/blog/wp-content/uploads/2019/10/image.webp" alt="Edge browser with error message &amp;quot;Can't reach this page&amp;quot;" class="wp-image-4336"/&gt;&lt;figcaption&gt;Edge browser: "Can't reach this page"&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;&lt;/p&gt;
&lt;div class="wp-block-image"&gt;&lt;figure class="alignleft"&gt;&lt;img width="112" height="68" loading="lazy" decoding="async" src="https://remkoweijnen.nl/blog/wp-content/uploads/2019/10/image-1.webp" alt="Network icon showing Internet access" class="wp-image-4337"/&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;The network icon was showing that there was Internet access and a quick check on the command prompt showed that the connection (including name resolution appeared to work fine):&lt;/p&gt;
&lt;figure class="wp-block-image"&gt;&lt;img width="640" height="381" loading="lazy" decoding="async" src="https://remkoweijnen.nl/blog/wp-content/uploads/2019/10/image-2.webp" alt="Command prompt showing that ping to www.google.com works fine.
&lt;p&gt;ping &lt;a href="https://www.google.com"&gt;www.google.com&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Pinging &lt;a href="https://www.google.com"&gt;www.google.com&lt;/a&gt; [172.217.168.196] with 32 bytes of data:&lt;br&gt;
Reply from 172.217.168.196: bytes=32 time=15ms TTL=55&lt;br&gt;
Reply from 172.217.168.196: bytes=32 time=14ms TTL=55&lt;/p&gt;
&lt;p&gt;Ping statistics for 172.217.168.196:&lt;br&gt;
Packets: Sent = 2, Received = 2, Lost = 0 (0% loss),&lt;br&gt;
Approximate round trip times in milli-seconds:&lt;br&gt;
Minimum = 14ms, Maximum = 15ms, Average = 14ms&amp;quot; class=&amp;ldquo;wp-image-4338&amp;rdquo;/&amp;gt;&lt;figcaption&gt;ping to &lt;a href="https://www.google.com"&gt;www.google.com&lt;/a&gt;&lt;/figcaption&gt;&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;Other browsers such as Firefox (my default browser) and Chrome also worked fine but some other Microsoft applications also didn't work such as the Microsoft Store:&lt;/p&gt;</description></item><item><title>DesktopAppConverter : error 'E_MANIFEST_USE_DEFAULT_VALUE_FAILED</title><link>https://remkoweijnen.nl/blog/2018/03/22/desktopappconverter-error-e_manifest_use_default_value_failed/</link><pubDate>Thu, 22 Mar 2018 11:54:54 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2018/03/22/desktopappconverter-error-e_manifest_use_default_value_failed/</guid><description>&lt;p&gt;I had a strange error today using the Desktop App Converter with the parameters given from the Store for Business.&lt;/p&gt;
&lt;p&gt;The conversion would fail with the following error:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2018/03/image.webp" class="glightbox" data-type="image" data-gallery="post-4302"&gt;&lt;img loading="lazy" decoding="async" style="display: inline;" title="DesktopAppConverter" src="https://remkoweijnen.nl/blog/wp-content/uploads/2018/03/image_thumb.webp" alt="DesktopAppConverter : error 'E_MANIFEST_USE_DEFAULT_VALUE_FAILED': Property 'Package.Applications.Application.Id' in AppxManifest.xml could not be set to the default value" width="436" height="73" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;m not sure why this fails as the PackageName is provided by the store and should be valid. An answer on stackoverflow suggested to use a different value for the PackageName parameter and then edit the manifest.&lt;/p&gt;
&lt;p&gt;I don&amp;rsquo;t like this method as manual modifications of the manifest often leads to errors when submitting the application to the store.&lt;/p&gt;
&lt;p&gt;So let&amp;rsquo;s have a look and see why we&amp;rsquo;re getting this error.&lt;/p&gt;
&lt;p&gt;I searched for &lt;code&gt;E_MANIFEST_USE_DEFAULT_VALUE_FAILED&lt;/code&gt; in the DesktopAppConverter folder and found 1 occurence in &lt;code&gt;ManifestOps.ps1&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;From a look at the code it wasn&amp;rsquo;t immediately clear where the validation failed so I decided to debug it.&lt;/p&gt;</description></item><item><title>signtool sign returns error 0x800700C1</title><link>https://remkoweijnen.nl/blog/2018/01/19/signtool-sign-returns-error-0x800700c1/</link><pubDate>Fri, 19 Jan 2018 17:54:49 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2018/01/19/signtool-sign-returns-error-0x800700c1/</guid><description>&lt;p&gt;I was trying to sign an .appx package that I created with the Desktop App Converter. However signtool returned the following error: Sign returned error: &lt;code&gt;0x800700C1 For more information, please see http://aka.ms/badexeformat&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2018/01/image-13.webp" class="glightbox" data-type="image" data-gallery="post-4289"&gt;&lt;img loading="lazy" decoding="async" style="display: inline;" title="Signtool: Sign returned error: 0x800700C1 | For more information, please see http://aka.ms/badexeformat" src="https://remkoweijnen.nl/blog/wp-content/uploads/2018/01/image_thumb-13.webp" alt="image" width="437" height="82" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Sadly signtool doesn&amp;rsquo;t return more detailed information, even when passing the debug switch:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2018/01/image-14.webp" class="glightbox" data-type="image" data-gallery="post-4289"&gt;&lt;img loading="lazy" decoding="async" style="display: inline;" title="image" src="https://remkoweijnen.nl/blog/wp-content/uploads/2018/01/image_thumb-14.webp" alt="image" width="434" height="322" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;So what&amp;rsquo;s going on?&lt;/p&gt;</description></item><item><title>Case of the Crashing Task Scheduler</title><link>https://remkoweijnen.nl/blog/2018/01/18/case-crashing-task-scheduler/</link><pubDate>Thu, 18 Jan 2018 14:56:23 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2018/01/18/case-crashing-task-scheduler/</guid><description>&lt;p&gt;Recently I installed a new Windows 10 machine (version 1709 aka Fall Creators Update).&lt;/p&gt;
&lt;p&gt;After a while I noticed a problem with the Task Scheduler: when I wanted to open the &amp;ldquo;Schedule Tasks&amp;rdquo; option from settings I received the following error message:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2018/01/image-7.webp" class="glightbox" data-type="image" data-gallery="post-4265"&gt;&lt;img loading="lazy" decoding="async" style="display: inline;" title="Task Scheduler" src="https://remkoweijnen.nl/blog/wp-content/uploads/2018/01/image_thumb-7.webp" alt="The remote computer was not found." width="238" height="133" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The Task Scheduler MMC snapin was empty:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2018/01/image-8.webp" class="glightbox" data-type="image" data-gallery="post-4265"&gt;&lt;img loading="lazy" decoding="async" style="display: inline;" title="Task Scheduler" src="https://remkoweijnen.nl/blog/wp-content/uploads/2018/01/image_thumb-8.webp" alt="Task Scheduler (Local) | Empty" width="423" height="171" /&gt;&lt;/a&gt;&lt;/p&gt;</description></item><item><title>How to use a comma in the Publisher field when using the Desktop App Converter</title><link>https://remkoweijnen.nl/blog/2018/01/16/use-comma-publisher-field-using-desktop-app-converter/</link><pubDate>Tue, 16 Jan 2018 14:55:51 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2018/01/16/use-comma-publisher-field-using-desktop-app-converter/</guid><description>&lt;p&gt;&lt;img style="margin: 0px 7px 0px 0px; float: left; display: inline;" src="https://docs.microsoft.com/en-us/windows/uwp/porting/images/desktop-to-uwp/dac.png" alt="DAC Icon" width="73" height="73" align="left" /&gt;When using the Desktop App Converter there&amp;rsquo;s no need to sign the resulting .appx packages with your own code signing certificate when you submit them to the Store.&lt;/p&gt;
&lt;p&gt;However if you want to test the package on a different machine or distribute it to test users you may want to sign the .appx with a certificate.&lt;/p&gt;
&lt;p&gt;One option is to use the &lt;code&gt;-sign&lt;/code&gt; parameter, in this case the Desktop App Converter generates a code signing certificate and signs the package with it. Although easy to use, it&amp;rsquo;s not very convenient if you want to distribute the .appx as you need to add the certificate to the &lt;code&gt;Trusted People&lt;/code&gt; certificates store (for each user). See &lt;a href="https://docs.microsoft.com/en-us/windows/uwp/porting/desktop-to-uwp-run-desktop-app-converter#run-app" target="_blank" rel="noopener"&gt;Run the Packaged App&lt;/a&gt; in the documentation.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2018/01/image-1.webp" class="glightbox" data-type="image" data-gallery="post-4243"&gt;&lt;img loading="lazy" decoding="async" style="margin: 0px 3px 0px 0px; float: right; display: inline;" title="image" src="https://remkoweijnen.nl/blog/wp-content/uploads/2018/01/image_thumb-1.webp" alt="image" width="95" height="95" align="right" /&gt;&lt;/a&gt;If you want to sign the .appx package with a trusted certificate (e.g. issued by a trusted certificate authority such as &lt;a href="https://www.digicert.com/code-signing/" target="_blank" rel="noopener"&gt;DigiCert&lt;/a&gt;) you need to make sure that you pass the subject (the CN) from your code signing certificate to the Desktop App Converter (using the &lt;code&gt;-Publisher&lt;/code&gt; parameter).&lt;/p&gt;</description></item><item><title>How to remove Windows.old folder</title><link>https://remkoweijnen.nl/blog/2018/01/16/remove-windows-old-folder/</link><pubDate>Tue, 16 Jan 2018 13:00:14 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2018/01/16/remove-windows-old-folder/</guid><description>&lt;p&gt;Just a very quick note here (mostly a note to self) but I had a couple of folder from previous Windows 10 installations named Windows.old Windows.old(1), Windows.old(2) etc.&lt;/p&gt;
&lt;p&gt;These folders should be removed when you use Disk Cleanup and select the &amp;ldquo;Remove previous Windows Installation(s)&amp;rdquo; option.&lt;/p&gt;</description></item><item><title>Sign APPX packages with PowerShell</title><link>https://remkoweijnen.nl/blog/2017/12/20/sign-appx-packages-powershell/</link><pubDate>Wed, 20 Dec 2017 15:00:33 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2017/12/20/sign-appx-packages-powershell/</guid><description>&lt;p&gt;I have been working with Microsoft&amp;rsquo;s Desktop App Converter a lot recently. Even though there&amp;rsquo;s an option to autosign the resulting package with the &lt;code&gt;-Sign&lt;/code&gt; switch I prefer to sign APPX packages myself using signtool.&lt;/p&gt;
&lt;p&gt;The reason is that I can send UWP packages to testers for sideloading without requiring them to import the auto generated certificate (which is different on each (re)build).&lt;/p&gt;
&lt;p&gt;However I always forget the exact path to signtool.exe (this comes with the &lt;a href="https://developer.microsoft.com/en-us/windows/downloads/windows-10-sdk" target="_blank" rel="noopener"&gt;Windows SDK&lt;/a&gt;).&lt;/p&gt;
&lt;p&gt;The Windows 10 SDK is installed by default in &lt;code&gt;C:\Program Files (x86)\Windows Kits\10&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Signtool.exe will be in the folder&lt;code&gt;&amp;lt;sdkpath&amp;gt;\bin\&amp;lt;version&amp;gt;\&amp;lt;platform&amp;gt;\signtool.exe&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;As there are multiple version of Windows 10 there are multiple version of the SDK and you can install those concurrently.&lt;/p&gt;
&lt;p&gt;But then I found the PowerShell cmdlet &lt;a href="https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.management/resolve-path?view=powershell-3.0" target="_blank" rel="noopener"&gt;Resolve-Path&lt;/a&gt; which &amp;ldquo;Resolves the wildcard characters in a path, and displays the path contents&amp;rdquo;.&lt;/p&gt;
&lt;p&gt;This does exactly what I need:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2017/12/image-5.webp" class="glightbox" data-type="image" data-gallery="post-4204"&gt;&lt;img loading="lazy" decoding="async" style="display: inline;" title="image" src="https://remkoweijnen.nl/blog/wp-content/uploads/2017/12/image_thumb-5.webp" alt="image" width="433" height="83" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Wow, Resolve-Path is a perfect example of the many hidden gems in PowerShell!&lt;/p&gt;
&lt;p&gt;So I decided to wrap signtool.exe in a PowerShell cmdlet as PowerShell also makes it easy to locate the correct code signing certificate from the certificate store.&lt;/p&gt;</description></item><item><title>RAD Studio Tokyo 10.2(.2) Data Collection</title><link>https://remkoweijnen.nl/blog/2017/12/18/rad-studio-tokyo-10-2-2-data-collection/</link><pubDate>Mon, 18 Dec 2017 12:10:51 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2017/12/18/rad-studio-tokyo-10-2-2-data-collection/</guid><description>&lt;p&gt;Just a very quick note: I was just installing RAD Studio 10.2.2 when I noticed the installer has an Options button:&lt;/p&gt; &lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2017/12/image-2.webp" class="glightbox" data-type="image" data-gallery="post-4192"&gt;&lt;img loading="lazy" decoding="async" title="image" style="display: inline;" alt="image" src="https://remkoweijnen.nl/blog/wp-content/uploads/2017/12/image_thumb-2.webp" width="417" height="316" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;So I clicked it to see what options are available and noticed that the &amp;quot;Embarcadero Customer Experience Program&amp;quot; is opted-in by default:&lt;/p&gt;</description></item><item><title>Change NetScaler Password Hash from SHA1 to SHA512</title><link>https://remkoweijnen.nl/blog/2017/12/13/change-netscaler-password-hash-sha1-sha512/</link><pubDate>Wed, 13 Dec 2017 13:53:08 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2017/12/13/change-netscaler-password-hash-sha1-sha512/</guid><description>&lt;p&gt;This morning I wanted to install the NetScaler patch for the TLS padding vulnerability and of course I made a backup before deploying it.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Note&lt;/strong&gt;: If you haven&amp;rsquo;t installed this patch yet I would recommended to do so: see &lt;a href="https://support.citrix.com/article/CTX230238"&gt;CTX230238&lt;/a&gt; and check out the &lt;a href="https://robotattack.org/"&gt;ROBOT attack -Return Of Bleichenbacher&amp;rsquo;s Oracle Threat&lt;/a&gt; page to check which other products you may have that are vulnerable.&lt;/p&gt;
&lt;p&gt;Upon checking the backups (I always download the backup and verify that the archive is intact) I noticed that one of my NetScaler&amp;rsquo;s uses SHA1 for the password hash whilst the other one uses SHA512:&lt;/p&gt;
&lt;p id="NVylnDh"&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2017/12/image.webp" class="glightbox" data-type="image" data-gallery="post-4167"&gt;&lt;img loading="lazy" decoding="async" style="display: inline;" title="image" src="https://remkoweijnen.nl/blog/wp-content/uploads/2017/12/image_thumb.webp" alt="image" width="432" height="90" /&gt;&lt;/a&gt;&lt;/p&gt;
I thought that this was a little strange as both NetScaler's are running the exact same build. However one of them (the one that uses SHA512) was reinstalled recently whilst the one using SHA1 has been upgraded.</description></item><item><title>Get Windows 10 Version Number with PowerShell</title><link>https://remkoweijnen.nl/blog/2017/04/04/get-windows-10-version-number-powershell/</link><pubDate>Tue, 04 Apr 2017 16:54:02 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2017/04/04/get-windows-10-version-number-powershell/</guid><description>&lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2017/04/image.webp" class="glightbox" data-type="image" data-gallery="post-4133"&gt;&lt;img loading="lazy" decoding="async" style="float: right; margin: 0px 0px 0px 3px; display: inline;" title="image" src="https://remkoweijnen.nl/blog/wp-content/uploads/2017/04/image_thumb.webp" alt="image" width="119" height="103" align="right" /&gt;&lt;/a&gt;As you may heard, the API&amp;rsquo;s returning the Operating System version have &lt;a href="https://msdn.microsoft.com/windows/compatibility/operating-system-version-changes-in-windows-8-1"&gt;changed&lt;/a&gt;, started with Windows 8.1 and Server 2012 R2.&lt;/p&gt;
&lt;p&gt;The reason for this change is Application Compatibility but let&amp;rsquo;s take a little closer look into this why.&lt;/p&gt;
&lt;p&gt;As an application developer there may be a need to check the version of the OS you&amp;rsquo;re running on. A typical example is when you are using an API that only works on a specific Windows version (and up). Or the other round, you&amp;rsquo;re not supporting an older version of Windows (say Windows XP as an example).&lt;/p&gt;
&lt;p&gt;A common error in such version checks is to check for a specific Windows version but forget to take new (not yet released) versions into account.&lt;/p&gt;</description></item><item><title>Where does the Citrix Linux VDA store settings?</title><link>https://remkoweijnen.nl/blog/2017/03/23/where-does-the-citrix-linux-vda-store-settings/</link><pubDate>Thu, 23 Mar 2017 17:02:44 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2017/03/23/where-does-the-citrix-linux-vda-store-settings/</guid><description>&lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2017/03/image-21.webp" class="glightbox" data-type="image" data-gallery="post-4103"&gt;&lt;img loading="lazy" decoding="async" style="float: right; display: inline;" title="image" src="https://remkoweijnen.nl/blog/wp-content/uploads/2017/03/image_thumb-21.webp" alt="image" width="203" height="117" align="right" /&gt;&lt;/a&gt;I recently (well today really) started playing with the Citrix Linux VDA. I took Ubuntu to test because I happen to like Ubuntu.&lt;/p&gt;
&lt;p&gt;I didn&amp;rsquo;t get it to work correctly right away though and during troubleshooting I wanted to know where the VDA is storing it&amp;rsquo;s settings.&lt;/p&gt;
&lt;p&gt;I found the following file &lt;code&gt;/etc/xdl/ctx-vda.conf&lt;/code&gt;with the following contents:&lt;/p&gt;</description></item><item><title>On forbes.com, Cookies and Ads</title><link>https://remkoweijnen.nl/blog/2017/03/14/forbes-com-cookies-ads/</link><pubDate>Tue, 14 Mar 2017 16:34:52 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2017/03/14/forbes-com-cookies-ads/</guid><description>&lt;p&gt;Even though I try not to visit the forbes.com site anymore due to their heavy usages of ads, anti adblocker and overwhelming number of cookies they&amp;rsquo;re trying to push, sometimes however I accidentally follow a tweet that leads to forbes.com and just notice it to late.&lt;/p&gt;
&lt;p&gt;Besides wasting your bandwidth, mobile data and especially time there have been a few occasions were the forbes.com page was actually &lt;a href="http://www.networkworld.com/article/3021113/security/forbes-malware-ad-blocker-advertisements.html"&gt;serving malware&lt;/a&gt; from their adfeeds.&lt;/p&gt;
&lt;p&gt;It annoys me bigtime so let&amp;rsquo;s &amp;ldquo;fix&amp;rdquo; this:&lt;/p&gt;
&lt;p&gt;First thing that happens upon visiting the forbes site is that you get a blurred background with a random ad or quote of the day and you need to press &lt;code&gt;Continue to article&lt;/code&gt;:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2017/03/image-16.webp" class="glightbox" data-type="image" data-gallery="post-4074"&gt;&lt;img loading="lazy" decoding="async" style="display: inline;" title="image" src="https://remkoweijnen.nl/blog/wp-content/uploads/2017/03/image_thumb-16.webp" alt="image" width="240" height="43" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;If you open the Developer console in Chrome (Application tab) you can see that Forbes uses a cookie that expires in 24 hours. This cookie make sure that you don&amp;rsquo;t see the &amp;ldquo;welcome&amp;rdquo; ad for 24 hours:&lt;/p&gt;</description></item><item><title>Modifying a .NET Application</title><link>https://remkoweijnen.nl/blog/2017/03/14/modifying-net-application/</link><pubDate>Tue, 14 Mar 2017 15:31:03 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2017/03/14/modifying-net-application/</guid><description>&lt;p&gt;I will explain why in a seperate post, but on my MacBook Pro I wanted to use the Intel Thunderbolt driver under BootCamp instead of the ones supplied by Apple.&lt;/p&gt;
&lt;p&gt;The Thunderbolt control program however refused with the following error message:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2017/03/image-5.webp" class="glightbox" data-type="image" data-gallery="post-4061"&gt;&lt;img loading="lazy" decoding="async" style="display: inline;" title="Application Cannot Run" src="https://remkoweijnen.nl/blog/wp-content/uploads/2017/03/image_thumb-5.webp" alt="This application is not supported on Boot Camp. (Thunderbolt devices and networking will work correctly.)" width="382" height="164" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;It&amp;rsquo;s really beyond me why Intel would deliberately block their Thunderbolt software on Apple hardware (under Windows). Believing this was just a simple hardcoded hardware check rather than any hardware issue that would prevent the drivers to work I proceeded into finding where the check takes place.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;</description></item><item><title>Convert Executable to PowerShell</title><link>https://remkoweijnen.nl/blog/2017/03/13/convert-executable-powershell/</link><pubDate>Mon, 13 Mar 2017 17:25:56 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2017/03/13/convert-executable-powershell/</guid><description>&lt;p&gt;Recently I stumbled upon an executable that appeared to be a PowerShell script converted into an executable.&lt;/p&gt;
&lt;p&gt;I was curious to the actual script so I decided to have a look and see how I could convert the executable back into PowerShell.&lt;/p&gt;
&lt;p&gt;Having seen &lt;a href="http://reverseengineering.stackexchange.com/questions/34/checking-if-an-exe-is-actually-a-jar-wrapped-in-an-exe/54#54"&gt;similar techniques&lt;/a&gt; to turn vb scripts and java jar&amp;rsquo;s into executables I first looked if this particular executable was simply carrying the payload in the resource section.&lt;/p&gt;
&lt;p&gt;I opened the executable with &lt;a href="http://www.angusj.com/resourcehacker/"&gt;Resource Hacker&lt;/a&gt; and saw 2 resources (note that I am using a simple HelloWorld executable here in the screenshots). The first resource, named 1, is clearly a Unicode string with the title:&lt;/p&gt;
&lt;figure&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2017/03/image.webp" class="glightbox" data-type="image" data-gallery="post-4034"&gt;&lt;img loading="lazy" decoding="async" style="display: inline;" title="image" src="https://remkoweijnen.nl/blog/wp-content/uploads/2017/03/image_thumb.webp" alt="Resource Hacker Screenshot showing the resources" width="425" height="234" /&gt;&lt;/a&gt;&lt;figcaption&gt;Resource Hacker - HelloWorld.exe&lt;/figcaption&gt;&lt;/figure&gt;</description></item><item><title>Split a string by dollar sign ($) in PowerShell</title><link>https://remkoweijnen.nl/blog/2017/03/13/split-string-dollar-sign-powershell/</link><pubDate>Mon, 13 Mar 2017 15:28:13 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2017/03/13/split-string-dollar-sign-powershell/</guid><description>&lt;p&gt;Just a very quick post (more like a note to self) but I wanted to split a string with the $ sign in PowerShell:&lt;/p&gt;
&lt;div class="codecard"&gt;
 &lt;div class="codehead"&gt;
 &lt;span class="codefile"&gt;&lt;/span&gt;
 &lt;span class="codetools" data-pagefind-ignore&gt;
 &lt;span class="codelang"&gt;powershell&lt;/span&gt;
 &lt;button class="codebtn" type="button" data-copy&gt;Copy&lt;/button&gt;
 &lt;a class="codebtn" download=".ps1" href="data:text/plain;charset=utf-8;base64,J29uZSR0d28kdGhyZWUkZm91ciRmaXZlJyAtc3BsaXQgJyQn"&gt;Download&lt;/a&gt;
 &lt;/span&gt;
 &lt;/div&gt;
 &lt;div class="codebody"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-powershell" data-lang="powershell"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="s1"&gt;&amp;#39;one$two$three$four$five&amp;#39;&lt;/span&gt; &lt;span class="n"&gt;-split&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;$&amp;#39;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Took me a little while to realize that this doesn&amp;rsquo;t work as the &lt;a href="https://msdn.microsoft.com/en-us/powershell/reference/3.0/microsoft.powershell.core/about/about_split"&gt;split&lt;/a&gt; operator in Windows PowerShell uses a regular expression in the delimiter, rather than a simple character.&lt;/p&gt;</description></item><item><title>Google Earth fix for XenApp, RDSH &amp; Horizon</title><link>https://remkoweijnen.nl/blog/2017/02/20/google-earth-fix-xenapp-rdsh-horizon/</link><pubDate>Mon, 20 Feb 2017 20:26:51 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2017/02/20/google-earth-fix-xenapp-rdsh-horizon/</guid><description>&lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2017/02/Google_Earth_logo.webp" class="glightbox" data-type="image" data-gallery="post-4004"&gt;&lt;img loading="lazy" decoding="async" class="alignnone" style="float: right; margin: 0px 0px 0px 5px; display: inline;" title="Google Earth Logo" src="https://remkoweijnen.nl/blog/wp-content/uploads/2017/02/Google_Earth_logo_thumb.webp" alt="Google Earth Logo" width="108" height="128" align="right" /&gt;&lt;/a&gt;Both Google Earth and Google Earth Enterprise do not work correctly for multiple users on shared Hosted Shared Desktops (I still prefer to call it Server Based Computing but that&amp;rsquo;s likely because I&amp;rsquo;m an oldtimer).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Problem summary&lt;/strong&gt;&lt;br&gt;
So let&amp;rsquo;s look at the actual issue: the first user on a server is able to launch Google Earth but for any subsequent users on the same server Google Earth fails silently.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;u&gt;Problem details&lt;/u&gt;&lt;/strong&gt;&lt;br&gt;
Google Earth uses various synchronization objects such as Events and Mutexes but registers those in the &lt;strong&gt;\Global&lt;/strong&gt; namespace instead of the &lt;strong&gt;\Local&lt;/strong&gt; namespace.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;</description></item><item><title>Show Client IP Address when using NetScaler as a Reverse Proxy</title><link>https://remkoweijnen.nl/blog/2017/02/10/show-client-ip-address-when-using-netscaler-as-a-reverse-proxy/</link><pubDate>Fri, 10 Feb 2017 14:10:45 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2017/02/10/show-client-ip-address-when-using-netscaler-as-a-reverse-proxy/</guid><description>&lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2017/02/image-3.webp" class="glightbox" data-type="image" data-gallery="post-3963"&gt;&lt;img loading="lazy" decoding="async" style="float: right; display: inline;" title="Citrix NetScaler" src="https://remkoweijnen.nl/blog/wp-content/uploads/2017/02/image_thumb-3.webp" alt="Citrix NetScaler Logo" width="144" height="77" align="right" /&gt;&lt;/a&gt;Recently I switched over my blog from a hoster to a self hosted VM. In my setup I am using Citrix NetScaler as a reverse proxy.&lt;/p&gt;
&lt;p&gt;Simular to when you&amp;rsquo;re using a 3rd party reverse proxy such as &lt;a href="https://www.cloudflare.com/"&gt;CloudFlare&lt;/a&gt; you will see the IP address from the reverse proxy instead of the actual Client IP Address on your webserver.&lt;/p&gt;
&lt;p&gt;This means that your logging will all show the same, internal, IP address and that IP Based Access Rules will not work.&lt;/p&gt;
&lt;p&gt;Fortunately this is easy to solve by having NetScaler add the Client IP Address in the headers and rewriting the address on your webserver.&lt;/p&gt;</description></item><item><title>Blog improvements</title><link>https://remkoweijnen.nl/blog/2017/02/07/blog-improvements/</link><pubDate>Tue, 07 Feb 2017 15:56:21 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2017/02/07/blog-improvements/</guid><description>&lt;p&gt;When I started this blog in 2007 (wow that&amp;rsquo;s almost 10 years ago) I went for a cheap web hoster with a reasonable performance to host it.&lt;/p&gt;
&lt;p&gt;In the beginning performance was acceptable but over the years it has degraded and of course user experience standards have changed.&lt;/p&gt;
&lt;p&gt;I decided it was time to do something about it so I&amp;rsquo;ve moved the blog from a shared platform to my own server.&lt;/p&gt;
&lt;p&gt;This server is running on optimized flash storage  where most writes are DeDuplicated and never actually hits the flash disks:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2017/02/image.webp" class="glightbox" data-type="image" data-gallery="post-3764"&gt;&lt;img loading="lazy" decoding="async" style="display: inline;" title="image" src="https://remkoweijnen.nl/blog/wp-content/uploads/2017/02/image_thumb.webp" alt="image" width="418" height="94" /&gt;&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Citrix Receiver Unknown client error 1110</title><link>https://remkoweijnen.nl/blog/2017/02/07/3745/</link><pubDate>Tue, 07 Feb 2017 15:08:27 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2017/02/07/3745/</guid><description>&lt;p&gt;Citrix Receiver and StoreFront error messages are sometimes confusing or lacking details so I decided to make little blog notes about common issues when I see them. So without further ado here&amp;rsquo;s #1:&lt;/p&gt;
&lt;p&gt;In Citrix Receiver I tried to logon remotely via NetScaler Gateway and got the following error message: &amp;ldquo;&lt;em&gt;Cannot get your apps from the store&lt;/em&gt;&amp;rdquo;&lt;/p&gt;
&lt;figure&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2017/02/img_5899c6cbba7eb.webp" class="glightbox" data-type="image" data-gallery="post-3745"&gt;&lt;img loading="lazy" decoding="async" class="wp-image-3746 size-medium" src="https://remkoweijnen.nl/blog/wp-content/uploads/2017/02/img_5899c6cbba7eb-300x169.webp" alt="Cannot get your apps from the store" width="300" height="169" /&gt;&lt;/a&gt;&lt;figcaption&gt;Citrix Receiver&lt;/figcaption&gt;&lt;/figure&gt;</description></item><item><title>Enable Developer mode on VW Discover Pro with VCDS</title><link>https://remkoweijnen.nl/blog/2016/05/17/enable-developer-mode-on-vw-discover-pro-with-vcds/</link><pubDate>Tue, 17 May 2016 22:46:21 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2016/05/17/enable-developer-mode-on-vw-discover-pro-with-vcds/</guid><description>&lt;p&gt;If you try to enable "Developer mode" on the VW Discover Pro navigation with VCDS you will get the following error: "Request out of range:"&lt;/p&gt; &lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2016/05/image-5.webp" class="glightbox" data-type="image" data-gallery="post-3702"&gt;&lt;img loading="lazy" decoding="async" title="VCDS release 15.7.4" style="display: inline" alt="VCDS | Discover Pro | Adaptation | Developer Mode | Request out of range" src="https://remkoweijnen.nl/blog/wp-content/uploads/2016/05/image_thumb-5.webp" width="296" height="212" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;This happens because VCDS uses a type 0x02 (Programming) session but this adaptation needs type 0x4F (Developer) session.&lt;/p&gt;</description></item><item><title>Shodan, search engine for IoT or hackers delight?</title><link>https://remkoweijnen.nl/blog/2016/05/14/shodan-search-engine-for-iot-or-hackers-delight/</link><pubDate>Sat, 14 May 2016 15:36:22 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2016/05/14/shodan-search-engine-for-iot-or-hackers-delight/</guid><description>&lt;p&gt;Today I stumbled upon &lt;a href="https://www.shodan.io/"&gt;Shodan&lt;/a&gt;, a search engine for devices and services.&lt;/p&gt; &lt;p&gt;I decided to search for Citrix and this was the first page of results: &lt;br /&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2016/05/SNAGHTMLf942758.webp" class="glightbox" data-type="image" data-gallery="post-3688"&gt;&lt;img loading="lazy" decoding="async" title="SNAGHTMLf942758" style="display: inline" alt="SNAGHTMLf942758" src="https://remkoweijnen.nl/blog/wp-content/uploads/2016/05/SNAGHTMLf942758_thumb.webp" width="360" height="291" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;It's interesting to see that we get details such as the name of published applications. But it's possible to get even more details:&lt;/p&gt; &lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2016/05/SNAGHTMLf96a047.webp" class="glightbox" data-type="image" data-gallery="post-3688"&gt;&lt;img loading="lazy" decoding="async" title="SNAGHTMLf96a047" style="display: inline" alt="SNAGHTMLf96a047" src="https://remkoweijnen.nl/blog/wp-content/uploads/2016/05/SNAGHTMLf96a047_thumb.webp" width="344" height="235" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&amp;#160;&lt;/p&gt;</description></item><item><title>Invalid file handle when trying to delete a file</title><link>https://remkoweijnen.nl/blog/2016/05/09/invalid-file-handle-when-trying-to-delete-a-file/</link><pubDate>Mon, 09 May 2016 12:30:02 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2016/05/09/invalid-file-handle-when-trying-to-delete-a-file/</guid><description>&lt;p&gt;When I was trying to delete a folder from my local harddrive (cygwin64 in my case) I got the following error message: "&lt;em&gt;Invalid file handle.&lt;/em&gt;":&lt;/p&gt; &lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2016/05/image.webp" class="glightbox" data-type="image" data-gallery="post-3668"&gt;&lt;img loading="lazy" decoding="async" title="1 Interrupted Action" style="display: inline" alt="Invalid file handle" src="https://remkoweijnen.nl/blog/wp-content/uploads/2016/05/image_thumb.webp" width="290" height="133" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;I then attempted to delete the folder from the command prompt which failed as well with an "&lt;em&gt;Access is denied&lt;/em&gt;" error:&lt;/p&gt; &lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2016/05/image-1.webp" class="glightbox" data-type="image" data-gallery="post-3668"&gt;&lt;img loading="lazy" decoding="async" title="image" style="display: inline" alt="image" src="https://remkoweijnen.nl/blog/wp-content/uploads/2016/05/image_thumb-1.webp" width="345" height="69" /&gt;&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Citrix PVS RAM cache size Performance Counters</title><link>https://remkoweijnen.nl/blog/2016/03/30/citrix-pvs-ram-cache-size-performance-counters/</link><pubDate>Wed, 30 Mar 2016 14:58:54 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2016/03/30/citrix-pvs-ram-cache-size-performance-counters/</guid><description>&lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2016/03/clip_image002.jpg" class="glightbox" data-type="image" data-gallery="post-3655"&gt;&lt;img loading="lazy" decoding="async" title="clip_image002" style="float: right; display: inline" hspace="12" alt="clip_image002" src="https://remkoweijnen.nl/blog/wp-content/uploads/2016/03/clip_image002_thumb.jpg" width="88" align="right" height="88" /&gt;&lt;/a&gt; &lt;p&gt;There has long &lt;a href="http://andrewmorgan.ie/2015/08/accurately-checking-the-citrix-pvs-cache-in-ram-overflow-to-disk-ram-cache-size/"&gt;been a debate&lt;/a&gt; about how to accurately view the size of your Citrix Provisioning Services ram cache size. SO much so that even &lt;a href="https://www.citrix.com/blogs/2015/08/19/digging-into-pvs-with-poolmon-and-wpa/"&gt;Citrix clarified&lt;/a&gt; on how to view this detail using yet another tool &lt;/p&gt; &lt;p&gt;The thing is, this is all fine and well, but it&amp;rsquo;s a bit of a pig to actually get this data when you need it, or in an automated way. Wouldn&amp;rsquo;t it be better if we could have something easier?&lt;/p&gt; &lt;p&gt;Lately, &lt;a href="http://www.andrewmorgan.ie/"&gt;Andrew Morgan&lt;/a&gt; and I decided to sit down and create an easy to use, Windows performance counter for the key metrics in a PVS cache and provide them to the community for use.&lt;/p&gt; &lt;p&gt;These counters turned out to be fascinating, as they really show how the cache works.&lt;/p&gt; &lt;p&gt;Our latest counters (which can be downloaded below) provide the following counters for easy access:&lt;/p&gt; &lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2016/03/clip_image004.webp" class="glightbox" data-type="image" data-gallery="post-3655"&gt;&lt;img loading="lazy" decoding="async" title="PVS Ram cache size (MB) | PVS metadata size (MB) | PVS Write Cache VHD disk size (MB) | PVS Ram Cache Percent used" style="display: inline" alt="Performance Monitor" src="https://remkoweijnen.nl/blog/wp-content/uploads/2016/03/clip_image004_thumb.webp" width="411" height="325" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;ul&gt; &lt;li&gt;PVS Ram cache size (MB)&lt;/li&gt; &lt;li&gt;PVS metadata size (MB)&lt;/li&gt; &lt;li&gt;PVS Write Cache VHD disk size (MB)&lt;/li&gt; &lt;li&gt;PVS Ram Cache Percent used. &lt;em&gt;&lt;/li&gt; &lt;i&gt; &lt;br /&gt;&lt;/em&gt; As there is no accurate way to detect how much ram is assigned to cache via Citrix Provisioning services, this value must be provided or this performance counter is missing. &lt;br /&gt;&lt;/i&gt;&lt;/ul&gt;&lt;/p&gt;</description></item><item><title>Upload ovf/ova to vCloud Director with PowerShell</title><link>https://remkoweijnen.nl/blog/2015/10/14/upload-ovfova-to-vcloud-director-with-powershell/</link><pubDate>Wed, 14 Oct 2015 10:08:49 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2015/10/14/upload-ovfova-to-vcloud-director-with-powershell/</guid><description>&lt;p&gt;Recently support for NPAPI has been &lt;a href="https://support.google.com/chrome/answer/6213033?hl=en"&gt;removed&lt;/a&gt; from Google Chrome. While understandable from a security point of view it does mean that some plugins no longer work.&lt;/p&gt; &lt;p&gt;A good example is VMware's Client Integration Plugin where we've lost the ability to upload an ovf template. While VMware has published a fix for vCenter (see &lt;a href="http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&amp;amp;cmd=displayKC&amp;amp;externalId=2130672"&gt;this kb&lt;/a&gt;), it has not been fixed for vCloud Director:&lt;/p&gt; &lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2015/10/image7.webp" class="glightbox" data-type="image" data-gallery="post-3620"&gt;&lt;img loading="lazy" decoding="async" title="Browser Compatiblity Warning" style="display: inline" alt="The attempted operation cannot be performed using this browser. Re-try using an alternative method:&amp;#10;&amp;#10;- Use the VMware OVF Tool to perform the operation. You can download the OVF Tool and its User Guide from the OVF Tool product page at https://www.vmware.com/support/developer/ovf/.&amp;#10;- Use a browser and platform combination that is supported by vCloud Director for this operation. For the supported browser and platform combinations, see the Release Notes for this version of vCloud Director." src="https://remkoweijnen.nl/blog/wp-content/uploads/2015/10/image_thumb7.webp" width="326" height="204" /&gt;&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Deploy VCSA 6 to vCloud Director or vCloud Air</title><link>https://remkoweijnen.nl/blog/2015/10/05/deploy-vcsa-6-to-vcloud-director-or-vcloud-air/</link><pubDate>Mon, 05 Oct 2015 20:11:47 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2015/10/05/deploy-vcsa-6-to-vcloud-director-or-vcloud-air/</guid><description>&lt;p&gt;In versions prior to 6.0 VMware supplied the VCSA (vCenter Server Appliance) as an OVF template that could be imported directly.&lt;/p&gt; &lt;p&gt;Starting with version 6.0 the installation process has changed and now consist of an .iso file containing a custom, HTML based, installer. Vladan Seget has a nice &lt;a href="http://www.vladan.fr/install-vmware-vcsa-6-0/"&gt;blog post&lt;/a&gt; where he describes the installation.&lt;/p&gt; &lt;p&gt;This installation process is annoying, it needs a separate client (Windows) machine to run the installer on, requires the Client Integration Plugin (which doesn't appear to run well on chrome now that support for npapi/dpapi has been removed):&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2015/10/image.webp"&gt; &lt;br /&gt;&lt;img loading="lazy" decoding="async" title="Wheb prompted, allow access to the Client Integration Plugin" style="margin: 4px 0px; display: inline" alt="Please install the Client Integration Plugin 6.0 provided in the vCenter Server Appliance ISO image (requires quitting the browser)" src="https://remkoweijnen.nl/blog/wp-content/uploads/2015/10/image_thumb.webp" width="417" height="37" /&gt;&lt;/a&gt; &lt;br /&gt;But even worse is that we cannot import VCSA 6.0 in vCloud Director. Even converting the OVF inside the iso file doesn't help because vCloud directory lacks support for Deployment Options. &lt;br /&gt;&lt;/p&gt;</description></item><item><title>Update AMD Display Driver under BootCamp</title><link>https://remkoweijnen.nl/blog/2015/09/21/update-amd-display-driver-under-bootcamp/</link><pubDate>Mon, 21 Sep 2015 22:57:15 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2015/09/21/update-amd-display-driver-under-bootcamp/</guid><description>&lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2015/09/image.webp" class="glightbox" data-type="image" data-gallery="post-3586"&gt;&lt;img loading="lazy" decoding="async" style="float: right; display: inline;" title="image" src="https://remkoweijnen.nl/blog/wp-content/uploads/2015/09/image_thumb.webp" alt="image" width="240" height="141" align="right" /&gt;&lt;/a&gt;I&amp;rsquo;m using Windows 10 with &lt;a href="https://www.apple.com/support/bootcamp/"&gt;BootCamp&lt;/a&gt; on my &lt;a href="https://support.apple.com/kb/SP719?locale=en_US"&gt;MacBook Pro (Retina, 15-inch, Mid 2015&lt;/a&gt;). Overall I&amp;rsquo;m pretty happy with the hardware but Apple seems to limit functionality when running under Windows.&lt;/p&gt;
&lt;p&gt;A good example is the trackpad which simply doesn&amp;rsquo;t operate as smoothly as under Mac OSX. This isn&amp;rsquo;t because Windows is a less good Operating System, it&amp;rsquo;s simply Apple supplying drivers and support software this is less good.&lt;/p&gt;
&lt;p&gt;For the trackpad I found a good solution with &lt;a href="http://trackpad.powerplan7.com/"&gt;Trackpad++&lt;/a&gt; which enables 2, 3- and 4-finger gestures and improves scrolling.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2015/09/image1.webp" class="glightbox" data-type="image" data-gallery="post-3586"&gt;&lt;img loading="lazy" decoding="async" style="float: right; margin: 0px 0px 0px 5px; display: inline;" title="Display driver AMD driver stopped responding and has successfully recovered." src="https://remkoweijnen.nl/blog/wp-content/uploads/2015/09/image_thumb1.webp" alt="Display driver stopped responding and has recovered" width="240" height="79" align="right" /&gt;&lt;/a&gt;The AMD Display Drivers as supplied with BootCamp are instable leading to &amp;ldquo;Display driver stopped responding&amp;rdquo; messages.&lt;/p&gt;</description></item><item><title>Synchronizing Citrix ShareFile with PowerShell</title><link>https://remkoweijnen.nl/blog/2015/01/28/synchronizing-citrix-sharefile-with-powershell/</link><pubDate>Wed, 28 Jan 2015 11:39:17 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2015/01/28/synchronizing-citrix-sharefile-with-powershell/</guid><description>&lt;p&gt;&lt;a class="glightbox thickbox" href="https://remkoweijnen.nl/blog/wp-content/uploads/2015/01/ShareFileLogo.gif" data-type="image" data-gallery="post-3555"&gt;&lt;img loading="lazy" decoding="async" title="ShareFileLogo" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; float: right; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="ShareFileLogo" src="https://remkoweijnen.nl/blog/wp-content/uploads/2015/01/ShareFileLogo_thumb.gif" width="64" align="right" height="64" /&gt;&lt;/a&gt;The Citrix ShareFile Sync application is quite limited in functionality, one of those limitations is that you can only synchronize to a single (one) local folder.&lt;/p&gt; &lt;p&gt;As Helge Klein wrote in his excellent article &amp;quot;&lt;a href="https://helgeklein.com/blog/2014/01/configuring-citrix-sharefile-sync-powershell/"&gt;Configuring Citrix ShareFile Sync from PowerShell&lt;/a&gt;&amp;quot; this is simply a GUI restriction and not a restriction in the actual ShareFile sync engine.&lt;/p&gt; &lt;p&gt;Helge describes that you can easily do this in PowerShell with the following example:&lt;/p&gt; 
&lt;div class="codecard"&gt;
 &lt;div class="codehead"&gt;
 &lt;span class="codefile"&gt;Add-SyncJob example&lt;/span&gt;
 &lt;span class="codetools" data-pagefind-ignore&gt;
 &lt;span class="codelang"&gt;powershell&lt;/span&gt;
 &lt;button class="codebtn" type="button" data-copy&gt;Copy&lt;/button&gt;
 &lt;a class="codebtn" download="add-syncjob-example.ps1" href="data:text/plain;charset=utf-8;base64,QWRkLVN5bmNKb2IgLUFwcGxpY2F0aW9uSWQgMSAtQXBwbGljYXRpb25OYW1lICJQb3dlclNoZWxsIiAtQWNjb3VudCBoZWxnZWtsZWluLnNoYXJlZmlsZS5jb20KLVJlbW90ZUZvbGRlck5hbWUgImZvYzg2YzE5LWQ5MDQtNDM0YS05ZDY3LXh4eHh4eHh4eHh4eCIgLUxvY2FsRm9sZGVyUGF0aCAiRDpcRGF0ZW5cU3luYyB0byBTaGFyZUZpbGUiCi1BdXRoVHlwZSA0IC1Vc2VyTmFtZSB4eHh4eHhAaGVsZ2VrbGVpbi5jb20gLVN5bmNEaXJlY3Rpb24gMiAtUGFzc3dvcmQgIk1ZIFNIQVJFRklMRSBQQVNTV09SRCI="&gt;Download&lt;/a&gt;
 &lt;/span&gt;
 &lt;/div&gt;
 &lt;div class="codebody"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-powershell" data-lang="powershell"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nb"&gt;Add-SyncJob&lt;/span&gt; &lt;span class="n"&gt;-ApplicationId&lt;/span&gt; &lt;span class="mf"&gt;1&lt;/span&gt; &lt;span class="n"&gt;-ApplicationName&lt;/span&gt; &lt;span class="s2"&gt;&amp;#34;PowerShell&amp;#34;&lt;/span&gt; &lt;span class="n"&gt;-Account&lt;/span&gt; &lt;span class="n"&gt;helgeklein&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="py"&gt;sharefile&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="py"&gt;com&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;-RemoteFolderName&lt;/span&gt; &lt;span class="s2"&gt;&amp;#34;foc86c19-d904-434a-9d67-xxxxxxxxxxxx&amp;#34;&lt;/span&gt; &lt;span class="n"&gt;-LocalFolderPath&lt;/span&gt; &lt;span class="s2"&gt;&amp;#34;D:\Daten\Sync to ShareFile&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;-AuthType&lt;/span&gt; &lt;span class="mf"&gt;4&lt;/span&gt; &lt;span class="n"&gt;-UserName&lt;/span&gt; &lt;span class="n"&gt;xxxxxx&lt;/span&gt;&lt;span class="nv"&gt;@helgeklein&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="py"&gt;com&lt;/span&gt; &lt;span class="n"&gt;-SyncDirection&lt;/span&gt; &lt;span class="mf"&gt;2&lt;/span&gt; &lt;span class="n"&gt;-Password&lt;/span&gt; &lt;span class="s2"&gt;&amp;#34;MY SHAREFILE PASSWORD&amp;#34;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;While the command was accepted, nothing was synchronized.&lt;/p&gt;</description></item><item><title>Twitter Analytics and AdBlock Plus</title><link>https://remkoweijnen.nl/blog/2014/08/28/twitter-analytics-adblock-plus/</link><pubDate>Thu, 28 Aug 2014 13:35:47 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2014/08/28/twitter-analytics-adblock-plus/</guid><description>&lt;p&gt;Twitter has opened access to Analytics for all users. However when you use an Ad Blocker, like Adblock Plus, you'll get the following error:&lt;/p&gt; &lt;p&gt;&lt;a class="glightbox thickbox" href="https://remkoweijnen.nl/blog/wp-content/uploads/2014/08/image.webp" data-type="image" data-gallery="post-3537"&gt;&lt;img loading="lazy" decoding="async" title="Twitter Analytics" style="display: inline" alt="A problem occurred while loading the page. To use this site, you need to disable AdBlock or any other ads-blocking extension you are using, or customize it to show ads on this site" src="https://remkoweijnen.nl/blog/wp-content/uploads/2014/08/image_thumb.webp" width="420" height="63" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;For Adblock Plus you can fix this by adding a filter: go to Filter Preferences and on the &amp;quot;Custom filters&amp;quot; tab add a new filter within a filter group (or create a filter group for this rule).&lt;/p&gt; &lt;p&gt;Use this as a filter rule:&lt;/p&gt; &lt;p&gt;&lt;code&gt;@@||ads.twitter.com/stylesheets/ads-allow.css&lt;/code&gt;&lt;/p&gt; &lt;p&gt;&lt;a class="glightbox thickbox" href="https://remkoweijnen.nl/blog/wp-content/uploads/2014/08/SNAGHTMLea2974c.webp" data-type="image" data-gallery="post-3537"&gt;&lt;img loading="lazy" decoding="async" title="SNAGHTMLea2974c" style="display: inline" alt="SNAGHTMLea2974c" src="https://remkoweijnen.nl/blog/wp-content/uploads/2014/08/SNAGHTMLea2974c_thumb.webp" width="423" height="201" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;And don't forget to Enable the rule!&lt;/p&gt; &lt;p&gt;&lt;strong&gt;EDIT: &lt;/strong&gt;Twitter user &lt;a title="https://twitter.com/Ertraeglichkeit" href="https://twitter.com/Ertraeglichkeit"&gt;@Ertraeglichkeit&lt;/a&gt; mentioned a different method:&lt;/p&gt;</description></item><item><title>Handling ini files in PowerShell</title><link>https://remkoweijnen.nl/blog/2014/07/29/handling-ini-files-powershell/</link><pubDate>Tue, 29 Jul 2014 15:03:08 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2014/07/29/handling-ini-files-powershell/</guid><description>&lt;p&gt;&lt;img title="Ini File" style="float: right; margin: 0px 0px 20px; display: inline" alt="Ini File Icon" src="http://www.fileinfo.com/images/icons/files/128/ini-41.png" width="60" align="right" height="60" /&gt;This morning Aaron Parker was wondering if Hash Tables could be used to work with ini files:&lt;/p&gt; &lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2014/07/image8.webp" class="glightbox thickbox" data-type="image" data-gallery="post-3527"&gt;&lt;img loading="lazy" decoding="async" title="Aaron Parker | Twitter | @stealthpuppy" style="display: inline" alt="Aaron Parker | @stealthpuppy | @remkoweijnen @msh_dave need to see if this approach works for editing INI files" src="https://remkoweijnen.nl/blog/wp-content/uploads/2014/07/image_thumb8.webp" width="320" height="132" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;I thought it was a great idea because in Hash Tables you can use the . operator to get or set a Hash Table entry. But I wondered what to do with sections in ini files. Then I got the idea to use nested Hash Tables for that.&lt;/p&gt; &lt;p&gt;The result is two functions, one to read an ini file into a nested Hash Table and one function to write it back to an ini file.&lt;/p&gt;</description></item><item><title>Sorting a hashtable by byte value in PowerShell</title><link>https://remkoweijnen.nl/blog/2014/07/22/sorting-hashtable-byte-value-powershell/</link><pubDate>Tue, 22 Jul 2014 12:03:28 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2014/07/22/sorting-hashtable-byte-value-powershell/</guid><description>&lt;p&gt;&lt;img style="float: right; display: inline" src="https://encrypted-tbn2.gstatic.com/images?q=tbn:ANd9GcTEtkV3oLDtyNhyD55yu4uoWbX_oIrnDuJDl4NK6zC59MPNHCnynsqZ9yae" width="96" align="right" height="96" /&gt;In a PowerShell script I needed to sort a hash table by byte value (not alphabetically, lowercase parameters will be listed after uppercase ones). An example for this requirement is the &lt;a href="http://docs.aws.amazon.com/AWSECommerceService/latest/DG/rest-signature.html" target="_blank"&gt;Amazon Product Advertising API&lt;/a&gt;.&lt;/p&gt; &lt;p&gt;Consider the following hashtable as an example:&lt;/p&gt; 
&lt;div class="codecard"&gt;
 &lt;div class="codehead"&gt;
 &lt;span class="codefile"&gt;Example Hash Table&lt;/span&gt;
 &lt;span class="codetools" data-pagefind-ignore&gt;
 &lt;span class="codelang"&gt;powershell&lt;/span&gt;
 &lt;button class="codebtn" type="button" data-copy&gt;Copy&lt;/button&gt;
 &lt;a class="codebtn" download="example-hash-table.ps1" href="data:text/plain;charset=utf-8;base64,JHBhcmFtcyA9IEB7fQokcGFyYW1zLkFkZCgiQXNzb2NpYXRlVGFnIiwgImR1bW15IikKJHBhcmFtcy5BZGQoIkFXU0FjY2Vzc0tleUlkIiwgIkFLSUFJT1NGT0ROTjdFWEFNUExFIikKJHBhcmFtcy5BZGQoIklkVHlwZSIsICIwNjc5NzIyNzY5IikKJHBhcmFtcy5BZGQoIk9wZXJhdGlvbiIsICJJdGVtTG9va3VwIik="&gt;Download&lt;/a&gt;
 &lt;/span&gt;
 &lt;/div&gt;
 &lt;div class="codebody"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-powershell" data-lang="powershell"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;$params&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="vm"&gt;@&lt;/span&gt;&lt;span class="p"&gt;{}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;$params&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="py"&gt;Add&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;AssociateTag&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;&amp;#34;dummy&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;$params&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="py"&gt;Add&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;AWSAccessKeyId&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;&amp;#34;AKIAIOSFODNN7EXAMPLE&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;$params&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="py"&gt;Add&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;IdType&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;&amp;#34;0679722769&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;$params&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="py"&gt;Add&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;Operation&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;&amp;#34;ItemLookup&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;If we use the Sort-Object to order the list (note that we need to use the &lt;a href="http://technet.microsoft.com/en-us/library/ee692803.aspx" target="_blank"&gt;GetEnumerator&lt;/a&gt; method):&lt;/p&gt;
&lt;div class="codecard"&gt;
 &lt;div class="codehead"&gt;
 &lt;span class="codefile"&gt;Sort Hash Table&lt;/span&gt;
 &lt;span class="codetools" data-pagefind-ignore&gt;
 &lt;span class="codelang"&gt;powershell&lt;/span&gt;
 &lt;button class="codebtn" type="button" data-copy&gt;Copy&lt;/button&gt;
 &lt;a class="codebtn" download="sort-hash-table.ps1" href="data:text/plain;charset=utf-8;base64,JHBhcmFtcy5HZXRFbnVtZXJhdG9yKCkgfCBTb3J0LU9iamVjdCBOYW1l"&gt;Download&lt;/a&gt;
 &lt;/span&gt;
 &lt;/div&gt;
 &lt;div class="codebody"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-powershell" data-lang="powershell"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;$params&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="py"&gt;GetEnumerator&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;|&lt;/span&gt; &lt;span class="nb"&gt;Sort-Object&lt;/span&gt; &lt;span class="n"&gt;Name&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;We will get the following result:&lt;/p&gt;
&lt;div class="codecard"&gt;
 &lt;div class="codehead"&gt;
 &lt;span class="codefile"&gt;Sort Results&lt;/span&gt;
 &lt;span class="codetools" data-pagefind-ignore&gt;
 &lt;span class="codelang"&gt;powershell&lt;/span&gt;
 &lt;button class="codebtn" type="button" data-copy&gt;Copy&lt;/button&gt;
 &lt;a class="codebtn" download="sort-results.ps1" href="data:text/plain;charset=utf-8;base64,TmFtZSAgICAgICAgICAgICAgICAgICAgICAgICAgIFZhbHVlCi0tLS0gICAgICAgICAgICAgICAgICAgICAgICAgICAtLS0tLQpBc3NvY2lhdGVUYWcgICAgICAgICAgICAgICAgICAgZHVtbXkKQVdTQWNjZXNzS2V5SWQgICAgICAgICAgICAgICAgIEFLSUFJT1NGT0ROTjdFWEFNUExFCklkVHlwZSAgICAgICAgICAgICAgICAgICAgICAgICAwNjc5NzIyNzY5Ck9wZXJhdGlvbiAgICAgICAgICAgICAgICAgICAgICBJdGVtTG9va3Vw"&gt;Download&lt;/a&gt;
 &lt;/span&gt;
 &lt;/div&gt;
 &lt;div class="codebody"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-powershell" data-lang="powershell"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;Name&lt;/span&gt; &lt;span class="n"&gt;Value&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;----&lt;/span&gt; &lt;span class="p"&gt;-----&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;AssociateTag&lt;/span&gt; &lt;span class="n"&gt;dummy&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;AWSAccessKeyId&lt;/span&gt; &lt;span class="n"&gt;AKIAIOSFODNN7EXAMPLE&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;IdType&lt;/span&gt; &lt;span class="mf"&gt;0679722769&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;Operation&lt;/span&gt; &lt;span class="n"&gt;ItemLookup&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;If you use the &lt;code&gt;-CaseSensitive&lt;/code&gt; switch the resulting order will remain the same.&lt;/p&gt;</description></item><item><title>Get Actual CPU Clock Speed with PowerShell</title><link>https://remkoweijnen.nl/blog/2014/07/18/get-actual-cpu-clock-speed-powershell/</link><pubDate>Fri, 18 Jul 2014 16:29:24 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2014/07/18/get-actual-cpu-clock-speed-powershell/</guid><description>&lt;p&gt;To get the best performance out of Virtual Desktops it is essential that the power configuration in the system BIOS and the HyperVisor are configured for maximum performance.&lt;/p&gt; &lt;p&gt;Many people have blogged about the importance of these settings like, &lt;a href="http://blog.atlantiscomputing.com/2013/08/powering-vdi-performance-best-practices-for-optimal-virtual-desktop-performance/" target="_blank"&gt;Andrew Wood&lt;/a&gt;, &lt;a href="http://helgeklein.com/blog/2013/05/the-effects-of-power-savings-mode-on-vcpu-performance/" target="_blank"&gt;Helge Klein&lt;/a&gt; and &lt;a href="http://workinghardinit.wordpress.com/2011/06/20/consider-cpu-power-optimization-versus-performance-when-virtualizing/" target="_blank"&gt;Didier Van Hoye&lt;/a&gt;. So I will not go into details again.&lt;/p&gt; &lt;p&gt;But how do you check from a Virtual Machine if you are actually running at full clock speed or not?&lt;/p&gt; &lt;p&gt;I have written a PowerShell script to do just that (requires at least PowerShell v3).&lt;/p&gt; &lt;p&gt;Here are some screenshots:&lt;/p&gt; &lt;p&gt;Running with &amp;quot;High Performance profile&amp;quot;:&lt;/p&gt; &lt;p&gt;&lt;a class="glightbox thickbox" href="https://remkoweijnen.nl/blog/wp-content/uploads/2014/07/clip_image002.jpg" data-type="image" data-gallery="post-3516"&gt;&lt;img loading="lazy" decoding="async" title="Windows PowerShell" style="display: inline" alt="CPU Clock Speed with d&amp;quot;High Performanced&amp;quot; Power Profile" src="https://remkoweijnen.nl/blog/wp-content/uploads/2014/07/clip_image002_thumb.jpg" width="240" height="74" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Running with &amp;quot;Balanced&amp;quot; power profile:&lt;/p&gt; &lt;p&gt;&lt;a class="glightbox thickbox" href="https://remkoweijnen.nl/blog/wp-content/uploads/2014/07/clip_image0025.jpg" data-type="image" data-gallery="post-3516"&gt;&lt;img loading="lazy" decoding="async" title="Windows PowerShell" style="display: inline" alt="CPU Clock Speed with High Performance Balanced Profile" src="https://remkoweijnen.nl/blog/wp-content/uploads/2014/07/clip_image0025_thumb.jpg" width="240" height="74" /&gt;&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Set alert parameters with Visual Studio Authoring Extensions</title><link>https://remkoweijnen.nl/blog/2014/07/18/set-alert-parameters-visual-studio-authoring-extensions/</link><pubDate>Fri, 18 Jul 2014 16:08:33 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2014/07/18/set-alert-parameters-visual-studio-authoring-extensions/</guid><description>&lt;p&gt;&lt;img loading="lazy" decoding="async" title="SCOM Logo" alt="System Center Operations Manager Logo" src="https://remkoweijnen.nl/blog/wp-content/uploads/2014/07/image_thumb.webp" width="89" align="right" height="95" /&gt;In a SCOM Management Pack Custom Properties can be used for Alert Description and Notification as described in this &lt;a href="http://blogs.technet.com/b/kevinholman/archive/2007/12/12/adding-custom-information-to-alert-descriptions-and-notifications.aspx" target="_blank"&gt;blog&lt;/a&gt; by Kevin Holman.&lt;/p&gt; &lt;p&gt;In my case I wanted to add the Display Name and the Performance Counter Value in a Performance Threshold Monitor. In XML it would look this this:&lt;/p&gt; 
&lt;div class="codecard"&gt;
 &lt;div class="codehead"&gt;
 &lt;span class="codefile"&gt;&lt;/span&gt;
 &lt;span class="codetools" data-pagefind-ignore&gt;
 &lt;span class="codelang"&gt;xml&lt;/span&gt;
 &lt;button class="codebtn" type="button" data-copy&gt;Copy&lt;/button&gt;
 &lt;a class="codebtn" download=".xml" href="data:text/plain;charset=utf-8;base64,ICAgICAgICA8YWxlcnRzZXR0aW5ncyBhbGVydG1lc3NhZ2U9Ik1lbW9yeS5Vc2FnZS5BbGVydE1lc3NhZ2UiPgogICAgICAgICAgPGFsZXJ0b25zdGF0ZT5FcnJvcjwvYWxlcnRvbnN0YXRlPgogICAgICAgICAgPGF1dG9yZXNvbHZlPnRydWU8L2F1dG9yZXNvbHZlPgogICAgICAgICAgPGFsZXJ0cHJpb3JpdHk&amp;#43;Tm9ybWFsPC9hbGVydHByaW9yaXR5PgogICAgICAgICAgPGFsZXJ0c2V2ZXJpdHk&amp;#43;TWF0Y2hNb25pdG9ySGVhbHRoPC9hbGVydHNldmVyaXR5PgogICAgICAgICAgPGFsZXJ0cGFyYW1ldGVycz4KICAgICAgICAgICAgPGFsZXJ0cGFyYW1ldGVyMT4kVGFyZ2V0L0hvc3QvUHJvcGVydHlbVHlwZT0iU3lzdGVtIVN5c3RlbS5FbnRpdHkiXS9EaXNwbGF5TmFtZSQ8L2FsZXJ0cGFyYW1ldGVyMT4KICAgICAgICAgICAgPGFsZXJ0cGFyYW1ldGVyMj4kRGF0YS9Db250ZXh0L1ZhbHVlJDwvYWxlcnRwYXJhbWV0ZXIyPgogICAgICAgICAgPC9hbGVydHBhcmFtZXRlcnM&amp;#43;CiAgICAgICAgPC9hbGVydHNldHRpbmdzPg=="&gt;Download&lt;/a&gt;
 &lt;/span&gt;
 &lt;/div&gt;
 &lt;div class="codebody"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-xml" data-lang="xml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nt"&gt;&amp;lt;alertsettings&lt;/span&gt; &lt;span class="na"&gt;alertmessage=&lt;/span&gt;&lt;span class="s"&gt;&amp;#34;Memory.Usage.AlertMessage&amp;#34;&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nt"&gt;&amp;lt;alertonstate&amp;gt;&lt;/span&gt;Error&lt;span class="nt"&gt;&amp;lt;/alertonstate&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nt"&gt;&amp;lt;autoresolve&amp;gt;&lt;/span&gt;true&lt;span class="nt"&gt;&amp;lt;/autoresolve&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nt"&gt;&amp;lt;alertpriority&amp;gt;&lt;/span&gt;Normal&lt;span class="nt"&gt;&amp;lt;/alertpriority&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nt"&gt;&amp;lt;alertseverity&amp;gt;&lt;/span&gt;MatchMonitorHealth&lt;span class="nt"&gt;&amp;lt;/alertseverity&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nt"&gt;&amp;lt;alertparameters&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nt"&gt;&amp;lt;alertparameter1&amp;gt;&lt;/span&gt;$Target/Host/Property[Type=&amp;#34;System!System.Entity&amp;#34;]/DisplayName$&lt;span class="nt"&gt;&amp;lt;/alertparameter1&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nt"&gt;&amp;lt;alertparameter2&amp;gt;&lt;/span&gt;$Data/Context/Value$&lt;span class="nt"&gt;&amp;lt;/alertparameter2&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nt"&gt;&amp;lt;/alertparameters&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nt"&gt;&amp;lt;/alertsettings&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;But how to add these parameters when using the &lt;a href="http://www.microsoft.com/en-us/download/details.aspx?id=30169"&gt;System Center 2012 Visual Studio Authoring Extensions&lt;/a&gt;?&lt;/p&gt;</description></item><item><title>Cannot connect to iTunes Store after enabling https scanning in Sophos UTM</title><link>https://remkoweijnen.nl/blog/2014/07/16/cannot-connect-to-itunes-store-after-enabling-https-scanning-in-sophos-utm/</link><pubDate>Wed, 16 Jul 2014 18:33:25 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2014/07/16/cannot-connect-to-itunes-store-after-enabling-https-scanning-in-sophos-utm/</guid><description>&lt;p&gt;&lt;img title="Sophos UTM" style="float: right; display: inline" alt="Sophos UTM Icon" src="https://secure2.sophos.com/en-us/medialibrary/Images/Products/Icons/icon-utm.png?la=en" align="right" /&gt;I am currently implementing &lt;a href="http://www.sophos.com/en-us/products/free-tools/sophos-utm-home-edition.aspx" target="_blank"&gt;Sophos UTM&lt;/a&gt; and I quite like this solution. It is free up for home usage and can easily be installed on a hypervisor.&lt;/p&gt; &lt;p&gt;I wanted to scan encrypted traffic (ssl) as well so I activated the &amp;quot;Decrypt and scan&amp;quot; option:&lt;/p&gt; &lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2014/07/image2.webp" class="glightbox thickbox" data-type="image" data-gallery="post-3495"&gt;&lt;img loading="lazy" decoding="async" title="image" style="display: inline" alt="image" src="https://remkoweijnen.nl/blog/wp-content/uploads/2014/07/image_thumb2.webp" width="163" height="94" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;When testing this on one of my iPad's I noticed that the App Store didn't work properly anymore.&lt;/p&gt; &lt;p&gt;When I tried to update applications I got the following error: &amp;quot;&lt;strong&gt;Cannot connect to iTunes Store&lt;/strong&gt;&amp;quot;. Additionally when I searched for Apps the search would return no results.&lt;/p&gt;</description></item><item><title>non-existent schema type 'Snmp!System.SnmpVarBindsSchema' error in SCOM</title><link>https://remkoweijnen.nl/blog/2014/07/13/non-existent-schema-type-snmpsystem-snmpvarbindsschema-error-scom/</link><pubDate>Sun, 13 Jul 2014 23:50:59 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2014/07/13/non-existent-schema-type-snmpsystem-snmpvarbindsschema-error-scom/</guid><description>&lt;p&gt;&lt;img loading="lazy" decoding="async" title="SCOM Logo" alt="System Center Operations Manager Logo" src="https://remkoweijnen.nl/blog/wp-content/uploads/2014/07/image_thumb.webp" width="89" align="right" height="95" /&gt;Today I encounterd what seems to be a bug in the &lt;a href="http://www.microsoft.com/en-us/download/details.aspx?id=30169"&gt;System Center 2012 Visual Studio Authoring Extensions&lt;/a&gt;. I wanted to define a Performance Collection Rule that reads out the percentage of free memory from an SNMP device. &lt;/p&gt; &lt;p&gt;Since the device returns only the percentage of used memory I needed to use the &lt;a href="http://msdn.microsoft.com/en-us/library/jj130485.aspx" target="_blank"&gt;ComputedPerfProvider&lt;/a&gt; provider to substract the used memory percentage from 100.&lt;/p&gt; &lt;p&gt;I could of course report used memory instead of free memory but I wanted the resulst to appear in the default SCOM Performance View, which only lists Free Memory:&lt;/p&gt; &lt;p&gt;&lt;a class="glightbox thickbox" href="https://remkoweijnen.nl/blog/wp-content/uploads/2014/07/image1.webp" data-type="image" data-gallery="post-3472"&gt;&lt;img loading="lazy" decoding="async" title="SCOM Performance View" style="display: inline" alt="System Center Operations Manager | Default Performance View" src="https://remkoweijnen.nl/blog/wp-content/uploads/2014/07/image_thumb1.webp" width="240" height="109" /&gt;&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Where to find System.NetworkManagement.Monitoring.mp?</title><link>https://remkoweijnen.nl/blog/2014/07/13/where-to-find-system-networkmanagement-monitoring-mp/</link><pubDate>Sun, 13 Jul 2014 13:22:13 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2014/07/13/where-to-find-system-networkmanagement-monitoring-mp/</guid><description>&lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2014/07/image.webp" class="glightbox thickbox" data-type="image" data-gallery="post-3465"&gt;&lt;img loading="lazy" decoding="async" title="SCOM Logo" style="float: right; display: inline" alt="System Center Operations Manager Logo" src="https://remkoweijnen.nl/blog/wp-content/uploads/2014/07/image_thumb.webp" width="89" align="right" height="95" /&gt;&lt;/a&gt;I am currently working on a Management Pack for SCOM and I have studies a few examples on adding processor and memory counters. &lt;/p&gt; &lt;p&gt;These examples all reference a Management Pack named &amp;quot;System.NetworkManagement.Monitoring.mp&amp;quot; but this Management Pack is not bundled with the &lt;a href="http://www.microsoft.com/en-us/download/details.aspx?id=30169" target="_blank"&gt;System Center 2012 Visual Studio Authoring Extensions&lt;/a&gt;. &lt;/p&gt;</description></item><item><title>Error MSB4018 when building a Management Pack with Visual Studio Authoring Extensions</title><link>https://remkoweijnen.nl/blog/2014/07/08/error-msb4018-when-building-a-visual-studio-authoring-extensions/</link><pubDate>Tue, 08 Jul 2014 14:38:56 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2014/07/08/error-msb4018-when-building-a-visual-studio-authoring-extensions/</guid><description>&lt;p&gt;I am currently working on a Management Pack for System Center Operations Manager (aka SCOM). I am using the &lt;a href="http://www.microsoft.com/en-us/download/details.aspx?id=30169" target="_blank"&gt;System Center 2012 Visual Studio Authoring Extensions&lt;/a&gt; and during build of my project I suddenly got the following error: &amp;ldquo;&lt;em&gt;MSB4018: The &amp;ldquo;MergeFragments&amp;rdquo; task failed unexpectedly&lt;/em&gt;&amp;rdquo;:&lt;/p&gt;
&lt;p&gt;&lt;a class="glightbox thickbox" href="https://remkoweijnen.nl/blog/wp-content/uploads/2014/07/errorMSB4018.webp" data-type="image" data-gallery="post-3458"&gt;&lt;img loading="lazy" decoding="async" style="display: inline;" title="error MSB4018: The &amp;quot;MergeFragments&amp;quot; task failed unexpectedly." src="https://remkoweijnen.nl/blog/wp-content/uploads/2014/07/errorMSB4018_thumb.webp" alt="Visual Studio | System Center 2012 Visual Studio Authoring Extensions | C:\Program Files (x86)\MSBuild\Microsoft\VSAC\Microsoft.SystemCenter.OperationsManager.targets(234,5) | error MSB4018: The &amp;quot;MergeFragments&amp;quot; task failed unexpectedly." width="423" height="67" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I searched on this error message but wasn&amp;rsquo;t able to find anything helpful. In order to get more detailed output from MSBuild I changed the MSBuild project build output verbosity. To do this go to the Tools menu in Visual Studio and select Options. Navigate to the &amp;ldquo;Build and Run&amp;rdquo; node under &amp;ldquo;Projects and Solutions&amp;rdquo; and set both options to &amp;ldquo;Diagnostic&amp;rdquo;:&lt;/p&gt;
&lt;p&gt;&lt;a class="glightbox thickbox" href="https://remkoweijnen.nl/blog/wp-content/uploads/2014/07/VisualStudioBuildOptions.webp" data-type="image" data-gallery="post-3458"&gt;&lt;img loading="lazy" decoding="async" style="display: inline;" title="Build Options" src="https://remkoweijnen.nl/blog/wp-content/uploads/2014/07/VisualStudioBuildOptions_thumb.webp" alt="Visual Studio | Tools | Options | Projects and Solutions | Build and Run | MSBuild project build output verbosity | Diagnostic" width="411" height="238" /&gt;&lt;/a&gt;&lt;/p&gt;</description></item><item><title/><link>https://remkoweijnen.nl/blog/2014/05/09/3448/</link><pubDate>Fri, 09 May 2014 00:14:31 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2014/05/09/3448/</guid><description>&lt;p&gt;&lt;a href="http://stealthpuppy.com/"&gt;Aaron Parker&lt;/a&gt; was talking about the uninstall guid in his session “Hands off my Golden Image Redux” at Citrix Synergy.&lt;/p&gt;
&lt;p&gt;I remembered that I had written a small PowerShell script to read out the uninstall GUID from an MSI file. This way you do not need to actually install the software to determine the uninstall GUID.&lt;/p&gt;</description></item><item><title>Dumping passwords in a VMware .vmem file</title><link>https://remkoweijnen.nl/blog/2013/11/25/dumping-passwords-in-a-vmware-vmem-file/</link><pubDate>Mon, 25 Nov 2013 08:54:34 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2013/11/25/dumping-passwords-in-a-vmware-vmem-file/</guid><description>&lt;p&gt;&lt;img width="63" height="62" loading="lazy" decoding="async" title="image" alt="image" align="right" src="https://remkoweijnen.nl/blog/wp-content/uploads/2013/06/image_thumb2.webp" /&gt;&lt;a href="https://twitter.com/gentilkiwi" target="_blank"&gt;Benjamin Delpy&lt;/a&gt; the author of the well known mimikatz toolkit has released a very cool extension to WinDbg today.&lt;/p&gt; &lt;p&gt;In summary the extension can extract Windows passwords from memory dumps, hibernation files and Virtual Machine .vmem files (paging, snapshots).&lt;/p&gt; &lt;p&gt;Especially the ability to extract passwords from .vmem files was very interesting. So I decided to to test this out, so let's see how it works!&lt;/p&gt;</description></item><item><title>My presentation at E2EVC in Rome</title><link>https://remkoweijnen.nl/blog/2013/10/29/my-presentation-at-e2evc-in-rome/</link><pubDate>Tue, 29 Oct 2013 21:44:43 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2013/10/29/my-presentation-at-e2evc-in-rome/</guid><description>&lt;p&gt;&lt;a class="glightbox thickbox" href="https://remkoweijnen.nl/blog/wp-content/uploads/2013/10/image.webp" data-type="image" data-gallery="post-3409"&gt;&lt;img loading="lazy" decoding="async" style="float: right; display: inline;" title="image" alt="image" src="https://remkoweijnen.nl/blog/wp-content/uploads/2013/10/image_thumb.webp" width="159" height="124" align="right" /&gt;&lt;/a&gt;I will be presenting a session at E2EVC in Rome next weekend.&lt;/p&gt;
&lt;p&gt;Recently I published an article on my blog that shows how to &lt;a href="https://remkoweijnen.nl/blog/2013/09/24/run-a-process-when-citrix-receiver-exits/" target="_blank"&gt;run an executable of choice when the Citrix Receiver exits&lt;/a&gt;.&lt;/p&gt;</description></item><item><title>Error 1603 when installing Microsoft App-V 5.0 SP1 client</title><link>https://remkoweijnen.nl/blog/2013/10/23/error-1603-when-installing-microsoft-app-v-5-0-sp1-client/</link><pubDate>Wed, 23 Oct 2013 12:48:54 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2013/10/23/error-1603-when-installing-microsoft-app-v-5-0-sp1-client/</guid><description>&lt;p&gt;I wanted to do an unattended install of the Microsoft App-V 5.0 SP1 client.&lt;/p&gt; &lt;p&gt;I wanted to install using the MSI's instead of using the exe installer so I unpacked the MSI's from the installer as documented &lt;a href="http://blogs.technet.com/b/gladiatormsft/archive/2013/04/24/mdop-2013-embeds-app-v-msi-s-inside-of-exe-files.aspx" target="_blank"&gt;here&lt;/a&gt;.&lt;/p&gt; &lt;p&gt;The install failed however with MSI error 1603. I activated logging but that was not very helpful since it only logged &amp;quot;&lt;em&gt;MainEngineThread is returning 1603&lt;/em&gt;&amp;quot;.&lt;/p&gt;</description></item><item><title>Convert Citrix License Server VPX to OVF</title><link>https://remkoweijnen.nl/blog/2013/09/27/convert-citrix-license-server-vpx-to-ovf/</link><pubDate>Fri, 27 Sep 2013 16:41:54 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2013/09/27/convert-citrix-license-server-vpx-to-ovf/</guid><description>&lt;p&gt;I wanted to run a virtual Citrix License server in my LAB. &lt;/p&gt; &lt;p&gt;Unfortunately Citrix only provides the &lt;a href="http://www.citrix.com/downloads/licensing/license-server/license-server-vpx-version-1110.html" target="_blank"&gt;VPX License Server&lt;/a&gt; in XenServer format (.xva). If you want to run the VPX on VMware ESX or Microsoft Hyper-V you need to convert it first.&lt;/p&gt; &lt;p&gt;The option to convert a Xen Virtual Appliance to OVF format was removed in XenConvert 2.4.1. So for a conversion you need version 2.3.1.&lt;/p&gt; &lt;p&gt;Here are the direct download links:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;&lt;font color="#35383d"&gt;&lt;a href="http://downloadns.citrix.com.edgesuite.net/akdlm/5320/XenConvert_Install.exe" target="_blank"&gt;XenConvert 2.3.1 (Windows 32-bit)&lt;/a&gt;&lt;/font&gt;&lt;/li&gt; &lt;li&gt;&lt;font color="#35383d"&gt;&lt;a href="http://downloadns.citrix.com.edgesuite.net/akdlm/5322/XenConvert_Install_x64.exe" target="_blank"&gt;XenConvert 2.3.1 (Windows 64-bit)&lt;/a&gt;&lt;/font&gt;&lt;/li&gt; &lt;/ul&gt; &lt;p&gt;However when I tried to convert the downloaded VPX (Citrix_License_Server_VPX_v11.10.0_Build_12002.xva) I got the error &amp;quot;Failed to decode tar header record&amp;quot;:&lt;/p&gt; &lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2013/09/SNAGHTML490f56b6.webp" class="glightbox thickbox" data-type="image" data-gallery="post-3397"&gt;&lt;img loading="lazy" decoding="async" title="Citrix XenConvert 2.3.1" style="display: inline" alt="Failed to decode tar header record" src="https://remkoweijnen.nl/blog/wp-content/uploads/2013/09/SNAGHTML490f56b6_thumb.webp" width="400" height="275" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&amp;#160;&lt;/p&gt;</description></item><item><title>Run a Process when Citrix Receiver Exits</title><link>https://remkoweijnen.nl/blog/2013/09/24/run-a-process-when-citrix-receiver-exits/</link><pubDate>Tue, 24 Sep 2013 16:11:59 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2013/09/24/run-a-process-when-citrix-receiver-exits/</guid><description>&lt;p&gt;A while ago I was doing some research for &lt;a href="https://remkoweijnen.nl/blog/2013/08/10/magic-filter-preview/" target="_blank"&gt;Magic Filter&lt;/a&gt; when I stumbled upon something interesting within Receiver.&lt;/p&gt;
&lt;p&gt;Inside wfica32.exe is a function called &lt;em&gt;_Eng_RunExecutableOnExit. &lt;/em&gt;That name caught my interest, I&amp;rsquo;ve made it a little more readable with Ida Pro:&lt;/p&gt;</description></item><item><title>The publisher could not be verified when launching an application with RES Workspace Manager</title><link>https://remkoweijnen.nl/blog/2013/09/13/the-publisher-could-not-be-verified-when-launching-an-application-with-res-workspace-manger/</link><pubDate>Fri, 13 Sep 2013 15:35:25 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2013/09/13/the-publisher-could-not-be-verified-when-launching-an-application-with-res-workspace-manger/</guid><description>&lt;p&gt;Today I was troubleshooting a warning message that popped up when launching a network application with RES Workspace Manager:&lt;/p&gt; &lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2013/09/image.webp" class="glightbox thickbox" data-type="image" data-gallery="post-3380"&gt;&lt;img loading="lazy" decoding="async" title="Open file - Security Warning" style="display: inline" alt="The publisher could not be verified. Are you sure you want to run this software?" src="https://remkoweijnen.nl/blog/wp-content/uploads/2013/09/image_thumb.webp" width="240" height="170" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Usually this is a simple fix: add the servername (&lt;a href="file://server"&gt;file://server&lt;/a&gt;) to the Local Intranet zone:&lt;/p&gt; &lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2013/09/clip_image002.jpg" class="glightbox thickbox" data-type="image" data-gallery="post-3380"&gt;&lt;img loading="lazy" decoding="async" title="Local intranet" style="display: inline" alt="You can add and remove websites from this zone. All websites in this zone will use the zone&amp;#39;s security settings." src="https://remkoweijnen.nl/blog/wp-content/uploads/2013/09/clip_image002_thumb.jpg" width="240" height="209" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;That worked when I launched the application directly. However when launching the application with RES Workspace Manager I would still get the warning. Even stranger: when I clicked Cancel the application would still be launched.&lt;/p&gt;</description></item><item><title>RD Gateway connection fails on Windows 7</title><link>https://remkoweijnen.nl/blog/2013/08/15/rd-gateway-connection-fails-on-windows-7/</link><pubDate>Thu, 15 Aug 2013 11:27:15 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2013/08/15/rd-gateway-connection-fails-on-windows-7/</guid><description>&lt;p&gt;I needed to connect remotely via Remote Desktop to a Windows Server 2012 machine.&lt;/p&gt;
&lt;p&gt;I received an rdp file that was configured to use an RD Gateway server:&lt;/p&gt;
&lt;p&gt;&lt;a class="glightbox thickbox" href="https://remkoweijnen.nl/blog/wp-content/uploads/2013/08/SNAGHTML243e76.webp" data-type="image" data-gallery="post-3363"&gt;&lt;img loading="lazy" decoding="async" style="display: inline;" title="RD Gateway Server Settings" alt="Remtoe Desktop Connection | RD Gateway Server Settings" src="https://remkoweijnen.nl/blog/wp-content/uploads/2013/08/SNAGHTML243e76_thumb.webp" width="213" height="240" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;However when trying to connect from my Windows 7 laptop (x64) machine, I got the following error message:&lt;/p&gt;
&lt;p&gt;&lt;a class="glightbox thickbox" href="https://remkoweijnen.nl/blog/wp-content/uploads/2013/08/SNAGHTML2c46b0.webp" data-type="image" data-gallery="post-3363"&gt;&lt;img loading="lazy" decoding="async" style="display: inline;" title="Remote Desktop Connection" alt="The two computers couldn't connect in the amount of time allocated. Try connecting again. If the problem continues, contact your network administrator or technical support." src="https://remkoweijnen.nl/blog/wp-content/uploads/2013/08/SNAGHTML2c46b0_thumb.webp" width="294" height="87" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;</description></item><item><title>Magic Filter Preview</title><link>https://remkoweijnen.nl/blog/2013/08/10/magic-filter-preview/</link><pubDate>Sat, 10 Aug 2013 16:34:26 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2013/08/10/magic-filter-preview/</guid><description>&lt;p&gt;In Enterprise environments users are often working on a remote (virtual) desktop such as when using SBC or VDI.&lt;/p&gt; &lt;p&gt;They typically get a full screen session, perhaps on a thin client, and have not idea that they are using a remote desktop.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;&lt;u&gt;The Problem&lt;/u&gt;&lt;/strong&gt; &lt;br /&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2013/08/image10.webp" class="glightbox thickbox" data-type="image" data-gallery="post-3338"&gt;&lt;img loading="lazy" decoding="async" title="image" style="float: right; display: inline" alt="image" align="right" src="https://remkoweijnen.nl/blog/wp-content/uploads/2013/08/image_thumb8.webp" width="136" height="73" /&gt;&lt;/a&gt;However when they press Ctrl-Alt-Delete they get either the local Security Attention Screen / Task Manager or nothing at all if it has been blocked.&lt;/p&gt; &lt;p&gt;Clever users know they can use alternative key combinations such as &lt;em&gt;Shift-F2&lt;/em&gt; for Citrix or &lt;em&gt;Ctrl-Alt-End&lt;/em&gt; for RDS.&lt;/p&gt; &lt;p&gt;But that's not the seamless experience we want to give our users, is it?&lt;/p&gt;</description></item><item><title>PNAgent Icon Data Algorithm</title><link>https://remkoweijnen.nl/blog/2013/08/08/pnagent-icon-data-algorithm/</link><pubDate>Thu, 08 Aug 2013 17:34:05 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2013/08/08/pnagent-icon-data-algorithm/</guid><description>&lt;p&gt;Some time ago I wrote about the &lt;a href="https://remkoweijnen.nl/blog/2012/02/13/scripting-citrix-online-plugin-settings/" target="_blank"&gt;PNAgent data&lt;/a&gt; that is stored in the registry in XML format.&lt;/p&gt;
&lt;p&gt;After that post &lt;a href="http://andrewmorgan.ie/" target="_blank"&gt;Andrew Morgan&lt;/a&gt; asked me if I could extract the PNAgent icons from the XML data.&lt;/p&gt;
&lt;p&gt;That got me interested so let&amp;rsquo;s look at this data!&lt;/p&gt;
&lt;p&gt;If you look at XML from PNAgent the icondata as in the AppData.Details.Icon node you&amp;rsquo;ll see something like this:&lt;/p&gt;
&lt;p&gt;&lt;a class="glightbox thickbox" href="https://remkoweijnen.nl/blog/wp-content/uploads/2013/08/image5.webp" data-type="image" data-gallery="post-3330"&gt;&lt;img loading="lazy" decoding="async" style="display: inline;" title="image" alt="image" src="https://remkoweijnen.nl/blog/wp-content/uploads/2013/08/image_thumb3.webp" width="408" height="369" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Seems like the icon data is stored/encrypted in a proprietary format.&lt;/p&gt;</description></item><item><title>ClickOnce Applications in Enterprise Environments</title><link>https://remkoweijnen.nl/blog/2013/08/05/clickonce-applications-in-enterprise-environments/</link><pubDate>Mon, 05 Aug 2013 16:51:21 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2013/08/05/clickonce-applications-in-enterprise-environments/</guid><description>&lt;p&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/t71a733d.aspx" target="_blank"&gt;ClickOnce&lt;/a&gt; is a Microsoft technology that enables an end user to install an application from the web without administrative permissions.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;&lt;u&gt;That's great isn't it? &lt;br /&gt;&lt;/u&gt;&lt;/strong&gt;While ClickOnce may sound great to developers it's actually a nightmare for Enterprise administrators because they try to prevent users from installing software themselves.&lt;/p&gt; &lt;p&gt;ClickOnce also incorporates an Automatic Updates mechanism which means that users might run different or not tested/approved versions...&lt;/p&gt; &lt;p&gt;&lt;strong&gt;&lt;u&gt;Virtual Environments &lt;br /&gt;&lt;/u&gt;&lt;/strong&gt;It get's even worse in virtual environments such as VDI and SBC where machines are often non-persistent. Each time the users starts the application they will see a screen similar to the one below while they actually download and install it over and over again:&lt;/p&gt; &lt;p&gt;&lt;a class="glightbox thickbox" href="https://remkoweijnen.nl/blog/wp-content/uploads/2013/08/SNAGHTML87937a.webp" data-type="image" data-gallery="post-3308"&gt;&lt;img loading="lazy" decoding="async" title="SNAGHTML87937a" style="margin: 0px; display: inline" alt="SNAGHTML87937a" src="https://remkoweijnen.nl/blog/wp-content/uploads/2013/08/SNAGHTML87937a_thumb.webp" width="240" height="136" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;If the environment is persistent, it's not guaranteed that the user works on the same machine each day. This means that the application will be installed on every box the user ever logs onto...&lt;/p&gt; &lt;p&gt;&lt;strong&gt;&lt;u&gt;How does it work? &lt;br /&gt;&lt;/u&gt;&lt;/strong&gt;In order to understand how we can best treat ClickOnce applications we need to understand how they work since MSDN documentation does not describe this in detail. &lt;/p&gt;</description></item><item><title>Debugging Tools for Windows Direct Download</title><link>https://remkoweijnen.nl/blog/2013/06/13/debugging-tools-for-windows-direct-download/</link><pubDate>Thu, 13 Jun 2013 15:57:38 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2013/06/13/debugging-tools-for-windows-direct-download/</guid><description>&lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2013/06/image2.webp" class="glightbox thickbox" data-type="image" data-gallery="post-3297"&gt;&lt;img loading="lazy" decoding="async" title="image" style="float: right; display: inline" alt="image" align="right" src="https://remkoweijnen.nl/blog/wp-content/uploads/2013/06/image_thumb2.webp" width="63" height="62" /&gt;&lt;/a&gt;Since some time Microsoft no longer offers the Debugging Tools for Windows as a standalone download.&lt;/p&gt; &lt;p&gt;You need to download the SDK installer and download from there.&lt;/p&gt; &lt;p&gt;This sort of annoys me since I sometimes need to install WinDBG quickly for some troubleshooting.&lt;/p&gt;</description></item><item><title>HDMI Output in Black &amp; White</title><link>https://remkoweijnen.nl/blog/2013/06/05/hdmi-output-in-black-white/</link><pubDate>Wed, 05 Jun 2013 21:50:37 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2013/06/05/hdmi-output-in-black-white/</guid><description>&lt;p&gt;&lt;a class="glightbox thickbox" href="https://remkoweijnen.nl/blog/wp-content/uploads/2013/06/image.webp" data-type="image" data-gallery="post-3294"&gt;&lt;img loading="lazy" decoding="async" title="image" style="float: right; display: inline" alt="image" align="right" src="https://remkoweijnen.nl/blog/wp-content/uploads/2013/06/image_thumb.webp" width="93" height="68" /&gt;&lt;/a&gt;I connected my Dell laptop to my TV via HDMI and the picture on the TV was in Gray scale instead of Color.&lt;/p&gt; &lt;p&gt;I had connected my laptop before and it worked fine so I knew that my TV and the HDMI cable were working correctly. I had recently updated the drivers for my NVIDIA graphics card so I went into the NVIDA Control Panel.&lt;/p&gt;</description></item><item><title>Redirect Registry by Modifying .NET Executable</title><link>https://remkoweijnen.nl/blog/2013/05/30/redirect-registry-by-modifying-net-executable/</link><pubDate>Thu, 30 May 2013 16:18:23 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2013/05/30/redirect-registry-by-modifying-net-executable/</guid><description>&lt;p&gt;Yesterday I was troubleshooting an application that was migrated to Citrix XenApp. &lt;/p&gt; &lt;p&gt;The application is able to use a high precision scale which is attached to the client pc's com port. This com port is redirected to XenApp.&lt;/p&gt; &lt;p&gt;While testing users reported several issues, let's have a look at them.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;&lt;u&gt;Error configuring COM Port&lt;/u&gt;&lt;/strong&gt; &lt;br /&gt;Within the application the comport to which the scale is connected must be configured:&lt;/p&gt; &lt;p&gt;&lt;a class="glightbox thickbox" href="https://remkoweijnen.nl/blog/wp-content/uploads/2013/05/image3.webp" data-type="image" data-gallery="post-3284"&gt;&lt;img loading="lazy" decoding="async" style="display: inline" title="Compoort instellen" alt="De compoort lezer staat uit" src="https://remkoweijnen.nl/blog/wp-content/uploads/2013/05/image_thumb3.webp" width="240" height="95" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;After pressing &amp;quot;Registreer&amp;quot; to register the new com port the following error message was shown&lt;/p&gt; &lt;p&gt;&lt;a class="glightbox thickbox" href="https://remkoweijnen.nl/blog/wp-content/uploads/2013/05/image4.webp" data-type="image" data-gallery="post-3284"&gt;&lt;img loading="lazy" decoding="async" style="display: inline" title="Fout" alt="Er staat geen compoort in het register. Registreer eerste de juiste compoort" src="https://remkoweijnen.nl/blog/wp-content/uploads/2013/05/image_thumb4.webp" width="240" height="58" /&gt;&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Application Compatibility Fixing to the Extreme?</title><link>https://remkoweijnen.nl/blog/2013/05/23/application-compatibility-fixing-to-the-extreme/</link><pubDate>Thu, 23 May 2013 16:48:36 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2013/05/23/application-compatibility-fixing-to-the-extreme/</guid><description>&lt;p&gt;Today's blog is about an application that was migrated to Citrix XenApp. During testing the users reported that several application menu's were missing.&lt;/p&gt; &lt;p&gt;An example is the settings menu where the System tab is missing:&lt;/p&gt; &lt;table border="0" cellspacing="0" cellpadding="2" width="400"&gt;&lt;tbody&gt; &lt;tr&gt; &lt;td valign="top" width="200"&gt;&lt;strong&gt;Fat Client:&lt;/strong&gt;&lt;/td&gt; &lt;td valign="top" width="200"&gt;&lt;strong&gt;XenApp:&lt;/strong&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td valign="top" width="200"&gt;&lt;a class="glightbox thickbox" href="https://remkoweijnen.nl/blog/wp-content/uploads/2013/05/clip_image0025.jpg" data-type="image" data-gallery="post-3256"&gt;&lt;img loading="lazy" decoding="async" style="display: inline" title="clip_image002[5]" alt="clip_image002[5]" src="https://remkoweijnen.nl/blog/wp-content/uploads/2013/05/clip_image0025_thumb.jpg" width="197" height="159" /&gt;&lt;/a&gt;&lt;/td&gt; &lt;td valign="top" width="200"&gt;&lt;a class="glightbox thickbox" href="https://remkoweijnen.nl/blog/wp-content/uploads/2013/05/clip_image002.jpg" data-type="image" data-gallery="post-3256"&gt;&lt;img loading="lazy" decoding="async" style="display: inline" title="clip_image002" alt="clip_image002" src="https://remkoweijnen.nl/blog/wp-content/uploads/2013/05/clip_image002_thumb.jpg" width="206" height="165" /&gt;&lt;/a&gt;&lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt; &lt;p&gt;I suspected a permissions issue so I added the account to the Local Administrator group to verify that. And indeed the System tab was visible.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;&lt;u&gt;Process Monitor&lt;/u&gt;&lt;/strong&gt; &lt;br /&gt;I removed the account from the Administrators group and fired up &lt;a href="http://technet.microsoft.com/en-us/sysinternals/bb896645.aspx" target="_blank"&gt;Process Monitor&lt;/a&gt;. I set a filter on the process name (ra60.exe) and on Result (ACCESS DENIED):&lt;/p&gt; &lt;p&gt;&lt;a class="glightbox thickbox" href="https://remkoweijnen.nl/blog/wp-content/uploads/2013/05/SNAGHTML1b3aa033.webp" data-type="image" data-gallery="post-3256"&gt;&lt;img loading="lazy" decoding="async" style="display: inline" title="SNAGHTML1b3aa033" alt="SNAGHTML1b3aa033" src="https://remkoweijnen.nl/blog/wp-content/uploads/2013/05/SNAGHTML1b3aa033_thumb.webp" width="240" height="150" /&gt;&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Programmatically set Excel LinkedCell property with VBA</title><link>https://remkoweijnen.nl/blog/2013/05/22/programmatically-set-excel-linkedcell-property-with-vba/</link><pubDate>Wed, 22 May 2013 11:36:48 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2013/05/22/programmatically-set-excel-linkedcell-property-with-vba/</guid><description>&lt;p&gt;Yesterday I was working with an Excel document that contained Combobox form controls.&lt;/p&gt; &lt;p&gt;I wanted to count the number of cells containing a particular value using the &lt;a href="http://office.microsoft.com/en-001/excel-help/countif-function-HP010342346.aspx" target="_blank"&gt;COUNTIF&lt;/a&gt; formula. However the count returned 0 because the LinkedCell property of the Combobox was not set to the Cell that contained the Combobox.&lt;/p&gt; &lt;p&gt;To set the LinkedCell Ctrl-Click the Combobox to select it, right-click and select Format Control. Then set the correct Cell in the Cell link field:&lt;/p&gt; &lt;p&gt;&lt;a class="glightbox thickbox" href="https://remkoweijnen.nl/blog/wp-content/uploads/2013/05/SNAGHTML18f5a4ba.webp" data-type="image" data-gallery="post-3229"&gt;&lt;img loading="lazy" decoding="async" style="display: inline" title="SNAGHTML18f5a4ba" alt="SNAGHTML18f5a4ba" src="https://remkoweijnen.nl/blog/wp-content/uploads/2013/05/SNAGHTML18f5a4ba_thumb.webp" width="240" height="226" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;My sheet contained about 150 Comboboxes, so obviously I was going to do this using a script. I couldn't find anything useful with Google so I wrote my own Macro.&lt;/p&gt;</description></item><item><title>Timestamp column in iOS SQLite database</title><link>https://remkoweijnen.nl/blog/2013/04/14/timestamp-column-in-ios-sqlite-database/</link><pubDate>Sun, 14 Apr 2013 15:59:45 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2013/04/14/timestamp-column-in-ios-sqlite-database/</guid><description>&lt;p&gt;I was researching a database from an iOS app called &amp;lt;appname&amp;gt;.sqlite. From the filename it was obvious that we were dealing with an SQLite database.&lt;/p&gt; &lt;p&gt;I opened the database with &lt;a href="http://sqlitebrowser.sourceforge.net/" target="_blank"&gt;SQLite Database Browser&lt;/a&gt; and the table I looked at has datetime values which are expressed in the TIMESTAMP data format in SQLite:&lt;/p&gt; &lt;p&gt;&lt;a class="glightbox thickbox" href="https://remkoweijnen.nl/blog/wp-content/uploads/2013/04/SNAGHTMLb5e026b.webp" data-type="image" data-gallery="post-3221"&gt;&lt;img loading="lazy" decoding="async" style="display: inline" title="SNAGHTMLb5e026b" alt="SNAGHTMLb5e026b" src="https://remkoweijnen.nl/blog/wp-content/uploads/2013/04/SNAGHTMLb5e026b_thumb.webp" width="412" height="316" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;SQLite documentation indicates that the TIMESTAMP format is based on unix time: the number of seconds elapsed since 01-01-1970 in UTC time.&lt;/p&gt;</description></item><item><title>Activate XDS with VCDS on Passat B7</title><link>https://remkoweijnen.nl/blog/2013/04/14/activate-xds-with-vcds-on-passat-b7/</link><pubDate>Sun, 14 Apr 2013 14:47:02 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2013/04/14/activate-xds-with-vcds-on-passat-b7/</guid><description>&lt;p&gt;&lt;img style="margin: 0px 0px 0px 5px; display: inline; float: right" alt="XDS" align="right" src="http://www.volkswagen.co.uk/assets/content/technology/hero_xds.jpg" width="163" height="68" /&gt;XDS is an electronic differential lock, which was developed for the Golf GTI. But later on it was introduced as an option for other cars.&lt;/p&gt; &lt;p&gt;XDS is an advanced electronic differential lock, linked to the ESP system. &lt;/p&gt; &lt;p&gt;In moments of fast cornering XDS gives out exactly the right amount of power, providing pressure on the inside wheel to prevent wheel spinning. The result is better traction and a reduction of any tendency to under steer.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;&lt;u&gt;Golf mk6 &lt;br /&gt;&lt;/u&gt;&lt;/strong&gt;On the Golf mk 6 it's possible to activate XDS with VCDS by going to control module 03, ABS Brakes, then 10, Adaptation.&lt;/p&gt; &lt;p&gt;Channel 36 controls XDS which can be set to:&lt;/p&gt; &lt;p&gt;0 - default &lt;br /&gt;1 - weak &lt;br /&gt;2 - strong&lt;/p&gt; &lt;p&gt;&lt;strong&gt;&lt;u&gt;Skoda Octavia II&lt;/u&gt;&lt;/strong&gt; &lt;br /&gt;It's also possible on other cars, for instance the Skoda Octavia II where it can be coded in module 03, ABS Brakes, 07 Long Coding, Byte 17, Bit 3.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;&lt;u&gt;Passat B7&lt;/u&gt;&lt;/strong&gt; &lt;br /&gt;I wanted to know how to activate this on a Passat B7, but searching with google returned nothing.&lt;/p&gt;</description></item><item><title>Decrypting Dell vWorkspace .pit files</title><link>https://remkoweijnen.nl/blog/2013/04/08/decrypting-dell-vworkspace-pit-files/</link><pubDate>Mon, 08 Apr 2013 11:53:32 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2013/04/08/decrypting-dell-vworkspace-pit-files/</guid><description>&lt;p&gt;The Dell vWorkspace (previously Quest vWorkspace) Client can save a connection to a .pit file which is very similar to an .rdp file with one big difference: it is encrypted!&lt;/p&gt; &lt;p&gt;I am not sure why Dell/Quest have chosen to encrypt their files but a while ago I needed to know what was in a particular pit file so I could troubleshoot an issue.&lt;/p&gt; &lt;p&gt;I first created a test .pit file with the client (pntsc.exe version 7.6.305.791).&lt;/p&gt; &lt;p&gt;&lt;a class="glightbox thickbox" href="https://remkoweijnen.nl/blog/wp-content/uploads/2013/03/SNAGHTML6c0786d.webp" data-type="image" data-gallery="post-3171"&gt;&lt;img loading="lazy" decoding="async" style="display: inline" title="SNAGHTML6c0786d" alt="SNAGHTML6c0786d" src="https://remkoweijnen.nl/blog/wp-content/uploads/2013/03/SNAGHTML6c0786d_thumb.webp" width="200" height="240" /&gt;&lt;/a&gt;&lt;/p&gt;</description></item><item><title>RC4 Encryption in PowerShell</title><link>https://remkoweijnen.nl/blog/2013/04/05/rc4-encryption-in-powershell/</link><pubDate>Fri, 05 Apr 2013 16:27:32 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2013/04/05/rc4-encryption-in-powershell/</guid><description>&lt;p&gt;For an upcoming blog post I needed to decrypt some data using the &lt;a href="http://en.wikipedia.org/wiki/RC4" target="_blank"&gt;rc4 algorithm&lt;/a&gt;. I wanted to do this with PowerShell but sadly PowerShell and the .NET framework have no functions for it.&lt;/p&gt; &lt;p&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px; padding-top: 0px" border="0" alt="File:RC4.svg" src="http://upload.wikimedia.org/wikipedia/commons/thumb/e/e9/RC4.svg/800px-RC4.svg.png" width="299" height="134" /&gt;&lt;/p&gt; &lt;p&gt;So I needed to implement it (download at the bottom of the post):&lt;/p&gt;</description></item><item><title>Convert Bin to Hex and Hex to Bin in PowerShell</title><link>https://remkoweijnen.nl/blog/2013/04/05/convert-bin-to-hex-and-hex-to-bin-in-powershell/</link><pubDate>Fri, 05 Apr 2013 11:17:24 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2013/04/05/convert-bin-to-hex-and-hex-to-bin-in-powershell/</guid><description>&lt;p&gt;For an upcoming Blog post I needed to convert a Byte Array to a Hex string in PowerShell and vice versa.&lt;/p&gt; &lt;p&gt;PowerShell doesn't come with HexToBin or BinToHex functions so here's my attempt at it:&lt;/p&gt;</description></item><item><title>Scriptable Citrix Password Encoder</title><link>https://remkoweijnen.nl/blog/2013/03/19/scriptable-citrix-password-encoder/</link><pubDate>Tue, 19 Mar 2013 16:27:49 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2013/03/19/scriptable-citrix-password-encoder/</guid><description>&lt;p&gt;A while ago I &lt;a href="https://remkoweijnen.nl/blog/2012/05/13/encoding-and-decoding-citrix-passwords/"&gt;published&lt;/a&gt; a tool to Encode and Decode Citrix passwords. Today I am publishing a small update to this tool that makes it scriptable by adding a &lt;a href="http://en.wikipedia.org/wiki/Component_Object_Model" target="_blank"&gt;COM interface&lt;/a&gt;.&lt;/p&gt; &lt;p&gt;If you start the tool without parameters you will get the GUI, just like before:&lt;/p&gt; &lt;p&gt;&lt;img loading="lazy" decoding="async" title="Citrix Password Hasher by Remko Weijnen" alt="Encrypt | Decrypt Password | Hash | Citrix | Ctx1" src="https://remkoweijnen.nl/blog/wp-content/uploads/2012/05/image_thumb3.webp" width="419" height="84" /&gt;&lt;/p&gt; &lt;p&gt;To use the COM interface you first need to register the executable with the /regserver switch:&lt;/p&gt; &lt;p&gt;&lt;a class="glightbox thickbox" href="https://remkoweijnen.nl/blog/wp-content/uploads/2013/03/SNAGHTML185eb4ec.webp" data-type="image" data-gallery="post-3152"&gt;&lt;img loading="lazy" decoding="async" style="display: inline" title="Register CtxPass" alt="CtxPass /RegServer" src="https://remkoweijnen.nl/blog/wp-content/uploads/2013/03/SNAGHTML185eb4ec_thumb.webp" width="414" height="64" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;After the registration you can call it using any language that supports COM. To get you started I wrote a few examples&lt;/p&gt;</description></item><item><title>Java has discovered application components that could indicate a security concern</title><link>https://remkoweijnen.nl/blog/2013/03/19/java-has-discovered-application-components-that-could-indicate-a-security-concern/</link><pubDate>Tue, 19 Mar 2013 13:13:04 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2013/03/19/java-has-discovered-application-components-that-could-indicate-a-security-concern/</guid><description>&lt;p&gt;When starting a particular web based application Java popped up the following dialog:&lt;/p&gt;
&lt;p&gt;&lt;a class="glightbox thickbox" href="https://remkoweijnen.nl/blog/wp-content/uploads/2013/03/image1211.webp" data-type="image" data-gallery="post-3136"&gt;&lt;img loading="lazy" decoding="async" style="display: inline;" title="Warning - Security" alt="Java has discovered application components that could indicate a security concern" src="https://remkoweijnen.nl/blog/wp-content/uploads/2013/03/image12_thumb.webp" width="240" height="124" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The dialog asks us if we want to Block potentially unsafe components so to continue we should click no. However users tend to not really read such messages and click Yes which leads to this error:&lt;/p&gt;
&lt;p&gt;&lt;a class="glightbox thickbox" href="https://remkoweijnen.nl/blog/wp-content/uploads/2013/03/image26.webp" data-type="image" data-gallery="post-3136"&gt;&lt;img loading="lazy" decoding="async" style="display: inline;" title="Connection Error" alt="Error connecting to Central Configuration" src="https://remkoweijnen.nl/blog/wp-content/uploads/2013/03/image_thumb26.webp" width="240" height="102" /&gt;&lt;/a&gt;&lt;/p&gt;</description></item><item><title>MSCOMM32.OCX returns error 80040112</title><link>https://remkoweijnen.nl/blog/2013/03/13/mscomm32-ocx-returns-error-80040112/</link><pubDate>Wed, 13 Mar 2013 15:58:39 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2013/03/13/mscomm32-ocx-returns-error-80040112/</guid><description>&lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/2013/03/11/the-case-of-the-com-port-redirection/"&gt;Yesterday&lt;/a&gt; I wrote about troubleshooting an application that used Com Port redirection in Citrix.&lt;/p&gt; &lt;p&gt;During the troubleshoot I noticed that the application used an ActiveX component, MSCOMM32.OCX, for serial communication.&lt;/p&gt; &lt;p&gt;I wanted to quickly test if the component was correctly registered so I searched the registry from HKEY_CLASSES_ROOT for mscomm32.ocx.&lt;/p&gt;</description></item><item><title>Returning a string from unmanaged dll to .net</title><link>https://remkoweijnen.nl/blog/2013/03/13/returning-a-string-from-unmanaged-dll-to-net/</link><pubDate>Wed, 13 Mar 2013 10:01:31 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2013/03/13/returning-a-string-from-unmanaged-dll-to-net/</guid><description>&lt;p&gt;&lt;img style="display: inline; float: right;" src="http://www.vbmigration.com/images/Whitepapers/DllFile.png" width="88" height="88" align="right" /&gt;I write most of my code in unmanaged languages such as Delphi and C/C++. Sometimes customers ask me to interface my code to their .net code in which case I create a dll for them.&lt;/p&gt;
&lt;p&gt;A recurring thing is that I need to return string to .net.&lt;/p&gt;
&lt;p&gt;There are many ways to do this of course but in all cases we need to manage memory: who will allocate the memory for the string and who is responsible for freeing it?&lt;/p&gt;</description></item><item><title>The case of the COM Port Redirection</title><link>https://remkoweijnen.nl/blog/2013/03/11/the-case-of-the-com-port-redirection/</link><pubDate>Mon, 11 Mar 2013 14:53:44 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2013/03/11/the-case-of-the-com-port-redirection/</guid><description>&lt;p&gt;&lt;a class="glightbox thickbox" href="https://remkoweijnen.nl/blog/wp-content/uploads/2013/03/image.webp" data-type="image" data-gallery="post-3079"&gt;&lt;img loading="lazy" decoding="async" style="display: inline; float: right" title="Secutest" alt="Secutest" align="right" src="https://remkoweijnen.nl/blog/wp-content/uploads/2013/03/image_thumb.webp" width="128" height="122" /&gt;&lt;/a&gt;One of my colleagues asked me to assist in troubleshooting an application called SmartWare FM running on Citrix XenApp. &lt;/p&gt; &lt;p&gt;This application reads data from an external device called SECUTEST.&lt;/p&gt; &lt;p&gt;The device is connected to a COM port which is redirected to the XenApp session. In contrast to Microsoft Remote Desktop Services COM ports are not automatically redirected in XenApp but need to be mapped via eg a logonscript (NET USE COM1: \\Client\COM1:) or using UEM.&lt;/p&gt; &lt;p&gt;In my case the COM port was mapped with RES Workspace Manager:&lt;/p&gt; &lt;p&gt;&lt;a class="glightbox thickbox" href="https://remkoweijnen.nl/blog/wp-content/uploads/2013/03/image1.webp" data-type="image" data-gallery="post-3079"&gt;&lt;img loading="lazy" decoding="async" style="display: inline" title="image" alt="image" src="https://remkoweijnen.nl/blog/wp-content/uploads/2013/03/image_thumb1.webp" width="371" height="119" /&gt;&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Cannot create shell notification icon error during unattended install</title><link>https://remkoweijnen.nl/blog/2013/02/19/cannot-create-shell-notification-icon-error-during-unattended-install/</link><pubDate>Tue, 19 Feb 2013 15:52:33 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2013/02/19/cannot-create-shell-notification-icon-error-during-unattended-install/</guid><description>&lt;p&gt;I was troubleshooting an unattended installation of a particular application. The install seemed to hang right away so I figured it was presenting some kind of message (error?).&lt;/p&gt; &lt;p&gt;Using a Window Spy tool I made the setup process visible and saw the following message:&lt;/p&gt; &lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2013/02/image.webp" class="glightbox thickbox" data-type="image" data-gallery="post-3034"&gt;&lt;img loading="lazy" decoding="async" style="display: inline" title="image" alt="image" src="https://remkoweijnen.nl/blog/wp-content/uploads/2013/02/image_thumb.webp" width="240" height="103" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;The unattended install was supplied by the vendor and apparently they use InstallAware.&lt;/p&gt; &lt;p&gt;The setup tries to create a Tray Icon, probably a setup progress indicator, but this fails because there is no shell running (the installation is pushed from a deployment server).&lt;/p&gt;</description></item><item><title>The case of the missing audio</title><link>https://remkoweijnen.nl/blog/2013/01/25/the-case-of-the-missing-audio/</link><pubDate>Fri, 25 Jan 2013 16:07:06 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2013/01/25/the-case-of-the-missing-audio/</guid><description>&lt;p&gt;Yesterday I was asked to investigate a problem with a presentation pc. Even though the volume was set maximal there was not audio output.&lt;/p&gt; &lt;p&gt;The machine was used to connect to a Citrix XenApp desktop and RES Workspace Extender was used to integrate local applications in the XenApp desktop.&lt;/p&gt; &lt;p&gt;The local sound volume control was published as a subscribed application so I launched that and verified that the volume was set to Maximum:&lt;/p&gt; &lt;p&gt;&lt;a class="glightbox thickbox" href="https://remkoweijnen.nl/blog/wp-content/uploads/2013/01/image16.webp" data-type="image" data-gallery="post-3007"&gt;&lt;img loading="lazy" decoding="async" style="display: inline" title="Volumeregeling" alt="Volumeregeling" src="https://remkoweijnen.nl/blog/wp-content/uploads/2013/01/image_thumb16.webp" width="415" height="211" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;I decided to launch the local explorer shell and noticed that there were two volume control icons in the Traybar:&lt;/p&gt; &lt;p&gt;&lt;a class="glightbox thickbox" href="https://remkoweijnen.nl/blog/wp-content/uploads/2013/01/image17.webp" data-type="image" data-gallery="post-3007"&gt;&lt;img loading="lazy" decoding="async" style="display: inline" title="Traybar" alt="Volume Controls" src="https://remkoweijnen.nl/blog/wp-content/uploads/2013/01/image_thumb17.webp" width="96" height="25" /&gt;&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Return username instead of computername in a ThinApp</title><link>https://remkoweijnen.nl/blog/2013/01/15/return-username-instead-of-computername-in-a-thinapp/</link><pubDate>Tue, 15 Jan 2013 11:50:07 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2013/01/15/return-username-instead-of-computername-in-a-thinapp/</guid><description>&lt;p&gt;&lt;img style="display: inline; float: right" alt="File:VMware ThinApp v4.0 icon.png" align="right" src="http://upload.wikimedia.org/wikipedia/commons/c/c0/VMware_ThinApp_v4.0_icon.png" width="95" height="95" /&gt;One of the lesser known features of VMware ThinApp is that you can supply a Virtual Computer name.&lt;/p&gt; &lt;p&gt;This is documented as follows in the &lt;a href="http://www.vmware.com/pdf/thinapp47_packageini_reference.pdf"&gt;package.ini reference guide&lt;/a&gt;:&lt;/p&gt; &lt;p&gt;&lt;strong&gt;VirtualComputerName Parameter&lt;/strong&gt; &lt;br /&gt;The VirtualComputerName parameter determines whether to rename the computer name, to avoid naming conflicts between the capture process and the deployment process.&lt;/p&gt;</description></item><item><title>Cannot redeclare class Snoopy</title><link>https://remkoweijnen.nl/blog/2013/01/14/cannot-redeclare-class-snoopy/</link><pubDate>Mon, 14 Jan 2013 19:31:34 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2013/01/14/cannot-redeclare-class-snoopy/</guid><description>&lt;p&gt;After installing a new Plugin in WordPress called &lt;a href="http://wordpress.org/extend/plugins/native-apps-builder/"&gt;Native Apps Builder&lt;/a&gt; I got the following error when I tried to go to the Plugin's settings:&lt;/p&gt; &lt;p&gt;&lt;a class="glightbox thickbox" href="https://remkoweijnen.nl/blog/wp-content/uploads/2013/01/image12.webp" data-type="image" data-gallery="post-2990"&gt;&lt;img loading="lazy" decoding="async" style="background-image: none; border-right-width: 0px; margin: 0px 5px 0px 0px; padding-left: 0px; padding-right: 0px; display: inline; float: left; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" align="left" src="https://remkoweijnen.nl/blog/wp-content/uploads/2013/01/image_thumb12.webp" width="50" height="56" /&gt;&lt;/a&gt;Fatal error: Cannot redeclare class Snoopy in www/blog/wp-content/plugins/native-apps-builder/appsbuilderapi.php on line 34&lt;/p&gt; &lt;p&gt;This error is caused because a class named &amp;quot;Snoopy&amp;quot; is being declared twice. I figured that two plugins were incompatible with each other so I first needed to know which ones.&lt;/p&gt;</description></item><item><title>Wordpress and the Cookie Monster</title><link>https://remkoweijnen.nl/blog/2013/01/03/wordpress-and-the-cookie-monster/</link><pubDate>Thu, 03 Jan 2013 15:19:19 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2013/01/03/wordpress-and-the-cookie-monster/</guid><description>&lt;p&gt;&lt;img style="margin: 0px 0px 0px 3px; display: inline; float: right" title="" alt="Cookie Monster" align="right" src="http://blogs.sfweekly.com/thesnitch/assets_c/2011/10/cookie_monster-thumb-250x224.jpg" width="109" height="98" /&gt;As you are probably aware the EU has made &lt;a href="http://www.theeucookielaw.com/"&gt;legislation&lt;/a&gt; regarding the use of cookies on websites. This new legislation is active since May 2012.&lt;/p&gt; &lt;p&gt;The Dutch government has also issued legislation in the &lt;a href="http://www.rijksoverheid.nl/onderwerpen/ict/veilig-online-en-e-privacy/internetbezoek-volgen-met-cookies"&gt;Telecommunications LAW&lt;/a&gt; which states that you must ask the user for permissions before server out cooking. Unless these cookies are necessary for the correct technical working of the website or service. This leaves some grey areas but for instance using Google Analytics is a clear case of a situation where opt-in is required.&lt;/p&gt; &lt;p&gt;Although I am not using Google Analytics I wanted to check what cookies my own blog was serving out and if it was necessary to ask for an opt-in.&lt;/p&gt; &lt;p&gt;&amp;#160;&lt;/p&gt;</description></item><item><title>Change Tab Order in an Executable</title><link>https://remkoweijnen.nl/blog/2013/01/02/change-tab-order-in-an-executable/</link><pubDate>Wed, 02 Jan 2013 15:03:14 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2013/01/02/change-tab-order-in-an-executable/</guid><description>&lt;p&gt;An application called Cardiology PACS was recently packaged for a Citrix XenApp environment. The functional tester reported a strange problem at the logon screen: after entering the username it was not possible to go to the password field with the TAB key.&lt;/p&gt;
&lt;p&gt;This was a strange observation since I cannot imagine XenApp interfering with tab stops. So what was going on?&lt;/p&gt;
&lt;p&gt;In the old situation the user was starting the application on his local pc. The application remembered the last username and pre-filled this, therefore the cursor was already in the Password field. The user simply entered his password and hit the Enter key:&lt;/p&gt;
&lt;p&gt;&lt;a class="glightbox thickbox" href="https://remkoweijnen.nl/blog/wp-content/uploads/2013/01/image.webp" data-type="image" data-gallery="post-2955"&gt;&lt;img loading="lazy" decoding="async" style="display: inline;" title="image" alt="image" src="https://remkoweijnen.nl/blog/wp-content/uploads/2013/01/image_thumb.webp" width="240" height="190" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;On XenApp the Username field is not pre-filled because the last username is kept globally per machine. Therefore the user has to enter both the username and the password:&lt;/p&gt;
&lt;p&gt;&lt;a class="glightbox thickbox" href="https://remkoweijnen.nl/blog/wp-content/uploads/2013/01/image1.webp" data-type="image" data-gallery="post-2955"&gt;&lt;img loading="lazy" decoding="async" style="display: inline;" title="image" alt="image" src="https://remkoweijnen.nl/blog/wp-content/uploads/2013/01/image_thumb1.webp" width="240" height="190" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I tested the Tab key behavior in both situations and as I expected it didn&amp;rsquo;t work in both situations. This happens because the Tab Order has been messed up by the programmer (if you press Tab 9 times you do end up in the Username field).&lt;/p&gt;
&lt;p&gt;Because this is something that would annoy me if I were the user I decided to fix it.&lt;/p&gt;</description></item><item><title>Trick to Export Private Key from Certificate Request</title><link>https://remkoweijnen.nl/blog/2012/12/28/trick-to-export-private-key-from-certificate-request/</link><pubDate>Fri, 28 Dec 2012 15:51:13 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2012/12/28/trick-to-export-private-key-from-certificate-request/</guid><description>&lt;p&gt;I noticed something interesting today: I needed to generate a Code Signing certificate from a Windows 2003 CA Server.&lt;/p&gt; &lt;p&gt;However the default Code Signing Template does not allow us to export the private key. I found a nice trick however that enables us to request a code signing certificate WITH private key.&lt;/p&gt; &lt;p&gt;To do this I first needed to enable the Code Signing template on the CA Server. This can be done using the Certification Authority MMC Snap-in: right click on the Certificate Templates node and select New | Certificate Template to Issue | Code Signing:&lt;/p&gt; &lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2012/12/image29.webp" class="glightbox thickbox" data-type="image" data-gallery="post-2937"&gt;&lt;img loading="lazy" decoding="async" style="display: inline" title="image" alt="image" src="https://remkoweijnen.nl/blog/wp-content/uploads/2012/12/image_thumb29.webp" width="318" height="175" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&amp;#160;&lt;/p&gt;</description></item><item><title>Change OPS picture with VCDS</title><link>https://remkoweijnen.nl/blog/2012/12/18/change-ops-picture-with-vcds/</link><pubDate>Tue, 18 Dec 2012 12:31:56 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2012/12/18/change-ops-picture-with-vcds/</guid><description>&lt;p&gt;This time a car topic: using VCDS you can change the picture that it's shown on the navigation headunit to match your car.&lt;/p&gt; &lt;p&gt;In my case it's a &lt;a href="http://en.wikipedia.org/wiki/Volkswagen_Passat#2010_facelift_.28Passat_B7.29"&gt;VW Passat Variant B7/3AA&lt;/a&gt; and it can be coded with VCDS:&lt;/p&gt; &lt;p&gt;Open Module 76 - Park Assist:&lt;/p&gt;</description></item><item><title>Office 2010 very slow when ThinApped</title><link>https://remkoweijnen.nl/blog/2012/12/11/office-2010-very-slow-when-thinapped/</link><pubDate>Tue, 11 Dec 2012 09:00:11 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2012/12/11/office-2010-very-slow-when-thinapped/</guid><description>&lt;p&gt;&lt;a class="glightbox thickbox" href="https://remkoweijnen.nl/blog/wp-content/uploads/2012/12/image17.webp" data-type="image" data-gallery="post-2905"&gt;&lt;img loading="lazy" decoding="async" style="display: inline; float: right" title="image" alt="image" align="right" src="https://remkoweijnen.nl/blog/wp-content/uploads/2012/12/image_thumb17.webp" width="83" height="83" /&gt;&lt;/a&gt;This blog is about an issue with VMware ThinApp and Office 2010 I discovered a while ago.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;&lt;u&gt;Environment&lt;/u&gt;&lt;/strong&gt; &lt;br /&gt;Customer is using Office 2003 natively on a Citrix XenApp 5 environment. Some users had a business need for Office 2010, therefore a ThinApp with Office 2010 was created (this customer uses ThinApp for App-Virt).&lt;/p&gt; &lt;p&gt;&lt;font color="#35383d"&gt;To make the picture complete: Thinapp version is 4.7.2-771812&lt;/font&gt; &lt;font color="#35383d"&gt;and Office version is 2010 SP1 (14.0.6024.1000)&lt;/font&gt; .&lt;/p&gt; &lt;p&gt;&lt;strong&gt;&lt;u&gt;Symptoms&lt;/u&gt;&lt;/strong&gt; &lt;br /&gt;&lt;a class="glightbox thickbox" href="https://remkoweijnen.nl/blog/wp-content/uploads/2012/12/image18.webp" data-type="image" data-gallery="post-2905"&gt;&lt;img loading="lazy" decoding="async" style="margin: 4px 6px 0px 0px; display: inline; float: left" title="image" alt="image" align="left" src="https://remkoweijnen.nl/blog/wp-content/uploads/2012/12/image_thumb18.webp" width="46" height="44" /&gt;&lt;/a&gt;Users complained that Office 2010 was very slow. Most noticeable was Outlook 2010 which was completely unusable.&lt;/p&gt; &lt;p&gt;Outlook startup time was minutes rather than seconds and while starting it seemed to delay on loading profile.&lt;/p&gt; &lt;p&gt;When Outlook was finally started, switching between folders and layouts felt really sluggish. &lt;/p&gt; &lt;p&gt;For example when switching from Calendar to Inbox took a few seconds, after which it would take almost 20 seconds for the e-mails to show. Switching between e-mail would take 2-3 seconds to display the contents in the reading pane.&lt;/p&gt;</description></item><item><title>License Check fails on Citrix XenApp</title><link>https://remkoweijnen.nl/blog/2012/12/07/license-check-fails-on-citrix-xenapp/</link><pubDate>Fri, 07 Dec 2012 16:30:07 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2012/12/07/license-check-fails-on-citrix-xenapp/</guid><description>&lt;p&gt;&lt;a class="glightbox thickbox" href="https://remkoweijnen.nl/blog/wp-content/uploads/2012/12/image14.webp" data-type="image" data-gallery="post-2870"&gt;&lt;img loading="lazy" decoding="async" style="display: inline; float: right;" title="image" src="https://remkoweijnen.nl/blog/wp-content/uploads/2012/12/image_thumb14.webp" alt="image" width="70" height="65" align="right" /&gt;&lt;/a&gt;Today I was asked to assist in getting an Excel Add-In to work on Citrix XenApp.&lt;/p&gt;
&lt;p&gt;The application was packaged into a Thinapp by one of our package engineers.&lt;/p&gt;
&lt;p&gt;However when testing the Add-In on Citrix XenApp the following message appeared:&lt;/p&gt;
&lt;p&gt;&lt;a class="glightbox thickbox" href="https://remkoweijnen.nl/blog/wp-content/uploads/2012/12/image15.webp" data-type="image" data-gallery="post-2870"&gt;&lt;img loading="lazy" decoding="async" style="display: inline;" title="image" src="https://remkoweijnen.nl/blog/wp-content/uploads/2012/12/image_thumb15.webp" alt="image" width="240" height="68" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Apparently this application does a license check that fails when run from another server (how bad).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;span style="text-decoration: underline;"&gt;Disclaimer&lt;/span&gt;&lt;/strong&gt;&lt;br&gt;
Before we go on: I would like to make clear that my goal is not to be able to use an application without license. I am just trying to make it work within the customer&amp;rsquo;s environment.&lt;/p&gt;</description></item><item><title>Parse RES Building Blocks with PowerShell</title><link>https://remkoweijnen.nl/blog/2012/12/07/parse-res-building-blocks-with-powershell/</link><pubDate>Fri, 07 Dec 2012 13:29:20 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2012/12/07/parse-res-building-blocks-with-powershell/</guid><description>&lt;p&gt;&lt;strong&gt;&lt;span style="text-decoration: underline;"&gt;Background&lt;br&gt;
&lt;/span&gt;&lt;/strong&gt;Customer uses Citrix XenApp 5 with ThinApp, RES Workspace Manager and RES Workspace Extender.&lt;/p&gt;
&lt;p&gt;An application integration strategy is defined, the picture below displays the strategy and preferred order:&lt;/p&gt;
&lt;p&gt;&lt;a class="glightbox thickbox" href="https://remkoweijnen.nl/blog/wp-content/uploads/2012/12/image12.webp" data-type="image" data-gallery="post-2850"&gt;&lt;img loading="lazy" decoding="async" style="display: inline;" title="image" src="https://remkoweijnen.nl/blog/wp-content/uploads/2012/12/image_thumb12.webp" alt="image" width="399" height="136" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;span style="text-decoration: underline;"&gt;Question&lt;/span&gt;&lt;/strong&gt;&lt;br&gt;
Customer wanted to know the type (1..7) for all applications currently defined in RES Workspace Manager.&lt;/p&gt;
&lt;p&gt;I decided to export all the Applications from RES WM as Building Blocks. This results in a folder with XML files. I decided to parse the XML files with a PowerShell script.&lt;/p&gt;</description></item><item><title>Application Hangs when Scanning in Citrix XenApp</title><link>https://remkoweijnen.nl/blog/2012/12/06/application-hangs-when-scanning-in-citrix-xenapp/</link><pubDate>Thu, 06 Dec 2012 16:10:50 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2012/12/06/application-hangs-when-scanning-in-citrix-xenapp/</guid><description>&lt;p&gt;Another interesting issue today with an application that runs on Citrix XenApp.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;span style="text-decoration: underline;"&gt;Environment&lt;/span&gt;&lt;/strong&gt;&lt;br&gt;
Customer has a Citrix XenApp 5 environment running on Windows Server 2003. Clients are all Windows XP and run the Citrix Online Plugin 12.3 full screen.&lt;/p&gt;
&lt;p&gt;RES Workspace Extender is used to integrate locally installed application into the XenApp Session. Users have no access to the local desktop.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;span style="text-decoration: underline;"&gt;Symptoms&lt;/span&gt;&lt;/strong&gt;&lt;br&gt;
This particular application scans invoices using a USB scanner attached to the client and runs them trough a workflow.&lt;br&gt;
Whenever the Start scan button was pressed the application froze.&lt;/p&gt;
&lt;p&gt;&lt;a class="glightbox thickbox" href="https://remkoweijnen.nl/blog/wp-content/uploads/2012/12/SNAGHTML48ec098.webp" data-type="image" data-gallery="post-2814"&gt;&lt;img loading="lazy" decoding="async" style="display: inline;" title="SNAGHTML48ec098" src="https://remkoweijnen.nl/blog/wp-content/uploads/2012/12/SNAGHTML48ec098_thumb.webp" alt="SNAGHTML48ec098" width="408" height="308" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;</description></item><item><title>Return username instead of computername to Applications</title><link>https://remkoweijnen.nl/blog/2012/12/06/return-username-instead-of-computername-to-applications/</link><pubDate>Thu, 06 Dec 2012 10:45:40 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2012/12/06/return-username-instead-of-computername-to-applications/</guid><description>&lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2012/12/image8.webp" class="glightbox thickbox" data-type="image" data-gallery="post-2841"&gt;&lt;img loading="lazy" decoding="async" style="display: inline; float: right" title="image" alt="image" align="right" src="https://remkoweijnen.nl/blog/wp-content/uploads/2012/12/image_thumb8.webp" width="87" height="74" /&gt;&lt;/a&gt;Some applications use the computer's name as a unique identifier, rather than using the user name. In a single-user-per-computer environment, this strategy works well. &lt;/p&gt; &lt;p&gt;However, in a Multi User environment such as Citrix XenApp or Microsoft's Remote Desktop Services (Terminal Server), all connected users report the same computername. &lt;/p&gt; &lt;p&gt;If the application relies on unique computernames to handle tasks such as file and record locking, then the application will fail. &lt;/p&gt; &lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2012/12/image9.webp" class="glightbox thickbox" data-type="image" data-gallery="post-2841"&gt;&lt;img loading="lazy" decoding="async" style="margin: 11px 6px 5px 0px; display: inline; float: left" title="image" alt="image" align="left" src="https://remkoweijnen.nl/blog/wp-content/uploads/2012/12/image_thumb9.webp" width="32" height="32" /&gt;&lt;/a&gt;We can however set an &lt;a href="http://support.microsoft.com/default.aspx?scid=kb;en-us;186499"&gt;Application Compatibility Flag&lt;/a&gt; in the registry to return the username instead of the computername.&lt;/p&gt; &lt;p&gt;To demonstrate this behaviour I wrote a small Test Application called TestAppCompatFlags.exe.&lt;/p&gt;</description></item><item><title>Replacing WFP Protected files</title><link>https://remkoweijnen.nl/blog/2012/12/05/replacing-wfp-protected-files/</link><pubDate>Wed, 05 Dec 2012 15:33:45 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2012/12/05/replacing-wfp-protected-files/</guid><description>&lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2012/12/image5.webp" class="glightbox thickbox" data-type="image" data-gallery="post-2826"&gt;&lt;img loading="lazy" decoding="async" style="display: inline; float: right" title="image" alt="image" align="right" src="https://remkoweijnen.nl/blog/wp-content/uploads/2012/12/image_thumb5.webp" width="54" height="51" /&gt;&lt;/a&gt;On Windows 2000, XP and Server 2003 a mechanism called &lt;a href="http://support.microsoft.com/kb/222193/en-us"&gt;Windows File Protection&lt;/a&gt; (WFP) is used to protect system integrity.&lt;/p&gt; &lt;p&gt;How does WFP Work? &lt;br /&gt;Inside SFCFILES.DLL a list of files is kept that are monitored for changes. When a monitored file gets deleted, modified or overwritten WFP will restore the original from one of the following locations:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;&lt;font color="#35383d"&gt;Cache Folder (%systemroot%\System32\DllCache)&lt;/font&gt; &lt;/li&gt; &lt;li&gt;&lt;font color="#35383d"&gt;Network Installation Path&lt;/font&gt; &lt;/li&gt; &lt;li&gt;&lt;font color="#35383d"&gt;Windows CD (or i386 folder on harddisk)&lt;/font&gt; &lt;/li&gt; &lt;/ul&gt; &lt;p&gt;But what if we need to replace such a file? You could write a batch file that copies the modified file to the cache folder, installation path and destination. And this may work if it's quick enough.&lt;/p&gt; &lt;p&gt;A more reliable method is to use an undocumented export from sfc_os.dll called SfcFileException (only exported by ordinal #5).&lt;/p&gt;</description></item><item><title>File not found error when scanning using Twain Redirection in Citrix XenApp</title><link>https://remkoweijnen.nl/blog/2012/12/04/file-not-found-error-when-scanning-using-twain-redirection-in-citrix-xenapp/</link><pubDate>Tue, 04 Dec 2012 15:07:10 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2012/12/04/file-not-found-error-when-scanning-using-twain-redirection-in-citrix-xenapp/</guid><description>&lt;p&gt;&lt;a class="glightbox thickbox" href="https://remkoweijnen.nl/blog/wp-content/uploads/2012/12/image.webp" data-type="image" data-gallery="post-2795"&gt;&lt;img loading="lazy" decoding="async" style="margin: 0px 0px 2px; display: inline; float: right;" title="Twain" src="https://remkoweijnen.nl/blog/wp-content/uploads/2012/12/image_thumb.webp" alt="Twain Logo" width="75" height="70" align="right" /&gt;&lt;/a&gt;Scanners attached to client machines can be used from within a Citrix XenApp session via a mechanism called Twain Redirection.&lt;/p&gt;
&lt;p&gt;For this mechanism to work correctly the file twain_32.dll must be present in the Windows directory.&lt;/p&gt;
&lt;p&gt;&lt;span style="color: #35383d;"&gt;On Windows 2008 this dll should be copied from winsxs (side by side) to the windows directory as described in &lt;a href="http://support.citrix.com/article/CTX123981"&gt;CTX123981&lt;/a&gt;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;On Windows 2003 the dll is already in the correct directory, however applications that are not &lt;a href="http://msdn.microsoft.com/en-us/library/01cfys9z%28v=vs.80%29.aspx"&gt;Terminal Server Aware&lt;/a&gt; cannot find this dll because the Windows directory is redirected to the user profile. Citrix recommends copying twain_32.dll to each user&amp;rsquo;s profile directory but this will take up unnecessary space.&lt;/p&gt;
&lt;p&gt;So what alternatives do we have?&lt;/p&gt;</description></item><item><title>Screen flickering with PowerPoint 2010 on Citrix XenApp</title><link>https://remkoweijnen.nl/blog/2012/11/30/screen-flickering-with-powerpoint-2010-on-citrix-xenapp/</link><pubDate>Fri, 30 Nov 2012 14:18:22 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2012/11/30/screen-flickering-with-powerpoint-2010-on-citrix-xenapp/</guid><description>&lt;p&gt;Within half an hour of writing the article &amp;quot;&lt;a href="https://remkoweijnen.nl/blog/2012/11/30/application-causes-screen-flickering-in-citrix-xenapp-session/"&gt;Application causes Screen Flickering in Citrix XenApp Session&lt;/a&gt;&amp;quot; I got a message that the hotfix in that article also fixes a similar problem in PowerPoint 2010.&lt;/p&gt; &lt;p&gt;Office 2010 uses hardware acceleration for displaying images and when this is enabled (which is the default) you will see constant screen flicker when you try to display a presentation with Images on Citrix XenApp (Server 2003):&lt;/p&gt; &lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:5737277B-5D6D-4f48-ABFC-DD9C333F4C5D:1baf0443-1822-4d90-8c1b-cf6059f5de34" class="wlWriterEditableSmartContent"&gt;&lt;div&gt;&lt;object width="448" height="252"&gt;&lt;param name="movie" value="http://www.youtube.com/v/uhWNwQQUZ3o?hl=en&amp;amp;hd=1"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/uhWNwQQUZ3o?hl=en&amp;amp;hd=1" type="application/x-shockwave-flash" width="448" height="252"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;/div&gt;&lt;div style="width:448px;clear:both;font-size:.8em"&gt;Screen Flickering when running WPF Applications on Citrix XenApp&lt;/div&gt;&lt;/div&gt; &lt;p&gt;&amp;#160;&lt;/p&gt;</description></item><item><title>Application causes Screen Flickering in Citrix XenApp Session</title><link>https://remkoweijnen.nl/blog/2012/11/30/application-causes-screen-flickering-in-citrix-xenapp-session/</link><pubDate>Fri, 30 Nov 2012 13:28:54 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2012/11/30/application-causes-screen-flickering-in-citrix-xenapp-session/</guid><description>&lt;p&gt;Yesterday I was asked to troubleshoot an interesting issue with an application running on Citrix XenApp.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;span style="text-decoration: underline;"&gt;Environment&lt;br&gt;
&lt;/span&gt;&lt;/strong&gt;This customer is running Citrix XenApp 5 on Windows Server 2003 (x86). On the Client Side the Online Plugin version 12.3 is used.&lt;/p&gt;
&lt;p&gt;&lt;span style="text-decoration: underline;"&gt;&lt;strong&gt;The Problem&lt;/strong&gt;&lt;/span&gt;&lt;br&gt;
When this particular application was active the screen was flickering and black blocks appeared at seemingly random places. Further more it was not possible to resize the window:&lt;/p&gt;
&lt;p&gt;&lt;a class="glightbox thickbox" href="https://remkoweijnen.nl/blog/wp-content/uploads/2012/11/image.webp" data-type="image" data-gallery="post-2778"&gt;&lt;img loading="lazy" decoding="async" style="display: inline;" title="image" src="https://remkoweijnen.nl/blog/wp-content/uploads/2012/11/image_thumb.webp" alt="image" width="425" height="239" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;My experience is that display issues are often related to either HDX Flash Redirection (offloading flash to the client) or the Multi Monitor hook.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;</description></item><item><title>Get Process Id of a running Service</title><link>https://remkoweijnen.nl/blog/2012/11/28/get-process-id-of-a-running-service/</link><pubDate>Wed, 28 Nov 2012 12:20:40 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2012/11/28/get-process-id-of-a-running-service/</guid><description>&lt;p&gt;Sometimes you need to know the Process Id (PID) of a running service. Since Windows 2003 you can use the tasklist.exe tool with the /SVC switch. But how to do this programmatically?&lt;/p&gt; &lt;p&gt;The &lt;a href="http://msdn.microsoft.com/en-us/library/ms684941%28VS.85%29.aspx"&gt;QueryServiceStatusE&lt;/a&gt;x API returns a &lt;a href="http://msdn.microsoft.com/en-us/library/ms685992(v=vs.85).aspx"&gt;SERVICE_STATUS_PROCESS&lt;/a&gt; structure that contains the PID.&lt;/p&gt;</description></item><item><title>Query Administrator Account Name with PowerShell</title><link>https://remkoweijnen.nl/blog/2012/10/25/query-administrator-account-name-with-powershell/</link><pubDate>Thu, 25 Oct 2012 15:22:47 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2012/10/25/query-administrator-account-name-with-powershell/</guid><description>&lt;p&gt;A customer had partially implemented a (written) policy in the past where the the Local Administrator account was renamed according to a special convention.&lt;/p&gt;
&lt;p&gt;This policy stated that the Administrator account needed to be renamed to admin with the computername as a prefix.&lt;/p&gt;
&lt;p&gt;However they didn&amp;rsquo;t know exactly on which machines this policy had been applied to in the past. I was asked to write a script that would check a list of machine names, query the Administrator account name and write this in a new list.&lt;/p&gt;
&lt;p&gt;The Administrator account has a &lt;a href="http://support.microsoft.com/kb/243330"&gt;Well Known SID&lt;/a&gt; of S-1-5-21-xxxxxxx-500 where xxxxxxx is the SID of the computer.&lt;/p&gt;</description></item><item><title>Convert an IP Address to an Integer in C# in host byte ordering</title><link>https://remkoweijnen.nl/blog/2012/10/13/convert-an-ip-address-to-an-integer-in-c-in-host-byte-ordering/</link><pubDate>Sat, 13 Oct 2012 15:18:26 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2012/10/13/convert-an-ip-address-to-an-integer-in-c-in-host-byte-ordering/</guid><description>&lt;p&gt;Yesterday I wrote about &lt;a href="https://remkoweijnen.nl/blog/2012/10/12/warning-cs0618-system-net-ipaddress-address-is-obsolete/"&gt;converting an IP Address to an Integer in C#&lt;/a&gt;. But both methods I presented return the IP Address in network byte order.&lt;/p&gt;
&lt;p&gt;However in some cases, especially when calling WinApi functions, you will need to convert the Integer to host byte order which is &lt;em&gt;little-endian&lt;/em&gt; on Intel processors.&lt;/p&gt;</description></item><item><title>warning CS0618: 'System.Net.IPAddress.Address' is obsolete</title><link>https://remkoweijnen.nl/blog/2012/10/12/warning-cs0618-system-net-ipaddress-address-is-obsolete/</link><pubDate>Fri, 12 Oct 2012 13:43:21 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2012/10/12/warning-cs0618-system-net-ipaddress-address-is-obsolete/</guid><description>&lt;p&gt;For a call to a WinApi function I needed to convert an IP Address to an Integer in C#.&lt;/p&gt; &lt;p&gt;This can be done using the &lt;a href="http://msdn.microsoft.com/en-us/library/system.net.ipaddress.aspx"&gt;System.Net.IPAddress&lt;/a&gt; class:&lt;/p&gt;
&lt;div class="codecard"&gt;
 &lt;div class="codehead"&gt;
 &lt;span class="codefile"&gt;&lt;/span&gt;
 &lt;span class="codetools" data-pagefind-ignore&gt;
 &lt;span class="codelang"&gt;text&lt;/span&gt;
 &lt;button class="codebtn" type="button" data-copy&gt;Copy&lt;/button&gt;
 &lt;a class="codebtn" download=".txt" href="data:text/plain;charset=utf-8;base64,dXNpbmcgU3lzdGVtLk5ldDsKCklQQWRkcmVzcyBpcGEgPSBJUEFkZHJlc3MuUGFyc2UoIjEwLjQuMi45MSIpOwp1aW50IGlwID0gKHVpbnQpaXBhLkFkZHJlc3M7"&gt;Download&lt;/a&gt;
 &lt;/span&gt;
 &lt;/div&gt;
 &lt;div class="codebody"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;using System.Net;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;IPAddress ipa = IPAddress.Parse(&amp;#34;10.4.2.91&amp;#34;);
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;uint ip = (uint)ipa.Address;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Although this works, the compiler issues a warning:&amp;#160; &lt;/p&gt;</description></item><item><title>Citrix License Server Crash</title><link>https://remkoweijnen.nl/blog/2012/08/23/citrix-license-server-crash/</link><pubDate>Thu, 23 Aug 2012 15:29:40 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2012/08/23/citrix-license-server-crash/</guid><description>&lt;p&gt;After updating a Citrix License server from 11.6.1 to 11.10 the Citrix Licensing Service crashed immediately after startup.&lt;/p&gt; &lt;p&gt;In the Event Log the following error was shown:&lt;/p&gt; &lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2012/08/image12.webp" class="glightbox thickbox" data-type="image" data-gallery="post-2743"&gt;&lt;img loading="lazy" decoding="async" style="display: inline" title="Event ID 1000 | Category 100 | Citrix Licensing Service" alt="Application Error | Faulting application lmadmin.exe, version 11.10.0.9, faulting module msvcp80.dll, version 8.0.50727.6195, fault address 0x000038db" src="https://remkoweijnen.nl/blog/wp-content/uploads/2012/08/image_thumb12.webp" width="216" height="240" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;I suspected that there was a corrupt licensing file in the MyFiles folder (Default C:\Program Files\Citrix\Licensing\MyFiles).&lt;/p&gt;</description></item><item><title>Calling a function inside another assembly in .NET</title><link>https://remkoweijnen.nl/blog/2012/08/22/calling-a-function-inside-another-assembly-in-net/</link><pubDate>Wed, 22 Aug 2012 09:42:06 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2012/08/22/calling-a-function-inside-another-assembly-in-net/</guid><description>&lt;p&gt;&lt;img style="display: inline; float: right" alt="Red Gate .NET Reflector" align="right" src="http://www.apponic.com/data/softimg/windows/development/net/red-gate-net-reflector-95603-icon.jpeg" width="32" height="32" /&gt;I wanted to call a hash function from a .net executable from my code. My first step was to inspect the executable with &lt;a href="http://www.reflector.net/"&gt;Reflector&lt;/a&gt;.&lt;/p&gt; &lt;p&gt;The Hash function was in a namespace called Core:&lt;/p&gt;
&lt;div class="codecard"&gt;
 &lt;div class="codehead"&gt;
 &lt;span class="codefile"&gt;&lt;/span&gt;
 &lt;span class="codetools" data-pagefind-ignore&gt;
 &lt;span class="codelang"&gt;text&lt;/span&gt;
 &lt;button class="codebtn" type="button" data-copy&gt;Copy&lt;/button&gt;
 &lt;a class="codebtn" download=".txt" href="data:text/plain;charset=utf-8;base64,bmFtZXNwYWNlIFRoZUV4ZS5Db3JlCnsKICAgIGludGVybmFsIHN0YXRpYyBjbGFzcyBBc3NlbWJseUluZm8KICAgIGludGVybmFsIHN0YXRpYyBjbGFzcyBTdHJpbmdFeHRlbnNpb25NZXRob2RzCn0KCmludGVybmFsIHN0YXRpYyBjbGFzcyBTdHJpbmdFeHRlbnNpb25NZXRob2RzCnsKICAgIC8vIE1ldGhvZHMKICAgIHB1YmxpYyBzdGF0aWMgc3RyaW5nIEhhc2godGhpcyBzdHJpbmcgb3JpZ2luYWwsIHN0cmluZyBwYXNzd29yZCk7CiAgICAvLyBNb3JlIG1ldGhvZHMuLi4KfQ=="&gt;Download&lt;/a&gt;
 &lt;/span&gt;
 &lt;/div&gt;
 &lt;div class="codebody"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;namespace TheExe.Core
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;{
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; internal static class AssemblyInfo
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; internal static class StringExtensionMethods
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;}
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;internal static class StringExtensionMethods
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;{
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; // Methods
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; public static string Hash(this string original, string password);
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; // More methods...
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Notice that the Core namespace is marked as internal so it was not meant to be callable outside of the executable. It's still possible to call it using Reflection:&lt;/p&gt;</description></item><item><title>Error 1787 when logging in with domain account</title><link>https://remkoweijnen.nl/blog/2012/08/21/error-1787-when-logging-in-with-domain-account/</link><pubDate>Tue, 21 Aug 2012 11:43:35 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2012/08/21/error-1787-when-logging-in-with-domain-account/</guid><description>&lt;p&gt;After joining a new Windows 2008 R2 Server to the domain I could not login to the domain.&lt;/p&gt; &lt;p&gt;I would get the following error message:&lt;/p&gt; &lt;p&gt;&lt;a class="glightbox thickbox" href="https://remkoweijnen.nl/blog/wp-content/uploads/2012/08/clip_image001.webp" data-type="image" data-gallery="post-2717"&gt;&lt;img loading="lazy" decoding="async" style="display: inline" title="Error 1787" alt="The security database on the server does not have a computer acocunt for this workstation trust relationship." src="https://remkoweijnen.nl/blog/wp-content/uploads/2012/08/clip_image001_thumb.webp" width="422" height="116" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Additionally the following error was logged in the Eventlog:&lt;/p&gt; &lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2012/08/image5.webp" class="glightbox thickbox" data-type="image" data-gallery="post-2717"&gt;&lt;img loading="lazy" decoding="async" style="display: inline" title="Event Properties" alt="Event ID 3 | Error 1787 | Error Code 0x7 | KDC_ERR_S_PRINCIPAL_UNKNOWN | A Kerberos Message was received" src="https://remkoweijnen.nl/blog/wp-content/uploads/2012/08/image_thumb5.webp" width="216" height="240" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&amp;#160;&lt;/p&gt;</description></item><item><title>Modify VB Executable to force Taskbar Button</title><link>https://remkoweijnen.nl/blog/2012/08/04/modify-vb-executable-to-force-taskbar-button/</link><pubDate>Sat, 04 Aug 2012 11:07:18 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2012/08/04/modify-vb-executable-to-force-taskbar-button/</guid><description>&lt;p&gt;&lt;a class="glightbox thickbox" href="https://remkoweijnen.nl/blog/wp-content/uploads/2012/08/image.webp" data-type="image" data-gallery="post-2693"&gt;&lt;img loading="lazy" decoding="async" style="display: inline; float: right" title="image" alt="image" align="right" src="https://remkoweijnen.nl/blog/wp-content/uploads/2012/08/image_thumb.webp" width="97" height="93" /&gt;&lt;/a&gt;I had to troubleshoot an application that was published with Citrix XenApp. The problem with this application was that it didn't have an button/icon in the taskbar and the window would sometimes disappear.&lt;/p&gt; &lt;p&gt;I noticed that this (cr)application was written in Visual Basic, so I decided to run it through a &lt;a href="http://www.vb-decompiler.org/"&gt;decompilation tool&lt;/a&gt;.&lt;/p&gt; &lt;p&gt;The decompiler was able to list the forms used in the Application:&lt;/p&gt; &lt;p&gt;&lt;a class="glightbox thickbox" href="https://remkoweijnen.nl/blog/wp-content/uploads/2012/08/image1.webp" data-type="image" data-gallery="post-2693"&gt;&lt;img loading="lazy" decoding="async" style="display: inline" title="image" alt="image" src="https://remkoweijnen.nl/blog/wp-content/uploads/2012/08/image_thumb1.webp" width="123" height="142" /&gt;&lt;/a&gt;&lt;/p&gt;</description></item><item><title>My Network Places Internals</title><link>https://remkoweijnen.nl/blog/2012/07/19/my-network-places-internals/</link><pubDate>Thu, 19 Jul 2012 11:26:12 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2012/07/19/my-network-places-internals/</guid><description>&lt;p&gt;&lt;a class="glightbox thickbox" href="https://remkoweijnen.nl/blog/wp-content/uploads/2012/07/image2.webp" data-type="image" data-gallery="post-2673"&gt;&lt;img loading="lazy" decoding="async" style="display: inline; float: right" title="Nethood" alt="Nethood Icon" align="right" src="https://remkoweijnen.nl/blog/wp-content/uploads/2012/07/image_thumb2.webp" width="56" height="52" /&gt;&lt;/a&gt;I am using a PowerShell script to copy some elements of from the users old profile location to a new location. This includes the Nethood (&amp;quot;My Network Places&amp;quot;) folder which contains the Network Places shortcuts.&lt;/p&gt; &lt;p&gt;A user reported that she could not save documents to Network Places anymore and after inspection the Network Places shortcuts were broken.&lt;/p&gt; &lt;p&gt;I started comparing the old Nethood folder to the new and observed the following difference in Explorer:&lt;/p&gt; &lt;p&gt;&lt;a class="glightbox thickbox" href="https://remkoweijnen.nl/blog/wp-content/uploads/2012/07/image3.webp" data-type="image" data-gallery="post-2673"&gt;&lt;img loading="lazy" decoding="async" style="display: inline" title="image" alt="image" src="https://remkoweijnen.nl/blog/wp-content/uploads/2012/07/image_thumb3.webp" width="409" height="80" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;When copying entries from the Nethood folder with Explorer manually they worked fine, so somehow Explorer gives the Nethood folder special treatment.&lt;/p&gt;</description></item><item><title>Could not load file or assembly 'System.Configuration'</title><link>https://remkoweijnen.nl/blog/2012/07/18/could-not-load-file-or-assembly-system-configuration/</link><pubDate>Wed, 18 Jul 2012 13:43:06 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2012/07/18/could-not-load-file-or-assembly-system-configuration/</guid><description>&lt;p&gt;Today I was asked to troubleshoot an executable that didn't work correctly on Windows XP Embedded.&lt;/p&gt; &lt;p&gt;On startup it displayed the following message:&lt;/p&gt; 
&lt;div class="codecard"&gt;
 &lt;div class="codehead"&gt;
 &lt;span class="codefile"&gt;&lt;/span&gt;
 &lt;span class="codetools" data-pagefind-ignore&gt;
 &lt;span class="codelang"&gt;text&lt;/span&gt;
 &lt;button class="codebtn" type="button" data-copy&gt;Copy&lt;/button&gt;
 &lt;a class="codebtn" download=".txt" href="data:text/plain;charset=utf-8;base64,VW5oYW5kbGVkIEV4Y2VwdGlvbjogU3lzdGVtLklPLkZpbGVOb3RGb3VuZEV4Y2VwdGlvbjogQ291bGQgbm90IGxvYWQgZmlsZSBvciBhc3MKZW1ibHkgJ1N5c3RlbS5Db25maWd1cmF0aW9uLCBWZXJzaW9uPTIuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49YjAKM2Y1ZjdmMTFkNTBhM2EnIG9yIG9uZSBvZiBpdHMgZGVwZW5kZW5jaWVzLiBUaGUgc3lzdGVtIGNhbm5vdCBmaW5kIHRoZSBwYXRoIHNwZWMKaWZpZWQuCkZpbGUgbmFtZTogJ1N5c3RlbS5Db25maWd1cmF0aW9uLCBWZXJzaW9uPTIuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rCmVuPWIwM2Y1ZjdmMTFkNTBhM2EnIC0tLT4gU3lzdGVtLklPLkRpcmVjdG9yeU5vdEZvdW5kRXhjZXB0aW9uOiBUaGUgc3lzdGVtIGNhbm5vCnQgZmluZCB0aGUgcGF0aCBzcGVjaWZpZWQuIChFeGNlcHRpb24gZnJvbSBIUkVTVUxUOiAweDgwMDcwMDAzKQ=="&gt;Download&lt;/a&gt;
 &lt;/span&gt;
 &lt;/div&gt;
 &lt;div class="codebody"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;Unhandled Exception: System.IO.FileNotFoundException: Could not load file or ass
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;embly &amp;#39;System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b0
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;3f5f7f11d50a3a&amp;#39; or one of its dependencies. The system cannot find the path spec
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;ified.
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;File name: &amp;#39;System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyTok
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;en=b03f5f7f11d50a3a&amp;#39; ---&amp;gt; System.IO.DirectoryNotFoundException: The system canno
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;t find the path specified. (Exception from HRESULT: 0x80070003)&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;I verified that System.Configuration.dll was present (in C:\Windows\Microsoft.NET\Framework\v2.0.50727).&lt;/p&gt;</description></item><item><title>Excel 2010 multi-threaded calculation</title><link>https://remkoweijnen.nl/blog/2012/06/08/excel-2010-multi-threaded-calculation/</link><pubDate>Fri, 08 Jun 2012 13:21:19 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2012/06/08/excel-2010-multi-threaded-calculation/</guid><description>&lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2012/01/image10.webp" class="glightbox" data-type="image" data-gallery="post-2642"&gt;&lt;img loading="lazy" decoding="async" style="display: inline; float: right" title="Excel 2007 Icon" alt="Excel 2007 Icon" align="right" src="https://remkoweijnen.nl/blog/wp-content/uploads/2012/01/image_thumb10.webp" width="67" height="65" /&gt;&lt;/a&gt;I was just browsing through the Options tab in Excel 2010 when I noticed the following setting:&lt;/p&gt; &lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2012/06/image2.webp" class="glightbox thickbox" data-type="image" data-gallery="post-2642"&gt;&lt;img loading="lazy" decoding="async" style="display: inline" title="image" alt="image" src="https://remkoweijnen.nl/blog/wp-content/uploads/2012/06/image_thumb2.webp" width="318" height="113" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&amp;#160;&lt;/p&gt; &lt;p&gt;This feature was introduced in Excel 2007. &lt;br /&gt;In the default settings, multi-threaded calculation is Enabled with &amp;quot;Use all processors on this computer&amp;quot;.&lt;/p&gt; &lt;p&gt;On a physical desktop this would be the preferred setting since it will make formula calculation as fast as possible.&lt;/p&gt;</description></item><item><title>Decoding Citrix IMA Datastore Password</title><link>https://remkoweijnen.nl/blog/2012/05/29/decoding-citrix-ima-datastore-password/</link><pubDate>Tue, 29 May 2012 21:46:30 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2012/05/29/decoding-citrix-ima-datastore-password/</guid><description>&lt;p&gt;This morning &lt;a href="http://www.twitter.com/arbeijer/status/207398601066942464"&gt;Arjan Beijer&lt;/a&gt; sent me an interesting link to a &lt;a href="http://www.youtube.com/watch?v=Cb8-kvJkojY"&gt;youtube video&lt;/a&gt; about obtaining the Citrix IMA Datastore password using Windbg.&lt;/p&gt;
&lt;p&gt;The video shows a method, discovered by &lt;a href="https://twitter.com/#!/fdwl"&gt;Denis Gundarev&lt;/a&gt; to obtain the IMA Datastore password. Basically he uses DSMaint.exe and set&amp;rsquo;s a breakpoint on the call to &lt;a href="http://msdn.microsoft.com/en-us/library/windows/desktop/aa380882(v=vs.85).aspx"&gt;CryptUnprotectData&lt;/a&gt; and then reads the password from memory.&lt;/p&gt;
&lt;p&gt;I tried to call the CryptUnprotectData API with the data read from the registry directly but this failed with error NTE_BAD_KEY_STATE, this is defined in winerror.h and it means &amp;ldquo;Key not valid for use in specified state&amp;rdquo;.&lt;/p&gt;</description></item><item><title>DefaultPassword Dumper</title><link>https://remkoweijnen.nl/blog/2012/05/21/defaultpassword-dumper/</link><pubDate>Mon, 21 May 2012 22:39:05 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2012/05/21/defaultpassword-dumper/</guid><description>&lt;p&gt;Just a small post today: a small commandline utility that reads the &amp;ldquo;DefaultPassword&amp;rdquo; LSA secret.&lt;/p&gt;
&lt;p&gt;This secret is stored in the registry under the SECURITY Hive:&lt;/p&gt;
&lt;p&gt;&lt;a class="glightbox thickbox" href="https://remkoweijnen.nl/blog/wp-content/uploads/2012/05/SNAGHTML34f1d213.webp" data-type="image" data-gallery="post-2621"&gt;&lt;img loading="lazy" decoding="async" style="display: inline;" title="RegEdit" src="https://remkoweijnen.nl/blog/wp-content/uploads/2012/05/SNAGHTML34f1d213_thumb.webp" alt="HKEY_LOCAL_MACHINE\SECURITY\Policy\Secrets\DefaultPassword" width="392" height="320" /&gt;&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Citrix Launcher Progress Update 1</title><link>https://remkoweijnen.nl/blog/2012/05/17/citrix-launcher-progress-update-1/</link><pubDate>Thu, 17 May 2012 23:19:12 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2012/05/17/citrix-launcher-progress-update-1/</guid><description>&lt;p&gt;After figuring out how to &lt;a href="https://remkoweijnen.nl/blog/2012/05/13/encoding-and-decoding-citrix-passwords/"&gt;encode and decode the Citrix passwords&lt;/a&gt; my next step for the upcoming Citrix Launcher is experiment with config.xml and authenticating to the Citrix Web Interface.&lt;/p&gt;
&lt;p&gt;&lt;a class="glightbox thickbox" href="https://remkoweijnen.nl/blog/wp-content/uploads/2012/05/image4.webp" data-type="image" data-gallery="post-2609"&gt;&lt;img loading="lazy" decoding="async" style="float: left; display: inline;" title="image" src="https://remkoweijnen.nl/blog/wp-content/uploads/2012/05/image_thumb4.webp" alt="image" width="45" height="39" align="left" /&gt;&lt;/a&gt;I imported the NFuse.dtd from the Citrix Web Interface into Delphi with the XML Data Binding Wizard. The results in an NFuse Unit so I can easily create the XML data.&lt;/p&gt;
&lt;p&gt;To create an authentication packet I use the following code:&lt;/p&gt;</description></item><item><title>Encoding and Decoding Citrix Passwords</title><link>https://remkoweijnen.nl/blog/2012/05/13/encoding-and-decoding-citrix-passwords/</link><pubDate>Sun, 13 May 2012 21:55:02 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2012/05/13/encoding-and-decoding-citrix-passwords/</guid><description>&lt;p&gt;I am working on a launcher tool for Citrix XenApp that can not only connect to a published application or published desktop but can also leverage Citrix Workspace Control to reconnect to disconnected and/or active sessions.&lt;/p&gt; &lt;p&gt;There doesn't seem to be any sdk that exposed the data we need so I am trying to reproduce what the Citrix online plugi-in does.&lt;/p&gt; &lt;p&gt;I used a HTTP monitoring tool to capture the traffic between the Online plug-in and the Web Interface. First the online plug-in will retrieve the config.xml from the server specified via the Change Server option:&lt;/p&gt; &lt;p&gt;&lt;a class="glightbox thickbox" href="https://remkoweijnen.nl/blog/wp-content/uploads/2012/05/image2.webp" data-type="image" data-gallery="post-2586"&gt;&lt;img loading="lazy" decoding="async" style="display: inline" title="Change Server - Citrix online plug-in" alt="What is the address of the server hosting your published resources? | Server Address | Example: servername (for non-secure connections) | https://servername (for secure connections)" src="https://remkoweijnen.nl/blog/wp-content/uploads/2012/05/image_thumb2.webp" width="240" height="167" /&gt;&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Setup was unable to verify drive C while installing Windows NT4 Terminal server on VMWare</title><link>https://remkoweijnen.nl/blog/2012/05/10/setup-was-unable-to-verify-drive-c-while-installing-windows-nt4-terminal-server-on-vmware/</link><pubDate>Thu, 10 May 2012 13:56:29 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2012/05/10/setup-was-unable-to-verify-drive-c-while-installing-windows-nt4-terminal-server-on-vmware/</guid><description>&lt;p&gt;For a research project I tried to install Windows NT 4 Terminal Server on VMWare Workstation (version 8).&lt;/p&gt; &lt;p&gt;The setup would always fail however with the following error:&lt;/p&gt; &lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2012/05/image.webp" class="glightbox thickbox" data-type="image" data-gallery="post-2581"&gt;&lt;img loading="lazy" decoding="async" style="display: inline" title="Windows Terminal Server Setup" alt="Setup was unable to verify drive C:\ | Your computer may lack sufficient memory to carry out the verification, or your Windows Terminal Server CD-ROM may contain some corrupt files. | Press ENTER to continue" src="https://remkoweijnen.nl/blog/wp-content/uploads/2012/05/image_thumb.webp" width="415" height="228" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Obviously the installation doesn't really fail because of too little memory and neither is the installation disc (an iso file) corrupt, it's a bug.&lt;/p&gt;</description></item><item><title>Bit Shifting in PowerShell</title><link>https://remkoweijnen.nl/blog/2012/05/10/bit-shifting-in-powershell/</link><pubDate>Thu, 10 May 2012 12:14:36 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2012/05/10/bit-shifting-in-powershell/</guid><description>&lt;p&gt;&lt;img style="display: inline; float: right" align="right" src="http://upload.wikimedia.org/wikipedia/commons/thumb/5/5c/Rotate_left_logically.svg/210px-Rotate_left_logically.svg.png" width="129" height="86" /&gt;I needed to dome some &lt;a href="http://en.wikipedia.org/wiki/Bitwise_operation#Logical_shift"&gt;Bit Shifting&lt;/a&gt; in PowerShell but unfortunately PowerShell lacks operator for Bit Shifting. I searched the .NET Framework for anything that allows for bit shifting but was unable to find anything suitable.&lt;/p&gt; &lt;p&gt;I didn't want to revert to C# so I implemented shift left and shift right functions in PowerShell.&lt;/p&gt; &lt;p&gt;The code isn't really pretty and could probably be improved (comments/improvements are welcome!) but here goes (please note that I implemented for bit shifting a byte):&lt;/p&gt;</description></item><item><title>Cookie Error on Citrix XenApp</title><link>https://remkoweijnen.nl/blog/2012/03/29/cookie-error-on-citrix-xenapp/</link><pubDate>Thu, 29 Mar 2012 10:02:10 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2012/03/29/cookie-error-on-citrix-xenapp/</guid><description>&lt;p&gt;A user reported that the following error while visiting a website on a Citrix XenApp server:&lt;/p&gt; &lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2012/03/image26.webp" class="glightbox" data-type="image" data-gallery="post-2574"&gt;&lt;img loading="lazy" decoding="async" style="display: inline" title="Cookie Error" alt="You must have cookies enabled in order to user this tool. Please reload the page and try again." src="https://remkoweijnen.nl/blog/wp-content/uploads/2012/03/image_thumb26.webp" width="415" height="94" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;I tried adding the site to the Trusted Sites List and adding the url to the Per Site Privacy list:&lt;/p&gt; &lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2012/03/image27.webp" class="glightbox" data-type="image" data-gallery="post-2574"&gt;&lt;img loading="lazy" decoding="async" style="display: inline" title="image" alt="image" src="https://remkoweijnen.nl/blog/wp-content/uploads/2012/03/image_thumb27.webp" width="415" height="256" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;But this didn't work, but I noticed that the site was "flickering" a lot so I suspected that HDX Flash Acceleration was the problem.&lt;/p&gt;</description></item><item><title>Reset Root Password on Linux Virtual Appliance</title><link>https://remkoweijnen.nl/blog/2012/03/27/reset-root-password-on-linux-virtual-appliance/</link><pubDate>Tue, 27 Mar 2012 10:52:19 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2012/03/27/reset-root-password-on-linux-virtual-appliance/</guid><description>&lt;p&gt;I needed to login as root on a Linux based virtual appliance to do some troubleshooting. In my case the appliance was running Suse Linux Enterprise.&lt;/p&gt; &lt;p&gt;I booted the VA using the &lt;a href="http://www.ubuntu.com/download/ubuntu/download" target="_blank"&gt;Ubuntu Live CD&lt;/a&gt; and opened a Terminal. Then I used the cfdisk tool (sudo cfdisk /dev/sda) to view the partitions:&lt;/p&gt; &lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2012/03/image23.webp" class="glightbox" data-type="image" data-gallery="post-2567"&gt;&lt;img loading="lazy" decoding="async" style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="Terminal" border="0" alt="cfdisk /dev/sda" src="https://remkoweijnen.nl/blog/wp-content/uploads/2012/03/image_thumb23.webp" width="419" height="270" /&gt;&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Create Active Directory Group with PowerShell</title><link>https://remkoweijnen.nl/blog/2012/03/15/create-active-directory-group-with-powershell/</link><pubDate>Thu, 15 Mar 2012 15:51:23 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2012/03/15/create-active-directory-group-with-powershell/</guid><description>&lt;p&gt;If you want to Create an Active Directory group with PowerShell there are a few things you need to be aware of:&lt;/p&gt; &lt;p&gt;First of all there is no direct way to create new objects in Active Directory. You always need to bind to the Domain or an Organizational Unit and call the Create method.&lt;/p&gt; &lt;p&gt;Example:&lt;/p&gt; 
&lt;div class="codecard"&gt;
 &lt;div class="codehead"&gt;
 &lt;span class="codefile"&gt;&lt;/span&gt;
 &lt;span class="codetools" data-pagefind-ignore&gt;
 &lt;span class="codelang"&gt;powershell&lt;/span&gt;
 &lt;button class="codebtn" type="button" data-copy&gt;Copy&lt;/button&gt;
 &lt;a class="codebtn" download=".ps1" href="data:text/plain;charset=utf-8;base64,IyBCaW5kIHRvIE9VCiRvdSA9IFtBRFNJXSJMREFQOi8vT1U9T1U9R3JvdXBzLERDPUNvbnRvc28sREM9Q09NIgoKIyBDcmVhdGUgdGhlIEdyb3VwCiRncm91cCA9ICRvdS5DaGlsZHJlbi5BZGQoIkNOPVRlc3RHcm91cCIsICJHcm91cCIpCiRncm91cC5Db21taXRDaGFuZ2VzKCk="&gt;Download&lt;/a&gt;
 &lt;/span&gt;
 &lt;/div&gt;
 &lt;div class="codebody"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-powershell" data-lang="powershell"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c"&gt;# Bind to OU&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;$ou&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="no"&gt;ADSI&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;LDAP://OU=OU=Groups,DC=Contoso,DC=COM&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c"&gt;# Create the Group&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;$group&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="nv"&gt;$ou&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="py"&gt;Children&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="py"&gt;Add&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;CN=TestGroup&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;&amp;#34;Group&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;$group&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="py"&gt;CommitChanges&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;However the group is not yet complete:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2012/03/image22.webp" class="glightbox" data-type="image" data-gallery="post-2554"&gt;&lt;img loading="lazy" decoding="async" style="display: inline" title="TestGroup Properties" alt="Group name (pre-Windows 2000)" src="https://remkoweijnen.nl/blog/wp-content/uploads/2012/03/image_thumb22.webp" width="404" height="184" /&gt;&lt;/a&gt;&lt;/p&gt;</description></item><item><title>AuthorizationManager check failed when starting PowerShell</title><link>https://remkoweijnen.nl/blog/2012/03/15/authorizationmanager-check-failed-when-starting-powershell/</link><pubDate>Thu, 15 Mar 2012 14:03:18 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2012/03/15/authorizationmanager-check-failed-when-starting-powershell/</guid><description>&lt;p&gt;When Launching a PowerShell script I noticed the following error: "&lt;em&gt;AuthorizationManager check failed.&lt;/em&gt;"&lt;/p&gt; &lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2012/03/image21.webp" class="glightbox" data-type="image" data-gallery="post-2551"&gt;&lt;img loading="lazy" decoding="async" style="display: inline" title="PowerShell" alt="AuthorizationManager check failed.| At line:1 char:2 | Microsoft.PowerShell_profile.ps1&amp;#39;" src="https://remkoweijnen.nl/blog/wp-content/uploads/2012/03/image_thumb21.webp" width="415" height="117" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;This happens because either the Current User or the All Users PowerShell profile is empty.&lt;/p&gt;</description></item><item><title>Imprivata fails to logon with special characters in the password</title><link>https://remkoweijnen.nl/blog/2012/03/14/imprivata-fails-to-logon-with-special-characters-in-the-password/</link><pubDate>Wed, 14 Mar 2012 15:19:08 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2012/03/14/imprivata-fails-to-logon-with-special-characters-in-the-password/</guid><description>&lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2012/02/image17.webp" class="glightbox" data-type="image" data-gallery="post-2545"&gt;&lt;img loading="lazy" decoding="async" title="image" alt="image" align="right" src="https://remkoweijnen.nl/blog/wp-content/uploads/2012/02/image_thumb17.webp" width="42" height="53" /&gt;&lt;/a&gt;Interesting case today: customer uses Imprivate for two factor logon in combination with Citrix XenApp.&lt;/p&gt; &lt;p&gt;Users reported that logons failed after they had changed their password. After contacting the users we learned that this only happened with special characters in the password like ! and +.&lt;/p&gt; &lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2012/03/image20.webp" class="glightbox" data-type="image" data-gallery="post-2545"&gt;&lt;img loading="lazy" decoding="async" style="margin: 0px 5px 0px 0px; display: inline; float: left" title="image" alt="image" align="left" src="https://remkoweijnen.nl/blog/wp-content/uploads/2012/03/image_thumb20.webp" width="95" height="98" /&gt;&lt;/a&gt;To do the actual logon to Citrix Imprivata uses an executable which is actually an AutoIT script compiled to an executable.&lt;/p&gt; &lt;p&gt;After authentication the executable get's the password from the Imprivata Appliance.&lt;/p&gt; &lt;p&gt;I decompiled the executable to source and read the line that passes the password to XenApp:&lt;/p&gt;</description></item><item><title>Track who created the TreatAs registry key</title><link>https://remkoweijnen.nl/blog/2012/03/13/track-who-created-the-treatas-registry-key/</link><pubDate>Tue, 13 Mar 2012 13:41:56 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2012/03/13/track-who-created-the-treatas-registry-key/</guid><description>&lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2012/03/image14.webp" class="glightbox" data-type="image" data-gallery="post-2542"&gt;&lt;img loading="lazy" decoding="async" style="display: inline; float: right" title="image" alt="image" align="right" src="https://remkoweijnen.nl/blog/wp-content/uploads/2012/03/image_thumb14.webp" width="83" height="82" /&gt;&lt;/a&gt;Last week I wrote about an error message the users received when &lt;a href="https://remkoweijnen.nl/blog/2012/03/09/edit-document-requires-a-windows-sharepoint-services-compatible-application/" target="_blank"&gt;opening documents from SharePoint&lt;/a&gt;.&lt;/p&gt; &lt;p&gt;The article showed how to fix the problem but it didn't feel good that I didn't know where this "TreatAs" value was coming from.&lt;/p&gt; &lt;p&gt;I figured that I could read the timestamp key from the registry to see at what/date time the value was created. This value can be read using the &lt;a href="http://msdn.microsoft.com/en-us/library/ms724902%28VS.85%29.aspx" target="_blank"&gt;RegQueryInfoKey&lt;/a&gt; API but there are various tools that can read it. &lt;/p&gt;</description></item><item><title>Lync Client Password Recovery</title><link>https://remkoweijnen.nl/blog/2012/03/12/lync-client-password-recovery/</link><pubDate>Mon, 12 Mar 2012 23:25:51 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2012/03/12/lync-client-password-recovery/</guid><description>&lt;p&gt;I wrote a small tool that dumps all stored password for the Microsoft Lync Client that I'd like to share here.&lt;/p&gt; &lt;p&gt;It's a commandline tool that takes no arguments:&lt;/p&gt; &lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2012/03/SNAGHTML173c9066.webp" class="glightbox" data-type="image" data-gallery="post-2529"&gt;&lt;img loading="lazy" decoding="async" style="display: inline" title="Screenshot" alt="Lync Password Dumper" src="https://remkoweijnen.nl/blog/wp-content/uploads/2012/03/SNAGHTML173c9066_thumb.webp" width="415" height="210" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Have fun with it!&lt;/p&gt;</description></item><item><title>Edit Document requires a Windows SharePoint Services-compatible application</title><link>https://remkoweijnen.nl/blog/2012/03/09/edit-document-requires-a-windows-sharepoint-services-compatible-application/</link><pubDate>Fri, 09 Mar 2012 14:23:11 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2012/03/09/edit-document-requires-a-windows-sharepoint-services-compatible-application/</guid><description>&lt;p&gt;Today I was troubleshooting a message that appeared when a user tries to edit a document from SharePoint on a Citrix XenApp server. &lt;p&gt;The user browsed to a word document on Sharepoint and selected &amp;ldquo;Edit in Microsoft Office Word&amp;rdquo; from the Combobox:&lt;/p&gt; &lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2012/03/image8.webp" class="glightbox" data-type="image" data-gallery="post-2526"&gt;&lt;img loading="lazy" decoding="async" style="display: inline" title="Sharepoint Document Context Menu" alt="Edit in Microsoft Office Word" src="https://remkoweijnen.nl/blog/wp-content/uploads/2012/03/image_thumb8.webp" width="156" height="124" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;This would present the following error message to the user:&lt;/p&gt; &lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2012/03/image9.webp" class="glightbox" data-type="image" data-gallery="post-2526"&gt;&lt;img loading="lazy" decoding="async" style="display: inline" title="Windows Internet Explorer" alt="&amp;#39;Edit Document&amp;#39; requires a Windows SharePoint Services-compatible application and Microsoft Internet Explorer 6.0 or greater." src="https://remkoweijnen.nl/blog/wp-content/uploads/2012/03/image_thumb9.webp" width="415" height="73" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;/p&gt;</description></item><item><title>Running multiple instances of Lync (howto)</title><link>https://remkoweijnen.nl/blog/2012/03/07/running-multiple-instances-of-lync-howto/</link><pubDate>Wed, 07 Mar 2012 22:55:37 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2012/03/07/running-multiple-instances-of-lync-howto/</guid><description>&lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2012/03/image4.webp" class="glightbox" data-type="image" data-gallery="post-2513"&gt;&lt;img loading="lazy" decoding="async" style="margin: 0px 0px 0px 5px; display: inline; float: right" title="image" alt="image" align="right" src="https://remkoweijnen.nl/blog/wp-content/uploads/2012/03/image_thumb4.webp" width="58" height="59" /&gt;&lt;/a&gt;Yesterday I showed a &lt;a href="https://remkoweijnen.nl/blog/2012/03/06/run-multiple-instances-of-lync-2010poc/" target="_blank"&gt;video&lt;/a&gt; demonstrating it's possible to run multiple instances of the Microsoft Lync 2010 client simultaneously.&lt;/p&gt; &lt;p&gt;A little warning before we go on: the Lync Client was not designed to run with multiple instances. Or better said: it was designed specifically to prevent this, let's see how it does this:&lt;/p&gt; &lt;p&gt;On startup Lync calls an internal function called COcAppNoUI::InitializeMainInstance. In this function it creates a &lt;a href="http://msdn.microsoft.com/en-us/library/windows/desktop/ms684266(v=vs.85).aspx" target="_blank"&gt;Mutex&lt;/a&gt; named "Office Communicator_" in the Global &lt;a href="https://remkoweijnen.nl/blog/2009/01/27/accessing-kernel-objects-in-other-sessions/" target="_blank"&gt;namespace&lt;/a&gt;. It also creates an &lt;a href="http://msdn.microsoft.com/en-us/library/windows/desktop/ms682655(v=vs.85).aspx" target="_blank"&gt;Event&lt;/a&gt; in the Global namespace called "COMMUNICATOR-".&lt;/p&gt; &lt;p&gt;When a second instance of Lync is launched it checks if the Global Mutex exists and if it does it fires the Global Event. The Main instance has a thread that waits for this event using the &lt;a href="http://msdn.microsoft.com/en-us/library/windows/desktop/ms687025(v=vs.85).aspx" target="_blank"&gt;WaitForMultipleObjects&lt;/a&gt; API.&lt;/p&gt;</description></item><item><title>Run multiple instances of Lync 2010–POC</title><link>https://remkoweijnen.nl/blog/2012/03/06/run-multiple-instances-of-lync-2010poc/</link><pubDate>Tue, 06 Mar 2012 19:27:23 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2012/03/06/run-multiple-instances-of-lync-2010poc/</guid><description>&lt;p&gt;This video shows that's it's possible to run multiple instances of the Lync 2010 client.&lt;/p&gt; &lt;p&gt;I am running natively, so I am not using ThinApp or App-V.&lt;/p&gt; &lt;p&gt;I will follow this up later with a how-to blog.&lt;/p&gt; &lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:5737277B-5D6D-4f48-ABFC-DD9C333F4C5D:142380b4-b3cf-478d-8e12-1b26e428710d" class="wlWriterEditableSmartContent"&gt;&lt;div&gt;&lt;object width="448" height="252"&gt;&lt;param name="movie" value="http://www.youtube.com/v/3yDmZotaQCY?hl=en&amp;amp;hd=1"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/3yDmZotaQCY?hl=en&amp;amp;hd=1" type="application/x-shockwave-flash" width="448" height="252"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;/div&gt;&lt;div style="width:448px;clear:both;font-size:.8em"&gt;Running Multiple Instances of Lync 2010&lt;/div&gt;&lt;/div&gt;
&lt;section class="comments"&gt;
&lt;h2&gt;1 Comments&lt;/h2&gt;
&lt;ol class="comment-list"&gt;
&lt;li class="comment depth-0"&gt;&lt;div class="comment-meta"&gt;&lt;span class="comment-author"&gt;FaeLLe&lt;/span&gt; &lt;time datetime="2012-10-09"&gt;Oct 9, 2012&lt;/time&gt;&lt;/div&gt;&lt;div class="comment-body"&gt;&lt;p&gt;So how did you manage it mate?&lt;/p&gt;</description></item><item><title>PowerShell script to read Agent Guid from Automation Manager</title><link>https://remkoweijnen.nl/blog/2012/03/06/powershell-script-to-read-agent-guid-from-automation-manager/</link><pubDate>Tue, 06 Mar 2012 16:00:06 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2012/03/06/powershell-script-to-read-agent-guid-from-automation-manager/</guid><description>&lt;p&gt;From a script I needed to schedule a project in RES Automation Manager 2011 for a particular server.&lt;/p&gt; &lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2012/03/image2.webp" class="glightbox" data-type="image" data-gallery="post-2500"&gt;&lt;img loading="lazy" decoding="async" style="margin: 0px 3px 6px 0px; display: inline; float: left" title="image" alt="image" align="left" src="https://remkoweijnen.nl/blog/wp-content/uploads/2012/03/image_thumb2.webp" width="65" height="65" /&gt;&lt;/a&gt;This can be done with the WMC.exe commandline tool as documented in the &lt;a href="http://support.ressoftware.com/automationmanageradminguide/15833.htm" target="_blank"&gt;Admin Guide&lt;/a&gt;. However we must specify the agent's GUID instead of it's name. We can of course use the AM console to get the agent's GUID but it's more flexible to script this.&lt;/p&gt; &lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2012/03/image3.webp" class="glightbox" data-type="image" data-gallery="post-2500"&gt;&lt;img loading="lazy" decoding="async" style="display: inline; float: right" title="image" alt="image" align="right" src="https://remkoweijnen.nl/blog/wp-content/uploads/2012/03/image_thumb3.webp" width="78" height="121" /&gt;&lt;/a&gt;Unfortunately there's no API we can call so I am directly quering the AM database using a PowerShell script.&lt;/p&gt; &lt;p&gt;The script read the database server and database name from the registry so it assumes you have the AM console installed.&lt;/p&gt;</description></item><item><title>PowerShell RegEx Fun</title><link>https://remkoweijnen.nl/blog/2012/03/06/powershell-regex-fun/</link><pubDate>Tue, 06 Mar 2012 11:19:53 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2012/03/06/powershell-regex-fun/</guid><description>&lt;p&gt;I am writing a script that is going to automate a number of manual steps involved in creating a new image with Citrix PVS.&lt;/p&gt; &lt;p&gt;First step is to copy the most recent base image which is kept in a folder structure. The folder name is always YYYY-MM-DD (description): &lt;/p&gt; &lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2012/03/image1.webp" class="glightbox" data-type="image" data-gallery="post-2493"&gt;&lt;img loading="lazy" decoding="async" style="display: inline" title="image" alt="image" src="https://remkoweijnen.nl/blog/wp-content/uploads/2012/03/image_thumb1.webp" width="252" height="71" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;I needed to determine the most recent folder and didn't want to rely on creation date. Instead I walk the directory tree and filter the date out of the filename with a regular expression:&lt;/p&gt;</description></item><item><title>Windows 8 comes with free hardware/software inventory tool</title><link>https://remkoweijnen.nl/blog/2012/03/01/windows-8-comes-with-free-hardwaresoftware-inventory-tool/</link><pubDate>Thu, 01 Mar 2012 11:26:44 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2012/03/01/windows-8-comes-with-free-hardwaresoftware-inventory-tool/</guid><description>&lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2012/03/image.webp" class="glightbox" data-type="image" data-gallery="post-2490"&gt;&lt;img loading="lazy" decoding="async" style="display: inline; float: right" title="image" alt="image" align="right" src="https://remkoweijnen.nl/blog/wp-content/uploads/2012/03/image_thumb.webp" width="40" height="35" /&gt;&lt;/a&gt;Yesterday I wrote about the Windows 8 CP &lt;a href="https://remkoweijnen.nl/blog/2012/02/29/undocumented-commandline-switches-for-windows-8-cp/" target="_blank"&gt;WebSetup installer&lt;/a&gt; and told you that the Application Compatibility check creates a few XML files in the folder &lt;a href="file:///%UserProfile%/AppData/Local/Microsoft/WebSetup/Panther" target="_blank"&gt;%AppData%\Local\Microsoft\WebSetup\Panther&lt;/a&gt;.&lt;/p&gt; &lt;p&gt;So what can we do with them?&lt;/p&gt; &lt;p&gt;The XML files are created by a separate exe in the WebsetupExpanded folder called WicaInventory.exe with the arguments: /apps /fast /ext "exe,sys" /output &amp;lt;XML file&amp;gt; /log &amp;lt;LOG file&amp;gt;&lt;/p&gt; &lt;p&gt;In my case the commandline was:&lt;/p&gt; 
&lt;div class="codecard"&gt;
 &lt;div class="codehead"&gt;
 &lt;span class="codefile"&gt;&lt;/span&gt;
 &lt;span class="codetools" data-pagefind-ignore&gt;
 &lt;span class="codelang"&gt;batch&lt;/span&gt;
 &lt;button class="codebtn" type="button" data-copy&gt;Copy&lt;/button&gt;
 &lt;a class="codebtn" download=".bat" href="data:text/plain;charset=utf-8;base64,V2ljYUludmVudG9yeS5leGUgL2FwcHMgL2Zhc3QgL2V4dCAiZXhlLHN5cyIgL291dHB1dCAiQzpcVXNlcnNccndlaWpuZW5cQXBwRGF0YVxMb2NhbFxNaWNyb3NvZlxXZWJTZXR1cFxQYW50aGVyXFdJQ0FfUHJvZ3JhbXNfUkVNS09MQVBUT1AueG1sIiAvbG9nICJDOlxVc2Vyc1xyd2Vpam5lblxBcHBEYXRhXExvY2FsXE1pY3Jvc29mdFxXZWJTZXR1cFxQYW50aGVyIiAiYzpcVXNlcnNccndlaWpuZW5cQXBwRGF0YVxMb2NhbFxUZW1wXDFmZDUyYjViLTI2MDktNDE1Ni1hYzAyLTQ5ZGNhMjdhMGE4ZFxXZWJTZXR1cEV4cGFuZGVkIg=="&gt;Download&lt;/a&gt;
 &lt;/span&gt;
 &lt;/div&gt;
 &lt;div class="codebody"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-batch" data-lang="batch"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;WicaInventory.exe /apps /fast /ext &lt;span class="s2"&gt;&amp;#34;exe,sys&amp;#34;&lt;/span&gt; /output &lt;span class="s2"&gt;&amp;#34;C:\Users\rweijnen\AppData\Local\Microsof\WebSetup\Panther\WICA_Programs_REMKOLAPTOP.xml&amp;#34;&lt;/span&gt; /log &lt;span class="s2"&gt;&amp;#34;C:\Users\rweijnen\AppData\Local\Microsoft\WebSetup\Panther&amp;#34;&lt;/span&gt; &lt;span class="s2"&gt;&amp;#34;c:\Users\rweijnen\AppData\Local\Temp\1fd52b5b-2609-4156-ac02-49dca27a0a8d\WebSetupExpanded&amp;#34;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Let's see what's in WICA_Programs_REMKOLAPTOP.xml.&lt;/p&gt;
&lt;p&gt;&amp;#160;&lt;/p&gt;</description></item><item><title>Undocumented commandline switches for Windows 8 CP</title><link>https://remkoweijnen.nl/blog/2012/02/29/undocumented-commandline-switches-for-windows-8-cp/</link><pubDate>Wed, 29 Feb 2012 23:29:18 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2012/02/29/undocumented-commandline-switches-for-windows-8-cp/</guid><description>&lt;p&gt;The Windows 8 Consumer Preview is downloaded as a Web Installer called Windows8-ConsumerPreview-setup.exe.&lt;/p&gt; &lt;p&gt;On my system the Web Installer crashed while checking Application Compatibility:&lt;/p&gt; &lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2012/02/image22.webp" class="glightbox" data-type="image" data-gallery="post-2483"&gt;&lt;img loading="lazy" decoding="async" style="display: inline" title="image" alt="image" src="https://remkoweijnen.nl/blog/wp-content/uploads/2012/02/image_thumb22.webp" width="298" height="234" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;I clicked the Debug option and launched the Visual Studio debugger: &lt;br /&gt;&lt;/p&gt;</description></item><item><title>Convert MCli output into PowerShell Objects</title><link>https://remkoweijnen.nl/blog/2012/02/29/convert-mcli-output-into-powershell-objects/</link><pubDate>Wed, 29 Feb 2012 21:35:49 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2012/02/29/convert-mcli-output-into-powershell-objects/</guid><description>&lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2012/02/image21.webp" class="glightbox" data-type="image" data-gallery="post-2468"&gt;&lt;img loading="lazy" decoding="async" style="display: inline; float: right" title="image" alt="image" align="right" src="https://remkoweijnen.nl/blog/wp-content/uploads/2012/02/image_thumb21.webp" width="83" height="83" /&gt;&lt;/a&gt;I was experimenting today with the PowerShell cmdlets for Citrix Provisioning Server. I was surprised to learn that the output of these cmdlets are not PowerShell types such as collections and objects with methods and properties but just plain text output.&lt;/p&gt; &lt;p&gt;A google search for a method to quickly convert the garbage output to objects led me to &lt;a href="http://www.out-web.net/?p=599" target="_blank"&gt;this blog post&lt;/a&gt; by Frank Peter. He describes a clever use of the switch statement with regular expressions with the Get-DiskInfo cmdlet.&lt;/p&gt; &lt;p&gt;Using Frank's code as a basis I wrote a generic function that converts Mcli output to an array of objects.&lt;/p&gt;</description></item><item><title>Switching to the Services Session</title><link>https://remkoweijnen.nl/blog/2012/02/24/switching-to-the-services-session/</link><pubDate>Fri, 24 Feb 2012 14:49:21 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2012/02/24/switching-to-the-services-session/</guid><description>&lt;p&gt;Just read a tweet from &lt;a href="http://twitter.com/andyjmorgan" target="_blank"&gt;@andyjmorgan&lt;/a&gt; about &lt;a href="http://twitter.com/andyjmorgan/statuses/173033102514462720" target="_blank"&gt;Interactive Service Detection&lt;/a&gt;. This made me remember that it's possible to switch to the Session 0 with an undocumented api in winsta.dll.&lt;/p&gt; &lt;p&gt;For this API to work you must have the Interactive Services Detection (UI0Detect) service running.&lt;/p&gt;</description></item><item><title>Where to download TraceView</title><link>https://remkoweijnen.nl/blog/2012/02/22/where-to-download-traceview/</link><pubDate>Wed, 22 Feb 2012 13:57:29 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2012/02/22/where-to-download-traceview/</guid><description>&lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2012/02/image19.webp" class="glightbox" data-type="image" data-gallery="post-2461"&gt;&lt;img loading="lazy" decoding="async" style="margin: 0px 0px 0px 5px; display: inline; float: right" title="TraceView Icon" alt="TraceView Icon" align="right" src="https://remkoweijnen.nl/blog/wp-content/uploads/2012/02/image_thumb19.webp" width="48" height="48" /&gt;&lt;/a&gt;Various Citrix knowledge base articles refer to a tool called TraceView.exe to view the output of diagnostic traces.&lt;/p&gt; &lt;p&gt;&lt;a href="http://support.citrix.com/article/CTX106233" target="_blank"&gt;CTX106233&lt;/a&gt; describes where to download traceview but this article is outdated because it describes an older version of the DDK (the Windows Driver Development).&lt;/p&gt; &lt;p&gt;The current DDK version (7.1.0) can be downloaded &lt;a href="http://www.microsoft.com/download/en/details.aspx?displaylang=en&amp;amp;id=11800" target="_blank"&gt;here&lt;/a&gt; and has the filename "GRMWDK_EN_7600_1.ISO".&lt;/p&gt;</description></item><item><title>Shutdown option on the logonscreen with Imprivata Onesign</title><link>https://remkoweijnen.nl/blog/2012/02/21/shutdown-option-on-the-logonscreen-with-imprivata-onesign/</link><pubDate>Tue, 21 Feb 2012 16:12:12 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2012/02/21/shutdown-option-on-the-logonscreen-with-imprivata-onesign/</guid><description>&lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2012/02/image17.webp" class="glightbox" data-type="image" data-gallery="post-2456"&gt;&lt;img loading="lazy" decoding="async" style="display: inline; float: right" title="image" alt="image" align="right" src="https://remkoweijnen.nl/blog/wp-content/uploads/2012/02/image_thumb17.webp" width="42" height="53" /&gt;&lt;/a&gt;I logged remotely to a server with RDP and I noticed that&amp;#160; I had options to restart or shutdown that server. This means we can shutdown or restart a server without physical access and without authentication:&lt;/p&gt; &lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2012/02/image18.webp" class="glightbox" data-type="image" data-gallery="post-2456"&gt;&lt;img loading="lazy" decoding="async" style="display: block; float: none; margin-left: auto; margin-right: auto" title="Log On to Windows" alt="Windows Server 2003 Logon Screen | Imprivata | Shutdown | REstart" src="https://remkoweijnen.nl/blog/wp-content/uploads/2012/02/image_thumb18.webp" width="209" height="177" /&gt;&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Session freeze when starting Excel</title><link>https://remkoweijnen.nl/blog/2012/02/20/session-freeze-when-starting-excel/</link><pubDate>Mon, 20 Feb 2012 15:42:25 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2012/02/20/session-freeze-when-starting-excel/</guid><description>&lt;p&gt;&lt;strong&gt;Environment&lt;/strong&gt; &lt;br /&gt;Windows 2003 Enterprise (32 bit), Citrix XenApp 5, RES Workspace Manager 2011, McAfee VirusScan Enterprise 8.7.0i.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Problem&lt;/strong&gt; &lt;br /&gt;When a opening an Excel workbook from Sharepoint the whole session freezes.&lt;/p&gt; &lt;p&gt;I asked the user to open an Excel workbook from Sharepoint and I noticed the following popup:&lt;/p&gt; &lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2012/02/image7.webp" class="glightbox" data-type="image" data-gallery="post-2450"&gt;&lt;img loading="lazy" decoding="async" style="display: inline" title="Message from webpage" alt="Some files can harm your computer. If the file information looks suspicious or you do not fully trust the source, do not open the file | You are opening the following file: | File name: My Workbook.xls | From: Sharepoint" src="https://remkoweijnen.nl/blog/wp-content/uploads/2012/02/image_thumb7.webp" width="415" height="97" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;So my first thought was that the user somehow clicked this message to the background and IE was waiting for a response.&lt;/p&gt;</description></item><item><title>Change CD/DVD drive letter with RES Automation Manager</title><link>https://remkoweijnen.nl/blog/2012/02/17/change-cddvd-drive-letter-with-res-automation-manager/</link><pubDate>Fri, 17 Feb 2012 15:04:34 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2012/02/17/change-cddvd-drive-letter-with-res-automation-manager/</guid><description>&lt;p&gt;I needed to change the drive letter assigned to the cd/dvd station from an Automation Manager project.&lt;/p&gt; &lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2012/02/image2.webp" class="glightbox" data-type="image" data-gallery="post-2429"&gt;&lt;img loading="lazy" decoding="async" style="display: inline; float: right" title="DVD Drive" alt="DVD Drive Icon" align="right" src="https://remkoweijnen.nl/blog/wp-content/uploads/2012/02/image_thumb2.webp" width="68" height="67" /&gt;&lt;/a&gt;Although most systems only have one cd/dvd drive, some machines might be equipped with multiple drives.&lt;/p&gt; &lt;p&gt;A couple of years ago I wrote a tool called &lt;a href="https://remkoweijnen.nl/blog/2010/10/20/change-driveletter-commandline-tool/" target="_blank"&gt;ChDrvLetter&lt;/a&gt; that can assign a specific drive letter to a partition given it's volumename. In that tool I also included an option for CD/DVD drives.&lt;/p&gt; &lt;p&gt;Using the CDROM [Letters] parameter you can assign specific letters to the CD/DVD drives.&lt;/p&gt;</description></item><item><title>Script to Get Computer OU</title><link>https://remkoweijnen.nl/blog/2012/02/14/script-to-get-computer-ou/</link><pubDate>Tue, 14 Feb 2012 11:12:30 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2012/02/14/script-to-get-computer-ou/</guid><description>&lt;p&gt;Just some quick code to get the OU Name of the computer we run the script on.&lt;/p&gt;
&lt;p&gt;VBS:&lt;/p&gt;
&lt;div class="codecard"&gt;
 &lt;div class="codehead"&gt;
 &lt;span class="codefile"&gt;&lt;/span&gt;
 &lt;span class="codetools" data-pagefind-ignore&gt;
 &lt;span class="codelang"&gt;vbnet&lt;/span&gt;
 &lt;button class="codebtn" type="button" data-copy&gt;Copy&lt;/button&gt;
 &lt;a class="codebtn" download=".vb" href="data:text/plain;charset=utf-8;base64,RnVuY3Rpb24gR2V0Q29tcHV0ZXJPVQoJRGltIG9ialN5c0luZm86IFNldCBvYmpTeXNJbmZvID0gQ3JlYXRlT2JqZWN0KCJBRFN5c3RlbUluZm8iKQoJRGltIG9iakNvbXB1dGVyOiBTZXQgb2JqQ29tcHV0ZXIgPSBHZXRPYmplY3QoIkxEQVA6Ly8iICYgb2JqU3lzSW5mby5Db21wdXRlck5hbWUpCglEaW0gb2JqT1UgOiBTZXQgb2JqT1UgPSBHZXRPYmplY3Qob2JqQ29tcHV0ZXIuUGFyZW50KQoJR2V0Q29tcHV0ZXJPVSA9IG9iak9VLk9VCkVuZCBGdW5jdGlvbgoKV3NjcmlwdC5FY2hvIEdldENvbXB1dGVyT1U="&gt;Download&lt;/a&gt;
 &lt;/span&gt;
 &lt;/div&gt;
 &lt;div class="codebody"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-vbnet" data-lang="vbnet"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;Function&lt;/span&gt; &lt;span class="nf"&gt;GetComputerOU&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;	&lt;span class="k"&gt;Dim&lt;/span&gt; &lt;span class="n"&gt;objSysInfo&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="k"&gt;Set&lt;/span&gt; &lt;span class="n"&gt;objSysInfo&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;CreateObject&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;&amp;#34;ADSystemInfo&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;	&lt;span class="k"&gt;Dim&lt;/span&gt; &lt;span class="n"&gt;objComputer&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="k"&gt;Set&lt;/span&gt; &lt;span class="n"&gt;objComputer&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;GetObject&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;&amp;#34;LDAP://&amp;#34;&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&lt;/span&gt; &lt;span class="n"&gt;objSysInfo&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;ComputerName&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;	&lt;span class="k"&gt;Dim&lt;/span&gt; &lt;span class="n"&gt;objOU&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="k"&gt;Set&lt;/span&gt; &lt;span class="n"&gt;objOU&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;GetObject&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;objComputer&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Parent&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;	&lt;span class="n"&gt;GetComputerOU&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;objOU&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;OU&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;End&lt;/span&gt; &lt;span class="k"&gt;Function&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;Wscript&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Echo&lt;/span&gt; &lt;span class="n"&gt;GetComputerOU&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;PowerShell:&lt;/p&gt;
&lt;div class="codecard"&gt;
 &lt;div class="codehead"&gt;
 &lt;span class="codefile"&gt;&lt;/span&gt;
 &lt;span class="codetools" data-pagefind-ignore&gt;
 &lt;span class="codelang"&gt;powershell&lt;/span&gt;
 &lt;button class="codebtn" type="button" data-copy&gt;Copy&lt;/button&gt;
 &lt;a class="codebtn" download=".ps1" href="data:text/plain;charset=utf-8;base64,ZnVuY3Rpb24gR2V0Q29tcHV0ZXJPVQp7CgkkU3lzSW5mbyA9IE5ldy1PYmplY3QgLUNvbU9iamVjdCAiQURTeXN0ZW1JbmZvIgoJJENvbXB1dGVyID0gW0FEU0ldKCJMREFQOi8vezB9IiAtZiAkU3lzSW5mby5HZXRUeXBlKCkuSW52b2tlTWVtYmVyKCJDb21wdXRlck5hbWUiLCBbU3lzdGVtLlJlZmxlY3Rpb24uQmluZGluZ0ZsYWdzXTo6R2V0UHJvcGVydHksICRudWxsLCAkU3lzSW5mbywgJG51bGwpKQoJcmV0dXJuIChbQURTSV0kQ29tcHV0ZXIuUGFyZW50KS5PVQp9CgpHZXRDb21wdXRlck9V"&gt;Download&lt;/a&gt;
 &lt;/span&gt;
 &lt;/div&gt;
 &lt;div class="codebody"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-powershell" data-lang="powershell"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="kd"&gt;function&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;GetComputerOU&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;	&lt;span class="nv"&gt;$SysInfo&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;New-Object&lt;/span&gt; &lt;span class="n"&gt;-ComObject&lt;/span&gt; &lt;span class="s2"&gt;&amp;#34;ADSystemInfo&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;	&lt;span class="nv"&gt;$Computer&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="no"&gt;ADSI&lt;/span&gt;&lt;span class="p"&gt;](&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;LDAP://{0}&amp;#34;&lt;/span&gt; &lt;span class="o"&gt;-f&lt;/span&gt; &lt;span class="nv"&gt;$SysInfo&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="py"&gt;GetType&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="py"&gt;InvokeMember&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;ComputerName&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="no"&gt;System.Reflection.BindingFlags&lt;/span&gt;&lt;span class="p"&gt;]::&lt;/span&gt;&lt;span class="n"&gt;GetProperty&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="vm"&gt;$null&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;$SysInfo&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="vm"&gt;$null&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;	&lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;([&lt;/span&gt;&lt;span class="no"&gt;ADSI&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="nv"&gt;$Computer&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Parent&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="py"&gt;OU&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;GetComputerOU&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;/div&gt;</description></item><item><title>Scripting Citrix Online Plugin Settings</title><link>https://remkoweijnen.nl/blog/2012/02/13/scripting-citrix-online-plugin-settings/</link><pubDate>Mon, 13 Feb 2012 13:55:45 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2012/02/13/scripting-citrix-online-plugin-settings/</guid><description>&lt;p&gt;The Citrix Online Plugin has a number of settings that can be changed. This includes things as Window Size and Color Depth:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2012/02/SNAGHTML84f9096.webp" class="glightbox" data-type="image" data-gallery="post-2404"&gt;&lt;img loading="lazy" decoding="async" style="display: inline;" title="Options - Citrix online plug-in" src="https://remkoweijnen.nl/blog/wp-content/uploads/2012/02/SNAGHTML84f9096_thumb.webp" alt="Session Options | Window size | Default | Full Screen | Requested Color Quality" width="415" height="280" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;In my case I wanted to preset the Window size to Full Screen so using Process Monitor I checked where the Online Plugin writes this setting. I Used a Filter that includes only the Online Plugin (PNAMain.exe) and the RegSetValue Operation:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2012/02/SNAGHTML8593f5c.webp" class="glightbox" data-type="image" data-gallery="post-2404"&gt;&lt;img loading="lazy" decoding="async" style="display: inline;" title="Process Monitor Filter" src="https://remkoweijnen.nl/blog/wp-content/uploads/2012/02/SNAGHTML8593f5c_thumb.webp" alt="Filter on Process Name is PNAMain.exe | Operation is RegSetValue" width="415" height="259" /&gt;&lt;/a&gt;&lt;/p&gt;</description></item><item><title>The XLSploit explained</title><link>https://remkoweijnen.nl/blog/2012/02/12/the-xlsploit-explained/</link><pubDate>Sun, 12 Feb 2012 23:36:34 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2012/02/12/the-xlsploit-explained/</guid><description>&lt;p&gt;Recently I published a &lt;a href="https://remkoweijnen.nl/blog/2012/01/27/bypassing-res-application-security/" target="_blank"&gt;Proof of Concept&lt;/a&gt; that showed it was possible to launch unauthorized processes with both AppSense Application Manager and RES Workspace Manager.&lt;/p&gt;
&lt;p&gt;Although I didn&amp;rsquo;t test Microsoft Applocker I have no doubt at all that we couldn&amp;rsquo;t bypass it.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2012/02/image1.webp" class="glightbox" data-type="image" data-gallery="post-2392"&gt;&lt;img loading="lazy" decoding="async" style="display: inline; float: right;" title="image" src="https://remkoweijnen.nl/blog/wp-content/uploads/2012/02/image_thumb1.webp" alt="image" width="100" height="97" align="right" /&gt;&lt;/a&gt;I have named my Proof of Concept the &lt;strong&gt;XLSploit&lt;/strong&gt; because I am using Excel as a trampoline. I choose Excel because this is generally a trusted process and VBA offers access to the Windows API that is needed.&lt;/p&gt;
&lt;p&gt;After publishing the XLSploit I have talked to both &lt;a href="http://www.ressoftware.com/" target="_blank"&gt;RES&lt;/a&gt; and &lt;a href="http://www.appsense.com/" target="_blank"&gt;AppSense&lt;/a&gt; and not that they both have a response to my Proof of Concept, I consider it safe to tell a little more about how it works.&lt;/p&gt;
&lt;p&gt;If you are merely interested in stopping the XLSploit, please scroll down to the end of the article.&lt;/p&gt;</description></item><item><title>Hibernation fails in Windows 7</title><link>https://remkoweijnen.nl/blog/2012/02/10/hibernation-fails-in-windows-7/</link><pubDate>Fri, 10 Feb 2012 22:40:46 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2012/02/10/hibernation-fails-in-windows-7/</guid><description>&lt;p&gt;&lt;img style="display: inline; float: right" align="right" src="http://4.bp.blogspot.com/_xZlqc9CDR-Q/TTmOZOl7OSI/AAAAAAAAADU/0N5ruIdeUcg/s1600/hibernate.gif" width="94" height="89" /&gt;A while ago my Windows 7 laptop suddenly refused to go into Hibernation. The strange thing was that the whole process of saving memory to the hibernate file seemed to work correctly. The screen would go black and there was lots of disk activity. Then after the disk activity finished the system would return to the logon screen.&lt;/p&gt; &lt;p&gt;A Google on this issue learned that the most likely cause was a driver preventing the system from going into hibernation. Using the cmdline "&lt;em&gt;powercfg -DEVICEQUERY wake_armed&lt;/em&gt;" we can check if there are any devices that can wake the system. Another useful parameter is &lt;em&gt;-ENERGY&lt;/em&gt; which generates an html report file.&lt;/p&gt; &lt;p&gt;But in my case this lead to nothing.&lt;/p&gt;</description></item><item><title>Speed up Windows 7 Resume by 20%</title><link>https://remkoweijnen.nl/blog/2012/02/10/speed-up-windows-7-resume-by-20/</link><pubDate>Fri, 10 Feb 2012 21:54:37 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2012/02/10/speed-up-windows-7-resume-by-20/</guid><description>&lt;p&gt;&lt;img style="margin: 0px 0px 0px 7px; display: inline; float: right;" src="http://img507.imageshack.us/img507/9686/38779131.jpg" alt="" width="53" height="71" align="right" /&gt;&lt;strong&gt;UPDATE:&lt;/strong&gt; See this &lt;a href="http://helgeklein.com/blog/2012/02/what-remains-of-magic-speed-improvements/" target="_blank"&gt;new article&lt;/a&gt; by Helge Klein.&lt;/p&gt;
&lt;p&gt;Recently Helge Klein wrote a blog titled &lt;a href="http://helgeklein.com/blog/2012/02/how-to-speed-up-your-windows-7-boot-time-by-20/" target="_blank"&gt;How to Speed Up Your Windows 7 Boot Time by 20%&lt;/a&gt;. He does this by disabling the graphical animation that Windows 7 displays while booting.&lt;/p&gt;
&lt;p&gt;After applying this tweak I noticed that a resume from hibernation (which I do far more often than a full boot) still showed the graphical animation (and wasn&amp;rsquo;t speed up).&lt;/p&gt;
&lt;p&gt;So how to disable the animation while resuming?&lt;/p&gt;</description></item><item><title>Harmony Client crashes upon exit</title><link>https://remkoweijnen.nl/blog/2012/01/31/harmony-client/</link><pubDate>Tue, 31 Jan 2012 16:37:08 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2012/01/31/harmony-client/</guid><description>&lt;p&gt;Today I was troubleshooting the application "Harmony Client" which crashed upon exiting:&lt;/p&gt; &lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2012/01/image21.webp" class="glightbox" data-type="image" data-gallery="post-2368"&gt;&lt;img loading="lazy" decoding="async" style="display: inline" title="HARMONY_Client.exe - Toepassingsfout" alt="Toepassingspop-up: HARMONY_Client.exe - Toepassingsfout : De instructie op 0x77e621b6 verwijst naar geheugen op 0x4b750000. Een lees- of schrijfbewerking op het geheugen is mislukt: | The memory could not be read." src="https://remkoweijnen.nl/blog/wp-content/uploads/2012/01/image_thumb21.webp" width="415" height="84" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;The application had been thinapped and the error only appeared when starting the thinapped version. &lt;br /&gt;&lt;/p&gt;</description></item><item><title>Bypassing RES/Appsense Application Security</title><link>https://remkoweijnen.nl/blog/2012/01/27/bypassing-res-application-security/</link><pubDate>Fri, 27 Jan 2012 16:15:38 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2012/01/27/bypassing-res-application-security/</guid><description>&lt;p&gt;The video below shows a Proof of Concept of bypassing Application Security in RES Workspace Manager .&lt;/p&gt;
&lt;p&gt;Please note that at this time the code is not publicly available so please don&amp;rsquo;t ask for it.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;EDIT 2&lt;/strong&gt;: I added a video that I received from someone who tried my Excel Sheet with AppSense Application Manager.&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;&lt;strong&gt;EDIT:&lt;/strong&gt; I wanted to clarify a couple of things regarding this post.&lt;/p&gt;
&lt;p&gt;First of all I would like to explain why I wrote this code and why I choose to test it with RES WM.&lt;/p&gt;
&lt;p&gt;I had the idea about this approach a long time ago but I never got around to actually do it. The main reason was that I needed to convert Delphi code to VBA and especially converting some Windows headers was a lot of work. Then suddenly I noticed that someone had already converted the headers, so I all I had to do was rewrite the code that used it to VBA.&lt;/p&gt;
&lt;p&gt;The choice for RES was made because of two reasons:&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;If you want to beat something, you want to beat the best and I most certainly consider RES WM to be one of the top products.&lt;/li&gt;
	&lt;li&gt;At the time I wrote the POC code I had access to an enviroment with RES in it.&lt;/li&gt;
&lt;/ol&gt;
I would like to emphasize that RES contacted me very quickly after publishing this blog. I've had contact with RES and they showed a very constructive approach with their primary goal being a fix or guidance for their customers. Hats of to RES taking a constructive approach and I will be working together with RES on this issue.
&lt;p&gt;Finally I would like to state that I didn&amp;rsquo;t expect this post to draw this much attention, if I did I would have probably taken another approach.&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt; &lt;/p&gt;</description></item><item><title>From Jailbreak to Jailbreak part 2</title><link>https://remkoweijnen.nl/blog/2012/01/21/from-jailbreak-to-jailbreak-part-2/</link><pubDate>Sat, 21 Jan 2012 14:02:15 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2012/01/21/from-jailbreak-to-jailbreak-part-2/</guid><description>&lt;p&gt;&lt;a href="http://www.peppercrew.nl/wp-content/uploads/2012/01/image19.png" class="glightbox" data-type="image" data-gallery="post-2351"&gt;&lt;img title="image" src="http://www.peppercrew.nl/wp-content/uploads/2012/01/image_thumb19.png" alt="image" width="56" height="55" align="left" /&gt;&lt;/a&gt;In this post, which is a followup on my &lt;a href="https://remkoweijnen.nl/blog/2012/01/04/from-jailbreak-to-jailbreak/" target="_blank"&gt;From JailBreak to Jailbreak&lt;/a&gt; post, I will describe the same procedure for A5 devices (iPhone 4S and iPad 2).&lt;/p&gt;
&lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2012/01/image15.webp" class="glightbox" data-type="image" data-gallery="post-2351"&gt;&lt;img loading="lazy" decoding="async" style="display: inline; float: right;" title="image" src="https://remkoweijnen.nl/blog/wp-content/uploads/2012/01/image_thumb15.webp" alt="image" width="51" height="51" align="right" /&gt;&lt;/a&gt;A lot of the stuff is really the same so I will not describe that again, this includes the actual update to iOs 5.01, xBackup, SHSH signatures and backup using iTunes.&lt;/p&gt;
&lt;p&gt;Currently the Jailbreak for A5 devices with iOS 5 is only for iOS 5.01. Since Apple is expected to release iOS 5.1 very soon it&amp;rsquo;s highly recommended to &lt;strong&gt;&lt;span style="text-decoration: underline;"&gt;&lt;a href="http://www.peppercrew.nl/index.php/2012/01/update-your-a5-devies-to-ios-5-01-now/" target="_blank"&gt;update to iOS 5.01 NOW&lt;/a&gt;&lt;/span&gt;&lt;/strong&gt;. Especially because it&amp;rsquo;s not yet possible to downgrade to iOS 5.01 using Tiny Umbrella.&lt;/p&gt;</description></item><item><title>Get the location of an advertised shortcut</title><link>https://remkoweijnen.nl/blog/2012/01/18/get-the-location-of-an-advertised-shortcut/</link><pubDate>Wed, 18 Jan 2012 13:28:36 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2012/01/18/get-the-location-of-an-advertised-shortcut/</guid><description>&lt;p&gt;Installers can create so called Advertised Shortcuts in the Start Menu. I wanted to check the Target Path of such an shortcut but Explorer doesn&amp;rsquo;t show it:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2012/01/image13.webp" class="glightbox" data-type="image" data-gallery="post-2334"&gt;&lt;img loading="lazy" decoding="async" style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="Microsoft Visio 2010 Properties" src="https://remkoweijnen.nl/blog/wp-content/uploads/2012/01/image_thumb13.webp" alt="Microsoft Visio 2010 Properties | Shortcut Properties | Target Path" width="233" height="317" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Take ownership of a registry key in PowerShell</title><link>https://remkoweijnen.nl/blog/2012/01/16/take-ownership-of-a-registry-key-in-powershell/</link><pubDate>Mon, 16 Jan 2012 16:39:36 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2012/01/16/take-ownership-of-a-registry-key-in-powershell/</guid><description>&lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2012/01/image11.webp" class="glightbox" data-type="image" data-gallery="post-2327"&gt;&lt;img loading="lazy" decoding="async" style="display: inline; float: left;" title="image" src="https://remkoweijnen.nl/blog/wp-content/uploads/2012/01/image_thumb11.webp" alt="image" width="101" height="70" align="left" /&gt;&lt;/a&gt;After reading Andy Morgan&amp;rsquo;s (excellent) blog post about&lt;a href="http://andrewmorgan.ie/2012/01/16/removing-screen-resolution-and-personalize-shell-extensions-from-a-users-desktop-session/" target="_blank"&gt; Removing Screen Resolution and Personalize shell extensions from a users desktop session&lt;/a&gt; I couldn&amp;rsquo;t help it.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2012/01/image12.webp" class="glightbox" data-type="image" data-gallery="post-2327"&gt;&lt;img loading="lazy" decoding="async" style="display: inline; float: right;" title="image" src="https://remkoweijnen.nl/blog/wp-content/uploads/2012/01/image_thumb12.webp" alt="image" width="38" height="37" align="right" /&gt;&lt;/a&gt;I had to write a PowerShell script to take ownership of the mentioned registry keys. So here goes:&lt;/p&gt;</description></item><item><title>The case of the Slow Xerox Universal Print Driver</title><link>https://remkoweijnen.nl/blog/2012/01/04/the-case-of-the-slow-xerox-universal-print-driver/</link><pubDate>Wed, 04 Jan 2012 22:54:29 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2012/01/04/the-case-of-the-slow-xerox-universal-print-driver/</guid><description>&lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2012/01/image9.webp" class="glightbox" data-type="image" data-gallery="post-2319"&gt;&lt;img loading="lazy" decoding="async" style="display: inline; float: right" title="Xerox Logo" alt="Xerox Logo" align="right" src="https://remkoweijnen.nl/blog/wp-content/uploads/2012/01/image_thumb9.webp" width="64" height="64" /&gt;&lt;/a&gt;Earlier this week I was asked to investigate a problem with the Xerox Universal Printer Driver. Users complained that printing to a Xerox printer was much slower than printing to an HP printer.&lt;/p&gt; &lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2012/01/image10.webp" class="glightbox" data-type="image" data-gallery="post-2319"&gt;&lt;img loading="lazy" decoding="async" style="margin: 0px 9px 0px 0px; display: inline; float: left" title="Excel 2007 Icon" alt="Excel 2007 Icon" align="left" src="https://remkoweijnen.nl/blog/wp-content/uploads/2012/01/image_thumb10.webp" width="67" height="65" /&gt;&lt;/a&gt;I received a reference document from a user, a rather complex Excel sheet. When selecting multiple tabs it took almost a minute to generate a print preview in Excel 2007 running on Windows 2003 with XenApp 5.&lt;/p&gt; &lt;p&gt;I was aware of a bug in the Xerox Universal Driver where almost 9.000 files were copied into the user's profile directory (I wrote about that in an &lt;a href="https://remkoweijnen.nl/blog/2011/02/08/the-case-of-the-citrix-ready-printer-driver/" target="_blank"&gt;earlier post&lt;/a&gt;). But this seemed to be another problem.&lt;/p&gt; &lt;p&gt;&amp;#160;&lt;/p&gt;</description></item><item><title>From Jailbreak to Jailbreak</title><link>https://remkoweijnen.nl/blog/2012/01/04/from-jailbreak-to-jailbreak/</link><pubDate>Wed, 04 Jan 2012 22:02:04 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2012/01/04/from-jailbreak-to-jailbreak/</guid><description>&lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2012/01/image2.webp" class="glightbox" data-type="image" data-gallery="post-2301"&gt;&lt;img loading="lazy" decoding="async" style="margin: 0px 0px 4px; display: inline; float: right;" title="Cydia Icon" src="https://remkoweijnen.nl/blog/wp-content/uploads/2012/01/image_thumb2.webp" alt="Cydia Icon" width="100" height="100" align="right" /&gt;&lt;/a&gt;A few days ago I decided to update my iPhone which was still running iOS 4.3.1 to iOS 5.0.1. I delayed this update for a while because I had Jailbreaked my iPhone. Unfortunately an update is much more work when you have Jailbreaked because you also have to restore Cydia settings such as the repositories and Cydia installed Apps.&lt;/p&gt;
&lt;p&gt;This blog post is not a guide on how to Jailbreak but more a collections of tips to go from a Jailbreak iOS 4.x to iOS 5.01.&lt;/p&gt;
&lt;p&gt;If you notice any extra steps while doing your update &lt;em&gt;please send them to me so I can add them to this post&lt;/em&gt;.&lt;/p&gt;</description></item><item><title>Error 372 in Thinapped Visual Basic Application</title><link>https://remkoweijnen.nl/blog/2012/01/03/error-372-in-thinapped-visual-basic-application/</link><pubDate>Tue, 03 Jan 2012 22:34:29 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2012/01/03/error-372-in-thinapped-visual-basic-application/</guid><description>&lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2012/01/image.webp" class="glightbox" data-type="image" data-gallery="post-2270"&gt;&lt;img loading="lazy" decoding="async" style="display: inline; float: right" title="image" alt="image" align="right" src="https://remkoweijnen.nl/blog/wp-content/uploads/2012/01/image_thumb.webp" width="38" height="39" /&gt;&lt;/a&gt;Today I was troubleshooting a Thinapped Visual Basic Application. The application halts with a Run-time error '372' when trying to run a report:&lt;/p&gt; &lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2012/01/image1.webp" class="glightbox" data-type="image" data-gallery="post-2270"&gt;&lt;img loading="lazy" decoding="async" style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="Proaz" border="0" alt="Run-time error 372 Failed to load control &amp;#39;CrystalActiveReportViewer&amp;#39; from crviewer.dll. Your version of crviewer.dll may be outdated. Make sure you are using the control that was provided with your application" src="https://remkoweijnen.nl/blog/wp-content/uploads/2012/01/image_thumb1.webp" width="419" height="79" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Microsoft KB article &lt;a href="http://support.microsoft.com/kb/942870" target="_blank"&gt;kb942870&lt;/a&gt; hints to an ActiveX component that is registered into HKCU instead of HKLM.&lt;/p&gt; &lt;p&gt;A trace with the ThinApp Log Monitor reveals that the application is looking for an ActiveX component under HKCU: &lt;br /&gt;&lt;/p&gt;</description></item><item><title>System Process PID 4 is listening on port 80</title><link>https://remkoweijnen.nl/blog/2012/01/02/system-process-pid-4-is-listening-on-port-80/</link><pubDate>Mon, 02 Jan 2012 10:23:21 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2012/01/02/system-process-pid-4-is-listening-on-port-80/</guid><description>&lt;p&gt;I wanted to save the SHSH signatures from my iPhone before updating to iOS 5.01. I started &lt;a href="http://thefirmwareumbrella.blogspot.com/" target="_blank"&gt;Tiny Umbrella&lt;/a&gt; but it showed an error indicating that there's already a process listening on port 80:&lt;/p&gt; &lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2012/01/SNAGHTML5f09e5bf.webp" class="glightbox" data-type="image" data-gallery="post-2264"&gt;&lt;img loading="lazy" decoding="async" style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="Cannot Start TSS Service" border="0" alt="Cannot Start TSS Service | DO NOT TRY RESTORING YOUR DEVICE!!! | System(PID:4) must be killed!!" src="https://remkoweijnen.nl/blog/wp-content/uploads/2012/01/SNAGHTML5f09e5bf_thumb.webp" width="319" height="146" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;I verified this using netstat (&lt;em&gt;netstat -aon | find /I "LISTENING" | find /I ":80"&lt;/em&gt;):&lt;/p&gt; &lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2012/01/SNAGHTML5f0d6d75.webp" class="glightbox" data-type="image" data-gallery="post-2264"&gt;&lt;img loading="lazy" decoding="async" style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="netstat" border="0" alt="netstat -aon | find /i &amp;quot;LISTENING&amp;quot; | find /i &amp;quot;:80&amp;quot;" src="https://remkoweijnen.nl/blog/wp-content/uploads/2012/01/SNAGHTML5f0d6d75_thumb.webp" width="419" height="84" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&amp;#160;&lt;/p&gt;</description></item><item><title>NTVDM encountered a hard error</title><link>https://remkoweijnen.nl/blog/2011/12/14/ntvdm-encountered-a-hard-error/</link><pubDate>Wed, 14 Dec 2011 21:41:22 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2011/12/14/ntvdm-encountered-a-hard-error/</guid><description>&lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2011/12/image7.webp" class="glightbox" data-type="image" data-gallery="post-2254"&gt;&lt;img loading="lazy" decoding="async" style="margin: 0px 3px 0px 0px; display: inline; float: left" title="MS-Dos Logo" alt="MS-Dos Logo" align="left" src="https://remkoweijnen.nl/blog/wp-content/uploads/2011/12/image_thumb7.webp" width="74" height="82" /&gt;&lt;/a&gt;Today I troubleshooted an old DOS application that needed to run on a 32 bit Citrix XenApp Server. The last time I saw an actual DOS application in a production environment must be years ago.&lt;/p&gt; &lt;p&gt;When starting the application, the WOW subsystem (NTVDM) crashed with the message: "NTVM encountered a hard error.":&lt;/p&gt; &lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2011/12/image8.webp" class="glightbox" data-type="image" data-gallery="post-2254"&gt;&lt;img loading="lazy" decoding="async" style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="ntvdm.exe - System Error" border="0" alt="NTVDM encoutered a hard error" src="https://remkoweijnen.nl/blog/wp-content/uploads/2011/12/image_thumb8.webp" width="198" height="104" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;After spending some time troubleshooting I remembered a similar issue from a few years ago where a DOS application worked fine from the Console but refused to work from an RDP or ICA session.&lt;/p&gt;</description></item><item><title>Automatic Coming Home on Passat B7</title><link>https://remkoweijnen.nl/blog/2011/12/13/automatic-coming-home-on-passat-b7/</link><pubDate>Tue, 13 Dec 2011 20:01:50 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2011/12/13/automatic-coming-home-on-passat-b7/</guid><description>&lt;p&gt;&lt;img alt="Passat - B7" align="right" src="http://www.kufatec.de/shop/images/categories/380.png" /&gt;I am not sure why Volkswagen has altered the behavior of the Coming Home function but on recent B6 and all B7 Passats it works differently.&lt;/p&gt; &lt;p&gt;Previously the Coming Home function was activated automatically either when taking out the ignition key or when leaving the car (depending on coding).&lt;/p&gt; &lt;p&gt;In newer B6 and all B7 models you need pull the high beam stalk towards you before leaving the car which is annoying and looks very silly.&lt;/p&gt; &lt;p&gt;So how can we restore the old behavior?&lt;/p&gt; &lt;p&gt;&amp;#160;&lt;/p&gt;</description></item><item><title>Citrix online plug-in received a corrupt ICA File</title><link>https://remkoweijnen.nl/blog/2011/12/13/citrix-online-plug-in-received-a-corrupt-ica-file/</link><pubDate>Tue, 13 Dec 2011 10:58:24 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2011/12/13/citrix-online-plug-in-received-a-corrupt-ica-file/</guid><description>&lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2011/12/image4.webp" class="glightbox" data-type="image" data-gallery="post-2242"&gt;&lt;img loading="lazy" decoding="async" style="display: inline; float: left" title="image" alt="image" align="left" src="https://remkoweijnen.nl/blog/wp-content/uploads/2011/12/image_thumb4.webp" width="38" height="35" /&gt;&lt;/a&gt;I was testing a Script I wrote to launch a Citrix XenApp session using the Ica Client Object. Typical code to do this may look like this:&lt;/p&gt; 
&lt;div class="codecard"&gt;
 &lt;div class="codehead"&gt;
 &lt;span class="codefile"&gt;&lt;/span&gt;
 &lt;span class="codetools" data-pagefind-ignore&gt;
 &lt;span class="codelang"&gt;vbnet&lt;/span&gt;
 &lt;button class="codebtn" type="button" data-copy&gt;Copy&lt;/button&gt;
 &lt;a class="codebtn" download=".vb" href="data:text/plain;charset=utf-8;base64,Q29uc3QgY0h0dHBCcm93c2VyID0gInNvbWV1cmwubG9jYWwiCkNvbnN0IGNDb2xvckRlcHRoID0gNAoKJyBDcmVhdGUgdGhlIElDQSBDbGllbnQgT2JqZWN0CkRpbSBvYmpJY2EgOiBTZXQgb2JqSWNhID0gQ3JlYXRlT2JqZWN0KCJDaXRyaXguSWNhQ2xpZW50LjIiKQoKJyBTZXQgQ3JlZGVudGlhbHMKb2JqSWNhLlVzZXJuYW1lID0gIkpvaG5Eb2UiCm9iakljYS5TZXRQcm9wICJDbGVhclBhc3N3b3JkIiwgIlNlY3JldDAxIgpvYmpJY2EuRG9tYWluID0gIkNPTlRPU08iCgonIENvbm5lY3Rpb24gU2V0dGluZ3MKb2JqSWNhLkJyb3dzZXJQcm90b2NvbCA9ICJIVFRQb25UQ1AiCm9iakljYS5UcmFuc3BvcnRSZWNvbm5lY3RFbmFibGVkID0gVHJ1ZQpvYmpJY2EuSHR0cEJyb3dzZXJBZGRyZXNzID0gY0h0dHBCcm93c2VyCgonIFNlc3Npb24gU2V0dGluZ3MKb2JqSWNhLkFkZHJlc3MgPSAiTXlBcHAiCm9iakljYS5BcHBsaWNhdGlvbiA9ICJNeUFwcCIKb2JqSWNhLkRlc2lyZWRDb2xvciA9IGNDb2xvckRlcHRoCm9iakljYS5TY3JlZW5QZXJjZW50ID0gMCAnIEZ1bGwgU2NyZWVuCm9iakljYS5EZXNpcmVkSFJlcyA9IDAKb2JqSWNhLkRlc2lyZWRWUmVzID0gMApvYmpJY2EuTGF1bmNoID0gVHJ1ZQoKJyBDb25uZWN0Cm9iakljYS5Db25uZWN0"&gt;Download&lt;/a&gt;
 &lt;/span&gt;
 &lt;/div&gt;
 &lt;div class="codebody"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-vbnet" data-lang="vbnet"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;Const&lt;/span&gt; &lt;span class="n"&gt;cHttpBrowser&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;&amp;#34;someurl.local&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;Const&lt;/span&gt; &lt;span class="n"&gt;cColorDepth&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;4&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c"&gt;&amp;#39; Create the ICA Client Object
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;Dim&lt;/span&gt; &lt;span class="n"&gt;objIca&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="k"&gt;Set&lt;/span&gt; &lt;span class="n"&gt;objIca&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;CreateObject&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;&amp;#34;Citrix.IcaClient.2&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c"&gt;&amp;#39; Set Credentials
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;objIca&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Username&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;&amp;#34;JohnDoe&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;objIca&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;SetProp&lt;/span&gt; &lt;span class="s"&gt;&amp;#34;ClearPassword&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;&amp;#34;Secret01&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;objIca&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Domain&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;&amp;#34;CONTOSO&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c"&gt;&amp;#39; Connection Settings
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;objIca&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;BrowserProtocol&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;&amp;#34;HTTPonTCP&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;objIca&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;TransportReconnectEnabled&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;True&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;objIca&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;HttpBrowserAddress&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;cHttpBrowser&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c"&gt;&amp;#39; Session Settings
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;objIca&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Address&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;&amp;#34;MyApp&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;objIca&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Application&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;&amp;#34;MyApp&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;objIca&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;DesiredColor&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;cColorDepth&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;objIca&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;ScreenPercent&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;0&lt;/span&gt; &lt;span class="c"&gt;&amp;#39; Full Screen
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;objIca&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;DesiredHRes&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;0&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;objIca&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;DesiredVRes&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;0&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;objIca&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Launch&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;True&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c"&gt;&amp;#39; Connect
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;objIca&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Connect&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;On my testmachine it ran nicely but on a customer machine the script failed with the error 2312 "&lt;em&gt;The Citrix online plug-in received a corrupt ICA File. The ICA File has no [ApplicationServer] section&lt;/em&gt;":&lt;/p&gt;
&lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2011/12/SNAGHTML108b7fef.webp" class="glightbox" data-type="image" data-gallery="post-2242"&gt;&lt;img loading="lazy" decoding="async" style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="Error number 2312" border="0" alt="The Citrix online plug-in received a corrupt ICA File. The ICA File has no [ApplicationServer] section" src="https://remkoweijnen.nl/blog/wp-content/uploads/2011/12/SNAGHTML108b7fef_thumb.webp" width="419" height="98" /&gt;&lt;/a&gt;&lt;/p&gt;</description></item><item><title>McAfee Anti Virus Unlock User Interface Password</title><link>https://remkoweijnen.nl/blog/2011/12/09/mcafee-anti-virus-unlock-user-interface-password/</link><pubDate>Fri, 09 Dec 2011 15:50:12 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2011/12/09/mcafee-anti-virus-unlock-user-interface-password/</guid><description>&lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2011/12/image2.webp" class="glightbox" data-type="image" data-gallery="post-2231"&gt;&lt;img loading="lazy" decoding="async" style="margin: 0px 5px 0px 0px; display: inline; float: left" title="image" alt="image" align="left" src="https://remkoweijnen.nl/blog/wp-content/uploads/2011/12/image_thumb2.webp" width="48" height="48" /&gt;&lt;/a&gt;I needed to change a few settings on a McAfee VirusScan Enterprise 8.7.Oi client. However there was a password protection in place that locks the user interface and nobody around that could tell me the password. So what to do?&lt;/p&gt; &lt;p&gt;Right, we check out where this password is stored and how we can get rid of it!&lt;/p&gt; &lt;p&gt;I openend vsplugin.dll in Ida Pro and searched for related strings such as password, lock etc.&lt;/p&gt; &lt;p&gt;&amp;#160;&lt;/p&gt;</description></item><item><title>Remember Driver Seat Heater Level</title><link>https://remkoweijnen.nl/blog/2011/12/04/remember-driver-seat-heater-level/</link><pubDate>Sun, 04 Dec 2011 12:39:26 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2011/12/04/remember-driver-seat-heater-level/</guid><description>&lt;p&gt;&lt;img style="display: inline; float: right" alt="Passat - B7" align="right" src="http://www.kufatec.de/shop/images/categories/380.png" /&gt;On a friend's car, a Passat B7 (3AA) the seat heaters didn't work. So I connected to the car with VCDS to see if we could troubleshoot this.&lt;/p&gt; &lt;p&gt;I opened Control Module 9, Central Electronics:&lt;/p&gt; &lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2011/12/SNAGHTMLb0b435f.webp" class="glightbox" data-type="image" data-gallery="post-2226"&gt;&lt;img loading="lazy" decoding="async" style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="VCDS | Select Control Module" border="0" alt="VCDS | Select Control Module | 09 Central Electronics" src="https://remkoweijnen.nl/blog/wp-content/uploads/2011/12/SNAGHTMLb0b435f_thumb.webp" width="419" height="301" /&gt;&lt;/a&gt;&amp;#160;&lt;/p&gt; &lt;p&gt;Then went to 7 Long Coding, and it turned out that the Seat Heating was not properly coded. &lt;/p&gt; &lt;p&gt;&amp;#160;&lt;/p&gt;</description></item><item><title>Read Maximum Password Age with PowerShell</title><link>https://remkoweijnen.nl/blog/2011/12/02/read-maximum-password-age-with-powershell/</link><pubDate>Fri, 02 Dec 2011 13:47:44 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2011/12/02/read-maximum-password-age-with-powershell/</guid><description>&lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2011/12/image1.webp" class="glightbox" data-type="image" data-gallery="post-2212"&gt;&lt;img loading="lazy" decoding="async" style="margin: 0px 5px 0px 0px; display: inline; float: left" title="image" alt="image" align="left" src="https://remkoweijnen.nl/blog/wp-content/uploads/2011/12/image_thumb1.webp" width="33" height="39" /&gt;&lt;/a&gt;I needed to read out the Maximum Password age with a PowerShell script in a Windows 2003 domain.&lt;/p&gt; &lt;p&gt;Reading out the &lt;a href="http://msdn.microsoft.com/en-us/library/windows/desktop/ms676863(v=vs.85).aspx" target="_blank"&gt;maxPwdAge&lt;/a&gt; attribute is a trivial task&amp;#160; in PowerShell (I am re-using the function &lt;a href="https://remkoweijnen.nl/blog/2011/12/01/convert-iadslargeinteger-to-int64-in-powershell/" target="_blank"&gt;AdsLargeIntegerToInt64&lt;/a&gt;):&lt;/p&gt;
&lt;div class="codecard"&gt;
 &lt;div class="codehead"&gt;
 &lt;span class="codefile"&gt;&lt;/span&gt;
 &lt;span class="codetools" data-pagefind-ignore&gt;
 &lt;span class="codelang"&gt;text&lt;/span&gt;
 &lt;button class="codebtn" type="button" data-copy&gt;Copy&lt;/button&gt;
 &lt;a class="codebtn" download=".txt" href="data:text/plain;charset=utf-8;base64,JGRvbWFpbiA9ICBOZXctT2JqZWN0IFN5c3RlbS5EaXJlY3RvcnlTZXJ2aWNlcy5EaXJlY3RvcnlFbnRyeQoKIyBSZWFkIG1heFB3ZEFnZSBhdHRyaWJ1dGUgYW5kIGNvbnZlcnQgdG8gSW50NjQKJG1heFB3ZEFnZSA9IEFkc0xhcmdlSW50ZWdlclRvSW42NCAkRG9tYWluLm1heFB3ZEFnZS5WYWx1ZQ=="&gt;Download&lt;/a&gt;
 &lt;/span&gt;
 &lt;/div&gt;
 &lt;div class="codebody"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;$domain = New-Object System.DirectoryServices.DirectoryEntry
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;# Read maxPwdAge attribute and convert to Int64
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;$maxPwdAge = AdsLargeIntegerToIn64 $Domain.maxPwdAge.Value&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;In my case this returns the value -78624000000000 but how do we interpret this? 
 &lt;br /&gt;&lt;/p&gt;</description></item><item><title>Embedding images in HTML</title><link>https://remkoweijnen.nl/blog/2011/12/02/embedding-images-in-html/</link><pubDate>Fri, 02 Dec 2011 13:09:43 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2011/12/02/embedding-images-in-html/</guid><description>&lt;p&gt;I was creating a small dialog in an &lt;a href="http://en.wikipedia.org/wiki/HTML_Application" target="_blank"&gt;.hta file&lt;/a&gt; and to make a little prettier for the user I included a company logo:&lt;/p&gt; &lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2011/12/SNAGHTMLdfa805.webp" class="glightbox" data-type="image" data-gallery="post-2209"&gt;&lt;img loading="lazy" decoding="async" style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="SNAGHTMLdfa805" border="0" alt="SNAGHTMLdfa805" src="https://remkoweijnen.nl/blog/wp-content/uploads/2011/12/SNAGHTMLdfa805_thumb.webp" width="270" height="206" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;But I wanted to deploy the .hta as a single file.&lt;/p&gt;</description></item><item><title>Convert IADsLargeInteger to Int64 in PowerShell</title><link>https://remkoweijnen.nl/blog/2011/12/01/convert-iadslargeinteger-to-int64-in-powershell/</link><pubDate>Thu, 01 Dec 2011 16:03:46 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2011/12/01/convert-iadslargeinteger-to-int64-in-powershell/</guid><description>&lt;p&gt;&lt;img style="display: inline; float: right;" src="data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAkGBhQRERUPExQUFRQUFBQUFRUSFw8UFRYWFBAVFRQRFRQXGyYeFxkjGRUVHy8gJCcpLCwsFR4xNTAqNSYrLCkBCQoKDgwOGg8PGi0dHxwvLDAsLCwsLC8sKSwtKS0pKSwsLCksKSwsKSwsLCwpKSwpLCwpLCwsLCwsMSksLCkpLP/AABEIAJgAoAMBIgACEQEDEQH/xAAcAAABBQEBAQAAAAAAAAAAAAAAAwQFBgcCAQj/xABBEAABAwICBgYHBAkFAQAAAAABAAIDBBEFIQYSMUFRcRNhgZGhsRQiIzJCUpIHwdHwJENTYmOCorLCRHLS4fEX/8QAGQEBAAMBAQAAAAAAAAAAAAAAAAIDBAUB/8QAJxEAAgIBAwMDBQEAAAAAAAAAAAECAxEEEkETITEiMlEUQmFxgTP/2gAMAwEAAhEDEQA/ANuQhCAEIXMkgaLlG8A6QmMuKAbGk+CZyY+R8A7yqXfWuSWxk0hQbdJwPeYewhO6bH4n5a1jwdkvY3Ql4YcWiRQvAbr1WkQQhCAEIQgBCEIAQhCAEIQgBCEIDieYMaXuNgBcqImrb+sd+wcAkNK6z3IQdvtH8mn1R359irk+PgnO9xuGd+S5+ou77VwXQj2yTstRdRtXiLG+89o5kX7lXaqtnlNg2S3yta7xNs0QaLTO9Z9ox15u7h96x92XJD6o0ghHxE8gfvUbPpKzc1x56oSlRo4xo2uJ4k28AohujrpZmwsJbfM7zbqU41bngk1tWS06EaSTy1BjA9iBYgnW9bK1juyv3rSVCaM6NMpIw0DPepKuxKOButI8NG6+08htK61cdkUjHJ5eRyhUrEvtHAyhiv8AvSGw+kZ+Kr1V9olWTk5jeprG/wCV1MiashY//wDSq1pvrsd1OjZbwsVK4Z9sGYbUQ5b3wk5deo7b2FAaWhN8PxCOeNs0Tg9jhcOHl1HqThACEIQAhCEAIQhAUDSOu1p5T8pDB/KPxuorR+EunDyDq2JB3X2JPFJ7mQnaZH/3FPtGqgFo4jLuK43um2zbFcFxpqYLmpgAXlPULyolurs9govcQlcxRWG5VkZ5hS9YVFUI/S4uZ8l7V70Ts9rNFqy/o3dHbX1Tq32a1srrIqzGBI8mZ7ukuQ4PDrgja2263Ba9UTajHPPwtJ7hsVHfhzZSXPa1xJuSQDmcyttlqgY4VuZTZKiI/rG/1fgmM0rNz2ntt52V6lwKIfq2fS1RtVg0fyM+lqr+oXwWdB/JSZimUzlPYpg4aCYxa3w7j2blVJpiVdCamsoqnBxfcv32S6SmKrNG4+zqAS0HY2Zgvl/uaD2gLZ18wYPWGKeGYbY54ndmuL+F19PqZAEIQgBCEIAQhCAyLGGaskrPllf/AHEplhNcY5Q34XGx57irB9omFuim9IA9SWwd1PAtnzHkqa6XY4bQbjsXInBwm0bIvKyaVBVZJR9Sq/h+Ih7A4bx/6E7NUvS8VqpVU9I8RMT4nMNnMdrjsyt25qdmnVHxqr6SQu3bByC9XkjLwbJLiomoBKPjDPEgqNp5FH4LrNwlutuMfcXZea4jrFfe/Uv0VUr0kpPIoeskSslTdMKiVZ8l5HVioFWLPcP3neavdU9QM1CwEnVBvmb57c1dTYoZyVW1ueMFdibcho2lzAOZeAF9UgL5z0Vwjp8Tgp2i7RK2R3UyP2h8gO1fRi3p5WTE1h4BCEL08BCEIAQhJVVU2Npe42A/Nh1rxvAOMQo2SxuZIAWEZ61rW4rFtJcOiilLad7nt33GQ6mu+IK94xij5sjcM3MG/rcd6rWIUWsLrn23xk8Jf0r6zXgi8MD4xe4LTnbPvT04l1FFLH6lt4yXL6dUnUre6KY8wx0U0nRyvbG0j4jbW7Uzo9BJJagtI9iHmxuDrtDsjluIUZiUOfYu8FxWaneOikc0bxtaebTkr4yiktyMVlzU2jVMYw0MoJIwPdaHfS4FUKOpVvwvS5tQwwTgNc9pZrD3TrC3Ys/keWOcw7WktPMGy9ukpYki/TSTTSJQ1KbTTpmalIyVCzmo6nkuo6scXODGNc97smtYC5zjwAG1Lultdx2BOtB6y2J079znOZ9bHAeKnFZaTIyeE2Xn7M9BXUTX1VQB6TMLauR6KO9+jvvcTYnkBuV6QhdQ5oIQhACEIQBdVDFMQMz7/A3Jo48XdqsGPT6lO8jaRq/UbKoa9gAsWpn9pVN8CcpSDm3XTnLklYCkZNpiH5fFl27ktJQuG1pC9kVowmdssYcbaw9V3Mb+0K+lKbwzRXqJVrCM+xCkcXEW2avc5p+9qTpaG2ZVtxqMekSC3+nid2iZw8ioaYJd6XtKrJOTy+RlKbJlil3e3HUJOdrB557OY60+lCXwRp6Q+rdpBDr2tyN9q8qi5vauSVVvTlkrPpC5Mu8nJWLSPA4WtMrG9HsAa0nVJJ4HZ2KrSwq22qVUtsjq1WxsW6IlU1Jf6o91OsOeY5GSt2se145tcDZN2QqTw6jLz1KNcHOSSPbJKMW2a/gulkFVkx2q/wDZvsHdm53YpoPWRw4OBYndmrLhukj4gGyEyMG85vb/AMh4ruS07SyjjxuXJeNde66jaavbI0PY4OadhH52pw2VZjQOwUJFj0sgIXS59qf+dnmqbLOrnpdTF9K7VzLS19uIac/BZ4+ouubqveU2eR4JkGVMRMvemWUqHD5FJ6NVerIWbnDxb/1dQZlXdDVakrHcHDuJsfNTrltmmCWxmW9TIeEMbe+QlRb3JxjE3tpTx6Nv0tLj5hRr5ldqv9GSl5PWR679XvVmoqYNbYBV7CszfiVYopcl29FQq6lLmRmk8shdKoC8wxN2vkPg23+SrU+GSNOqY3A8iro316+mbuaHOP8AV+AVvfTN2kBU6ilWzbydGi11xwZXQaKSOGvIOjZuv7zuoN3cyrDS4c2MWAUjV1PSPuPdGTR1ce1DI1q0+mjSs8mW++Vr/A0dEms8KmTGE0qY1o3FGCIpMRfTv12Zg++zc7r6j1q84XXiZgkYbg94O8HrColU3NSOg2I9HUvgJ9WRuuOp7LXtzafAKm+tNbkXUzae00CFpThcxuBGS6WE2ARfJU7HdBQ8mSA6pOZafd7OCuKFGUVJYZ40n5MjqsBqo9sRPW0gpg9so2xSD+Urai0FcOpmn4R3LO9LDgh00Yr0j/kf9Ll5rv8A2b/pctp9CZ8o7kehM+Udy8+kj8nnTRjlbNJI4lscmZJ91202+4BdU2A1MpsIy0He78FsQo2fKF0WAA2A2FTeni3lnvTRk2GN1QBwUs2RRFE7LPI7xwO8J82Rd2KSisGDkdYU29eD8sIt25ferBjVXqx6o2uy7N/561BYEP0ou/gj+5OMbqLy6vyjxOf4KiEfUaZPEBGFO2uyTKJyW11pMwqXprUPXRem871DB7kj6opiJujnilG54B5OyPmnc5UdivuX4WPcV61lYEXh5NNwnEb5KeCouA1F7K7wn1RyXKOkdoQhACEIQAhCEAIIQhAUnSPRhwcZoht95vHrHAqtCfPVNwRtByIWtObdQ+K6MRT7W57iMj3q+u5w7eUUzqUu5VNH3e2v/DI7pB+KQqZtaRzv3j4Zfcn40fmpXF7B0jbOAGxwvY7dh2KBdK5h9dj28wfMLRXZFtvJVZCW1IkmPSnSKNjxBvEJX01vEK/KM+By+RNpZUnJWN4hNJa9vFOwO3FMMYdaM8k5jL5Mo43O7DbvU5gug0kj2yVGQabhg2X4niq52xiiyFcmyX0Uw06jXEbQFb2i2STp6cMFglVzTeCEIQAhCEAIQhACEIQAhCEB4WpCWhY7aAhCAYzaMwu2sb3BNXaFU5+AIQgBuhNOPgCdQaMQN2Mb3BCEA/ioWN2ABLgLxCA9QhCA/9k=" alt="" width="70" height="67" align="right" /&gt;Some Active Directory attributes return an 8 byte integer in the form of an &lt;a href="file://\\LargeInteger" target="_blank"&gt;IADsLargeInteger&lt;/a&gt; interface. An example is the pwdLastSet attribute from a user object.&lt;/p&gt;
&lt;p&gt;Because the IADsLargeInteger object doesn&amp;rsquo;t provide type information PowerShell cannot read the HighPart and LowPart properties.&lt;/p&gt;
&lt;p&gt;So I wrote the function below to get the Int64 value of an IADsLargeInteger:&lt;/p&gt;</description></item><item><title>Dutch Citrix User Group Launched</title><link>https://remkoweijnen.nl/blog/2011/12/01/dutch-citrix-user-group-launched/</link><pubDate>Thu, 01 Dec 2011 09:51:29 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2011/12/01/dutch-citrix-user-group-launched/</guid><description>&lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2011/12/image.webp" class="glightbox" data-type="image" data-gallery="post-2199"&gt;&lt;img loading="lazy" decoding="async" style="margin: 0px 0px 0px 17px; display: inline; float: right;" title="DUCUG Logo" src="https://remkoweijnen.nl/blog/wp-content/uploads/2011/12/image_thumb.webp" alt="Dutch Citrix User Group Logo" width="165" height="80" align="right" /&gt;&lt;/a&gt;A while ago I was invited for a presentation at the &lt;a href="http://www.citrixug.org.uk/" target="_blank"&gt;UK Citrix User Group&lt;/a&gt;. I went there together with my colleague Ingmar Verheij and we had a great day there.&lt;/p&gt;
&lt;p&gt;I was impressed with what I say there, a community that was very much alive and with good discussions. It was clear that the UK Citrix User Group was doing very well, thumbs up for their Steering Group!&lt;/p&gt;
&lt;p&gt;So Ingmar and I wondered why there was no active Dutch Citrix User Group in The Netherlands. There had been an initiative in the past, the DUCUG so we decided to see if we could revive it.&lt;/p&gt;</description></item><item><title>Determining if Battery Backed Write Cache is installed</title><link>https://remkoweijnen.nl/blog/2011/11/15/determining-if-battery-backed-write-cache-is-installed/</link><pubDate>Tue, 15 Nov 2011 16:27:42 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2011/11/15/determining-if-battery-backed-write-cache-is-installed/</guid><description>&lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2011/11/image8.webp" class="glightbox" data-type="image" data-gallery="post-2195"&gt;&lt;img loading="lazy" decoding="async" style="display: inline; float: right" title="image" alt="image" align="right" src="https://remkoweijnen.nl/blog/wp-content/uploads/2011/11/image_thumb8.webp" width="157" height="150" /&gt;&lt;/a&gt;I wanted to know if a certain server had a &lt;a href="https://remkoweijnen.nl/blog/2011/05/02/extremely-slow-virtual-machines-on-hp-smart-array-p410/" target="_blank"&gt;Battery Backed Write Cache module&lt;/a&gt; (BBWC) on it's array controller.&lt;/p&gt; &lt;p&gt;I suspected it did not, but I had to be sure. Since this server was running production I couldn't open (Visual Inspection) or reboot it.&lt;/p&gt; &lt;p&gt;The server didn't have Insight Agents installed so I couldn't query it via iLO or the Insight Agents webpage either.&lt;/p&gt; &lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2011/11/image9.webp" class="glightbox" data-type="image" data-gallery="post-2195"&gt;&lt;img loading="lazy" decoding="async" style="margin: 0px 8px 10px 0px; display: inline; float: left" title="image" alt="image" align="left" src="https://remkoweijnen.nl/blog/wp-content/uploads/2011/11/image_thumb9.webp" width="32" height="32" /&gt;&lt;/a&gt;I knew that when you do a full install of the array controller bundled software it comes with a commandline tool, hpacucli.exe.&lt;/p&gt;</description></item><item><title>Installing Dell Wireless 5530 HSPA Mini PC #2</title><link>https://remkoweijnen.nl/blog/2011/11/13/installing-dell-wireless-5530-hspa-mini-pc-2/</link><pubDate>Sun, 13 Nov 2011 20:20:51 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2011/11/13/installing-dell-wireless-5530-hspa-mini-pc-2/</guid><description>&lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2011/11/image3.webp" class="glightbox" data-type="image" data-gallery="post-2180"&gt;&lt;img loading="lazy" decoding="async" style="display: inline; float: right" title="image" alt="image" align="right" src="https://remkoweijnen.nl/blog/wp-content/uploads/2011/11/image_thumb3.webp" width="74" height="73" /&gt;&lt;/a&gt;In a Comment on my Article "&lt;a href="https://remkoweijnen.nl/blog/2011/05/27/installing-dell-wireless-5530-hspa-mini-pci/" target="_blank"&gt;Installing Dell Wireless 5530 HSPA Mini PCI&lt;/a&gt;", Florian asked how to Install Dell's &lt;a href="http://support.dell.com/support/downloads/download.aspx?c=us&amp;amp;cs=19&amp;amp;l=en&amp;amp;s=dhs&amp;amp;releaseid=R298998&amp;amp;SystemID=VOS_N_3450&amp;amp;servicetag=&amp;amp;os=W764%20&amp;amp;osl=en&amp;amp;deviceid=25633&amp;amp;devlib=0&amp;amp;typecnt=0&amp;amp;vercnt=1&amp;amp;catid=-1&amp;amp;impid=-1&amp;amp;formatcnt=0&amp;amp;libid=20&amp;amp;typeid=-1&amp;amp;dateid=-1&amp;amp;formatid=-1&amp;amp;source=-1&amp;amp;fileid=448952" target="_blank"&gt;R298998&lt;/a&gt; driver on non authorized system and card combinations.&lt;/p&gt; &lt;p&gt;I decided to have a look and downloaded this driver. The structure isn't much different from the R251153 driver I described in my earlier post.&lt;/p&gt; &lt;p&gt;When installing it on a non authorized card/laptop combination the error is similar:&lt;/p&gt; &lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2011/11/SNAGHTML107d7cc3.webp" class="glightbox" data-type="image" data-gallery="post-2180"&gt;&lt;img loading="lazy" decoding="async" style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="Dell Wireless HSPA Mini-Card Drivers" border="0" alt="Authentification failed. The Dell Wireless HSPA Mobile Broadband Mini-Card cannot be installed on this computer. Please contact the Dell support for further information." src="https://remkoweijnen.nl/blog/wp-content/uploads/2011/11/SNAGHTML107d7cc3_thumb.webp" width="419" height="158" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;When the error message appeared I looked into the temp folder and I noticed that just like before 2 folders were created (with a GUID as name). One of these folders contained the file &lt;em&gt;driver_auth.exe&lt;/em&gt; which, as I already knew, performs the actual validation.&lt;/p&gt;</description></item><item><title>Set homefolder permissions with PowerShell</title><link>https://remkoweijnen.nl/blog/2011/11/08/set-homefolder-permissions-with-powershell/</link><pubDate>Tue, 08 Nov 2011 21:05:19 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2011/11/08/set-homefolder-permissions-with-powershell/</guid><description>&lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2011/11/image2.webp" class="glightbox" data-type="image" data-gallery="post-2154"&gt;&lt;img loading="lazy" decoding="async" style="margin: 0px 0px 0px 10px; display: inline; float: right;" title="image" src="https://remkoweijnen.nl/blog/wp-content/uploads/2011/11/image_thumb2.webp" alt="image" width="77" height="66" align="right" /&gt;&lt;/a&gt;Today one of my collegues asked me to write a script that performs two actions for all users of a certain Organizational Unit:&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;&lt;span style="color: #35383d;"&gt;Ensure that each user has&lt;/span&gt; modify permissions on their homefolder&lt;/li&gt;
	&lt;li&gt;Make each user visible in the Exchange Address List.&lt;/li&gt;
&lt;/ol&gt;
Sounds like a PowerShell job right?
&lt;p&gt;I reused my function to &lt;a href="https://remkoweijnen.nl/blog/2011/09/02/settings-ntfs-permissions-by-sid-in-powershell/" target="_blank"&gt;set NTFS Permissions by SID&lt;/a&gt;:&lt;/p&gt;</description></item><item><title>Construct AQS date range with PowerShell</title><link>https://remkoweijnen.nl/blog/2011/11/04/construct-aqs-date-range-with-powershell/</link><pubDate>Fri, 04 Nov 2011 16:05:25 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2011/11/04/construct-aqs-date-range-with-powershell/</guid><description>&lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2011/11/image.webp" class="glightbox" data-type="image" data-gallery="post-2151"&gt;&lt;img loading="lazy" decoding="async" style="margin: 0px 7px 0px 0px; display: inline; float: left" title="image" alt="image" align="left" src="https://remkoweijnen.nl/blog/wp-content/uploads/2011/11/image_thumb.webp" width="53" height="52" /&gt;&lt;/a&gt;For a script I needed to create an AQS (&lt;a href="http://msdn.microsoft.com/en-us/library/aa965711(v=vs.85).aspx" target="_blank"&gt;Advanced Query Syntax&lt;/a&gt;) Query that contained a date range.&lt;/p&gt; &lt;p&gt;An example of such is a range is: &lt;strong&gt;date:11/05/04..11/10/04&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;However we need to account for regional settings where for example the data seperator and the order of day and month may be different.&lt;/p&gt; &lt;p&gt;In my example I wanted to match any data that is 30 days or older so let's do this in PowerShell:&lt;/p&gt;</description></item><item><title>Remote Registry from 32 to 64 bit</title><link>https://remkoweijnen.nl/blog/2011/10/21/remote-registry-from-32-to-64-bit/</link><pubDate>Fri, 21 Oct 2011 09:05:11 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2011/10/21/remote-registry-from-32-to-64-bit/</guid><description>&lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2011/10/image5.webp" class="glightbox" data-type="image" data-gallery="post-2146"&gt;&lt;img loading="lazy" decoding="async" style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: right; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" align="right" src="https://remkoweijnen.nl/blog/wp-content/uploads/2011/10/image_thumb5.webp" width="40" height="38" /&gt;&lt;/a&gt;Yesterday I needed to set a few registry keys remotely from a 32 bit windows machine to a 64 bit machine.&lt;/p&gt; &lt;p&gt;I used reg.exe to set the key but even though it returned success the key wasn't altered.&lt;/p&gt; &lt;p&gt;As I suspected the key was written to the Wow6432Node. In the help I couldn't find any switch to force reg.exe to use the 64-bit view.&lt;/p&gt; &lt;p&gt;On a 64 bit machine this is not a problem since both 32- and 64 bit versions of reg.exe exists. The 32 bit version of reg.exe defaults to the 32 bit view and the 64 bit version defaults to the 64 bit view.&lt;/p&gt; &lt;p&gt;But luckily reg.exe has a switch (that is not listed in the help) to force the View:&lt;/p&gt; &lt;ul&gt;</description></item><item><title>Prevent additional IP addresses from being registered in DNS</title><link>https://remkoweijnen.nl/blog/2011/10/18/prevent-additional-ip-addresses-from-being-registered-in-dns/</link><pubDate>Tue, 18 Oct 2011 15:01:33 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2011/10/18/prevent-additional-ip-addresses-from-being-registered-in-dns/</guid><description>&lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2011/10/SNAGHTML1aaf7885.webp" class="glightbox" data-type="image" data-gallery="post-2139"&gt;&lt;img loading="lazy" decoding="async" style="display: inline; float: right;" title="SNAGHTML1aaf7885" src="https://remkoweijnen.nl/blog/wp-content/uploads/2011/10/SNAGHTML1aaf7885_thumb.webp" alt="SNAGHTML1aaf7885" width="70" height="67" align="right" /&gt;&lt;/a&gt;In Windows 7 and 2008 R2 all IP Addresses are by default registered in DNS.&lt;/p&gt;
&lt;p&gt;If you don&amp;rsquo;t want certain IP addresses to appear in DNS you can alter this behavior with Netsh using the &lt;strong&gt;skipassource&lt;/strong&gt; flag.&lt;/p&gt;
&lt;p&gt;Use the following syntax to add an additional IP Address with &lt;strong&gt;skipassource&lt;/strong&gt; flag:&lt;/p&gt;</description></item><item><title>Analysing binaries with Binwalk</title><link>https://remkoweijnen.nl/blog/2011/10/12/analysing-binaries-with-binwalk/</link><pubDate>Wed, 12 Oct 2011 16:24:50 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2011/10/12/analysing-binaries-with-binwalk/</guid><description>&lt;p&gt;&lt;a href="http://1.bp.blogspot.com/-ntyKMAnYB84/TjA2kMXPo-I/AAAAAAAACmA/OKjXuz3HORU/s1600/software_test_web.jpg" class="glightbox" data-type="image" data-gallery="post-2136"&gt;&lt;img style="margin: 0px 13px 0px 0px; display: inline; float: left" border="0" align="left" src="http://1.bp.blogspot.com/-ntyKMAnYB84/TjA2kMXPo-I/AAAAAAAACmA/OKjXuz3HORU/s640/software_test_web.jpg" width="130" height="98" /&gt;&lt;/a&gt;I came across an interesting tool today called &lt;a href="http://code.google.com/p/binwalk/" target="_blank"&gt;Binwalk&lt;/a&gt;. &lt;br /&gt;Binwalk is a firmware analysis tool that scans a given binary file for embedded files and executable code.&lt;/p&gt; &lt;p&gt;&amp;#160;&lt;/p&gt; &lt;p&gt;&lt;img style="display: inline; float: right" alt="" align="right" src="data:image/jpg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAkGBhMNEBUSDxEWExMUFSAZFhgXFhwWGxcWGBcgGhUWFxgZJyceHR4kHBgbIjskJCcpOCwsGx8xNTA2NSkrLC4BCQoKDQsOGQ4OGTIkHiAtNTIsNTQsNSw1LCo1LDQwLDUuMjQ0NTQ0LzAvNS8sNTUuLCw0NC00NSw1NDU1LDIsNP/AABEIAFMARgMBIgACEQEDEQH/xAAcAAACAwEBAQEAAAAAAAAAAAAABwUGCAQCAQP/xAA7EAACAQMCAwcCAwIPAAAAAAABAgMABBEFEgYhMQcTIkFRYYEUkVJxscHRCBUjJDIzQlNUcnOCkrPC/8QAGgEBAAIDAQAAAAAAAAAAAAAAAAEFAgMEBv/EACgRAAICAQMDAQkAAAAAAAAAAAABAgMRBCExBRJBURMyM2FxocHR8P/aAAwDAQACEQMRAD8AeNFFFAFQvEHGVnpmPrLlIieYUnLEeoRctj3xXTxFq4sbSa4YZEMTPj1KjIHycCsdavqst5M887l5JGyxPqfIegHTHlQGrtI7TdNvXCQ3kZc9FbMZJ9BvAz8VZwaxVps8abjLH3gK4A6YPkfinr2C8eSXayWNwxdol3wsxy3d5wUJPXaSMex9qAcNFFFAFFFFAFFFFAVftPj3aPegf3DH7c/2Uitb4dtprd7eyt5BdWrxhiMt9QjplpCuPDg8xjyIrQHHSg6ZeA/4aT/rNLzhC7jFtEX3KxhQ+MZZkC4XmOoxyqv6hrJaSrvjHL/uTfRUrXhsrWmaPYB4NL+lPfXFsHa5Od8c7IWOB5Ku3BzUN2ESlNajH4o5Af8Ahn/zTRurwXO4Qw58DLnG1irDBUHqoPTrSa7P7o6bfW96+0RJMYpRnxRh1KHcD7MTn2poNZLVwcpQ7cff6C6r2Txk1lRXxWBGQcivtWBoCiiigCiioHjjXv4u0+4uAcMkZ2f6jeGPl/mIoCj9pHEzandpodi/imbF1IOeyMeJkHvgZPwPM1b5+CYu7iiiVQkSBFDZJAUYBBHPJ86V3YVwa080uoTM21SUQ55vIecrZ9AeXuTT0aIHGfKoaTWGSnjg4tL0SO1XCAZ/LH2FZx7cOGVsNSLxDEdyvegDoHyRIB88/mtNTW4cYOfgkfpS/wC1LgAX1k7IN0sAMkRPMjbzeM+qsB9wKJY4II/sQ7Q1vbdbG4f+cQrhMn+siHTHqyjlj0wfWmrWLobh7SSOeBtjqVdSpztbqPv6fmK17wzra6haQ3KdJYw2PRseJfg5FSCUooooApGdvfFhkmTT4ekS99N7sFJjX4HP5FOW81uGBtsj4bGcYJOPU46Ur+KeC7XVJ57gq6SS4CuGPLau0NsPLBxzB6iuDU9Q0+m9+W+cYW7N9dFlnCGDwPpC2WnW0KDG2FSfdmG5z8sTUwD4/wDb+2qXwTx4kz/QXmIb2EBdufBMoHheInrkc9vWrqB4ifLFdsZKaUovZmlpp4Z7rzIuQQeYIxXqovW9V+n2gYy2c58gB1xWF10KIOyfCJhFzfajH97H3bTKOgkKj4Y1oX+D1fGTSmQ9Ip2C/kQGx9yaz7f7hO6EEkSMMFeZJbqR6mtK9jmi/Q2HdsNsjuZXX8O8DanwBR2wTjFveXHzHa936F9oooraYlM13ldv7op/UVy126volyJpJY0WVXORhsMABgDB5H71Bz6r3JxcRSRe7KcffpXgeo6W93zs7HhsvaLIdiWSs9pHCD3yJNajFzEQBg7SyE/i8ip559M02eEILmOxgS+YNcqmJCDuyfLJHU4xk+tUbUNbhWItvB5etVbRte4iIIsI3ltsnu2ljU4X0VnwSB0HWrvoN1kq3VNbR4/Rxa2tJqa8j5LYpa6txdBfX7W9q/eCJf5RxzXd02KfPHmao3EGncUaipSdJBGeqRmOMH2O0gn5NcnAmiT6RcMl9C0LuMru/tKOpUjkcGrLqeXpJpen5OfTfFQwU0KIPv2Lu9cDP3qb0++Nu+5eh5MPUfvqJOqKzKkeXdzhVXmSatGncMcg1ydx/Av9EfmerfpXkdDpdXfYp1bY8vwWt9lUI4n58E5aXIlRXXOGGedFfoi4GAMAdBRXvY5SWeSjeM7HqvDoCMEAj0POiisiCBm4FsHlEjWse7OfMDPuoO0/ap5RjAFFFQklwS23yeqj9Y0SC9TbcRLIFOVz1U+oI5j4NFFGk9mQtjn0Lhu2sxughCMw5tks35bmJOKmRRRURSisIltt7hRRRWRB/9k=" width="70" height="83" /&gt;Binwalk requires a Linux machine, I used the Backtrack VM I used from my &lt;a href="https://remkoweijnen.nl/blog/2011/06/14/crack-wep-encryption/" target="_blank"&gt;article about WEP keys&lt;/a&gt;.&lt;/p&gt; &lt;p&gt;Note there is no binary distribution of Binwalk so you will need to compile it but this is a breeze.&lt;/p&gt;</description></item><item><title>Exchange Move Mailbox Experiences Part 5</title><link>https://remkoweijnen.nl/blog/2011/10/04/exchange-move-mailbox-experiences-part-5/</link><pubDate>Tue, 04 Oct 2011 15:21:42 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2011/10/04/exchange-move-mailbox-experiences-part-5/</guid><description>&lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2011/09/image1.webp" class="glightbox" data-type="image" data-gallery="post-2135"&gt;&lt;img loading="lazy" decoding="async" title="image" border="0" alt="image" align="right" src="https://remkoweijnen.nl/blog/wp-content/uploads/2011/09/image_thumb1.webp" width="81" height="67" /&gt;&lt;/a&gt;Another interesting Move Mailbox error and in this case I am really unsure how this would be possible!&lt;/p&gt; &lt;p&gt;Let's look at the Move Mailbox log:&lt;/p&gt; 
&lt;div class="codecard"&gt;
 &lt;div class="codehead"&gt;
 &lt;span class="codefile"&gt;&lt;/span&gt;
 &lt;span class="codetools" data-pagefind-ignore&gt;
 &lt;span class="codelang"&gt;powershell&lt;/span&gt;
 &lt;button class="codebtn" type="button" data-copy&gt;Copy&lt;/button&gt;
 &lt;a class="codebtn" download=".ps1" href="data:text/plain;charset=utf-8;base64,MS0xMC0yMDExIDExOjQ5OjE4IFtUaGUgRXhjaGFuZ2UgU2VydmVyXSBBIGNvcnJ1cHRlZCBpdGVtIHdhcyBlbmNvdW50ZXJlZCBkdXJpbmcgdGhlIG1vdmUgb3BlcmF0aW9uLiBUaGUgaXRlbSB3YXNuJ3QgY29waWVkIHRvIHRoZSBkZXN0aW5hdGlvbiBtYWlsYm94Lgo8YmFkaXRlbSBpZD0iMDAwMDAwMDA4OEI0MUVCMkE3NzRFMTRCQTNCMjk3NTk1MjdFQkJEMDA3MDA3QTA4RTRFMTg1NzQ2QTQ1QkY1QzZFRjJBMTdFOEQ1NTAwMDAwNTkwMjg1ODAwMDA3QTA4RTRFMTg1NzQ2QTQ1QkY1QzZFRjJBMTdFOEQ1NTAwMDAwNTkwMjg3MjAwMDAiIGZsYWdzPSIweDAwMDAwMDAwIiBlcnJvcmNvZGU9IjB4ODAwMDQwMDUiIGVycm9ydHlwZT0iTWFwaUV4Y2VwdGlvbk1heFN1Ym1pc3Npb25FeGNlZWRlZCI&amp;#43;CiAgPGZvbGRlciBpZD0iMDAwMDAwMDA4OEI0MUVCMkE3NzRFMTRCQTNCMjk3NTk1MjdFQkJEMDAxMDA3QTA4RTRFMTg1NzQ2QTQ1QkY1QzZFRjJBMTdFOEQ1NTAwMDAwNTkwMjg1ODAwMDAiPlRvcCBvZiBJbmZvcm1hdGlvbiBTdG9yZTwvZm9sZGVyPgogIDxzZW5kZXI&amp;#43;Sm9obiBEb2U8L3NlbmRlcj4KICA8cmVjaXBpZW50PjwvcmVjaXBpZW50PgogIDxzdWJqZWN0PmFyY2hpdmUucHN0PC9zdWJqZWN0PgogIDxtZXNzYWdlY2xhc3M&amp;#43;SVBNLkRvY3VtZW50LlBTVEZpbGU8L21lc3NhZ2VjbGFzcz4KICA8c2l6ZT4zODYyMTg3OTwvc2l6ZT4KICA8ZGF0ZXNlbnQ&amp;#43;MDEvMTkvMjAwNiAxNDozMDo1NzwvZGF0ZXNlbnQ&amp;#43;CiAgPGRhdGVyZWNlaXZlZD4wMS8xOS8yMDA2IDE0OjMwOjE5PC9kYXRlcmVjZWl2ZWQ&amp;#43;CiAgPGVycm9ybWVzc2FnZT5NZXNzYWdlIChzaXplIDM2LjgzIE1CICgzOCw2MjEsODc5IGJ5dGVzKSkgZXhjZWVkcyB0aGUgbWF4aW11bSBhbGxvd2VkIHNpemUgZm9yIHN1Ym1pc3Npb24gdG8gdGhlIHRhcmdldCBtYWlsYm94LiBZb3UgY2FuIGluY3JlYXNlIHRoaXMgbGltaXQgYnkgdXNpbmcgdGhlIFNldC1NYWlsYm94IGNtZGxldCBpbiB0aGUgRXhjaGFuZ2UgTWFuYWdlbWVudCBTaGVsbC4KRXJyb3IgZGV0YWlsczogTWFwaUV4Y2VwdGlvbk1heFN1Ym1pc3Npb25FeGNlZWRlZDogSUV4Y2hhbmdlRmFzdFRyYW5zZmVyRXguVHJhbnNmZXJCdWZmZXIgZmFpbGVkIChocj0weDgwMDA0MDA1LCBlYz0xMjQyKQ=="&gt;Download&lt;/a&gt;
 &lt;/span&gt;
 &lt;/div&gt;
 &lt;div class="codebody"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-powershell" data-lang="powershell"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="mf"&gt;1&lt;/span&gt;&lt;span class="p"&gt;-&lt;/span&gt;&lt;span class="mf"&gt;10&lt;/span&gt;&lt;span class="p"&gt;-&lt;/span&gt;&lt;span class="mf"&gt;2011&lt;/span&gt; &lt;span class="mf"&gt;11&lt;/span&gt;&lt;span class="err"&gt;:&lt;/span&gt;&lt;span class="mf"&gt;49&lt;/span&gt;&lt;span class="err"&gt;:&lt;/span&gt;&lt;span class="mf"&gt;18&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="no"&gt;The Exchange Server&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="n"&gt;A&lt;/span&gt; &lt;span class="n"&gt;corrupted&lt;/span&gt; &lt;span class="n"&gt;item&lt;/span&gt; &lt;span class="n"&gt;was&lt;/span&gt; &lt;span class="n"&gt;encountered&lt;/span&gt; &lt;span class="n"&gt;during&lt;/span&gt; &lt;span class="n"&gt;the&lt;/span&gt; &lt;span class="nb"&gt;move &lt;/span&gt;&lt;span class="n"&gt;operation&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt; &lt;span class="n"&gt;The&lt;/span&gt; &lt;span class="n"&gt;item&lt;/span&gt; &lt;span class="n"&gt;wasn&lt;/span&gt;&lt;span class="err"&gt;&amp;#39;&lt;/span&gt;&lt;span class="n"&gt;t&lt;/span&gt; &lt;span class="n"&gt;copied&lt;/span&gt; &lt;span class="n"&gt;to&lt;/span&gt; &lt;span class="n"&gt;the&lt;/span&gt; &lt;span class="n"&gt;destination&lt;/span&gt; &lt;span class="n"&gt;mailbox&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;baditem&lt;/span&gt; &lt;span class="n"&gt;id&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;0000000088B41EB2A774E14BA3B29759527EBBD007007A08E4E185746A45BF5C6EF2A17E8D5500000590285800007A08E4E185746A45BF5C6EF2A17E8D550000059028720000&amp;#34;&lt;/span&gt; &lt;span class="n"&gt;flags&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;0x00000000&amp;#34;&lt;/span&gt; &lt;span class="n"&gt;errorcode&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;0x80004005&amp;#34;&lt;/span&gt; &lt;span class="n"&gt;errortype&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;MapiExceptionMaxSubmissionExceeded&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;folder&lt;/span&gt; &lt;span class="n"&gt;id&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;0000000088B41EB2A774E14BA3B29759527EBBD001007A08E4E185746A45BF5C6EF2A17E8D550000059028580000&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;Top&lt;/span&gt; &lt;span class="n"&gt;of&lt;/span&gt; &lt;span class="n"&gt;Information&lt;/span&gt; &lt;span class="n"&gt;Store&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="n"&gt;folder&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;sender&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;John&lt;/span&gt; &lt;span class="n"&gt;Doe&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="n"&gt;sender&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;recipient&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="n"&gt;recipient&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;subject&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;archive&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;pst&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="n"&gt;subject&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;messageclass&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;IPM&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="py"&gt;Document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;PSTFile&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="n"&gt;messageclass&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;size&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;&lt;span class="mf"&gt;38621879&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="n"&gt;size&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;datesent&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;&lt;span class="mf"&gt;01&lt;/span&gt;&lt;span class="p"&gt;/&lt;/span&gt;&lt;span class="mf"&gt;19&lt;/span&gt;&lt;span class="p"&gt;/&lt;/span&gt;&lt;span class="mf"&gt;2006&lt;/span&gt; &lt;span class="mf"&gt;14&lt;/span&gt;&lt;span class="err"&gt;:&lt;/span&gt;&lt;span class="mf"&gt;30&lt;/span&gt;&lt;span class="err"&gt;:&lt;/span&gt;&lt;span class="mf"&gt;57&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="n"&gt;datesent&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;datereceived&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;&lt;span class="mf"&gt;01&lt;/span&gt;&lt;span class="p"&gt;/&lt;/span&gt;&lt;span class="mf"&gt;19&lt;/span&gt;&lt;span class="p"&gt;/&lt;/span&gt;&lt;span class="mf"&gt;2006&lt;/span&gt; &lt;span class="mf"&gt;14&lt;/span&gt;&lt;span class="err"&gt;:&lt;/span&gt;&lt;span class="mf"&gt;30&lt;/span&gt;&lt;span class="err"&gt;:&lt;/span&gt;&lt;span class="mf"&gt;19&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="n"&gt;datereceived&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;errormessage&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;Message&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;size&lt;/span&gt; &lt;span class="mf"&gt;36.83&lt;/span&gt; &lt;span class="n"&gt;MB&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mf"&gt;38&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mf"&gt;621&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mf"&gt;879&lt;/span&gt; &lt;span class="n"&gt;bytes&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt; &lt;span class="n"&gt;exceeds&lt;/span&gt; &lt;span class="n"&gt;the&lt;/span&gt; &lt;span class="n"&gt;maximum&lt;/span&gt; &lt;span class="n"&gt;allowed&lt;/span&gt; &lt;span class="n"&gt;size&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;submission&lt;/span&gt; &lt;span class="n"&gt;to&lt;/span&gt; &lt;span class="n"&gt;the&lt;/span&gt; &lt;span class="n"&gt;target&lt;/span&gt; &lt;span class="n"&gt;mailbox&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt; &lt;span class="n"&gt;You&lt;/span&gt; &lt;span class="n"&gt;can&lt;/span&gt; &lt;span class="n"&gt;increase&lt;/span&gt; &lt;span class="n"&gt;this&lt;/span&gt; &lt;span class="n"&gt;limit&lt;/span&gt; &lt;span class="n"&gt;by&lt;/span&gt; &lt;span class="n"&gt;using&lt;/span&gt; &lt;span class="n"&gt;the&lt;/span&gt; &lt;span class="nb"&gt;Set-Mailbox&lt;/span&gt; &lt;span class="n"&gt;cmdlet&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="n"&gt;the&lt;/span&gt; &lt;span class="n"&gt;Exchange&lt;/span&gt; &lt;span class="n"&gt;Management&lt;/span&gt; &lt;span class="n"&gt;Shell&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;Error&lt;/span&gt; &lt;span class="n"&gt;details&lt;/span&gt;&lt;span class="err"&gt;:&lt;/span&gt; &lt;span class="n"&gt;MapiExceptionMaxSubmissionExceeded&lt;/span&gt;&lt;span class="err"&gt;:&lt;/span&gt; &lt;span class="n"&gt;IExchangeFastTransferEx&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="py"&gt;TransferBuffer&lt;/span&gt; &lt;span class="n"&gt;failed&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;hr&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="n"&gt;0x80004005&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;ec&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="mf"&gt;1242&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;This error occurs because of a size constraint just like the one in the &lt;a href="https://remkoweijnen.nl/blog/2011/10/04/exchange-move-mailbox-experiences-part-4/" target="_blank"&gt;previous part&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2011/10/image2.webp" class="glightbox" data-type="image" data-gallery="post-2135"&gt;&lt;img loading="lazy" decoding="async" style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px 10px 0px 0px; padding-left: 0px; padding-right: 0px; display: inline; float: left; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" align="left" src="https://remkoweijnen.nl/blog/wp-content/uploads/2011/10/image_thumb2.webp" width="32" height="30" /&gt;&lt;/a&gt;But the strange part is that it seems to be a PST file (type IPM.Document.PSTFile) located in the Root folder of the Exchange mailbox (which is not possible AFAIK).&lt;/p&gt;
&lt;p&gt;&amp;#160;&lt;/p&gt;</description></item><item><title>Exchange Move Mailbox Experiences Part 4</title><link>https://remkoweijnen.nl/blog/2011/10/04/exchange-move-mailbox-experiences-part-4/</link><pubDate>Tue, 04 Oct 2011 13:43:23 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2011/10/04/exchange-move-mailbox-experiences-part-4/</guid><description>&lt;p&gt;The previous part (&lt;a href="https://remkoweijnen.nl/blog/2011/09/28/exchange-move-mailbox-experiences-part-3/" target="_blank"&gt;part 3&lt;/a&gt;) addressed Mailbox Size but did you know that even Message Size (or rather Item size) can prevent a successful move as well?&lt;/p&gt; &lt;p&gt;Here's an example move mailbox log:&lt;/p&gt; 
&lt;div class="codecard"&gt;
 &lt;div class="codehead"&gt;
 &lt;span class="codefile"&gt;&lt;/span&gt;
 &lt;span class="codetools" data-pagefind-ignore&gt;
 &lt;span class="codelang"&gt;powershell&lt;/span&gt;
 &lt;button class="codebtn" type="button" data-copy&gt;Copy&lt;/button&gt;
 &lt;a class="codebtn" download=".ps1" href="data:text/plain;charset=utf-8;base64,Mi0xMC0yMDExIDM6MTg6NTggW1RoZSBFeGNoYW5nZSBTZXJ2ZXJdIEEgY29ycnVwdGVkIGl0ZW0gd2FzIGVuY291bnRlcmVkIGR1cmluZyB0aGUgbW92ZSBvcGVyYXRpb24uIFRoZSBpdGVtIHdhc24ndCBjb3BpZWQgdG8gdGhlIGRlc3RpbmF0aW9uIG1haWxib3guCjxiYWRpdGVtIGlkPSIwMDAwMDAwMDQ2OUY2OEJCM0FEN0U3NDVCMkI4QTA0MUZDMUI2ODhDMDcwMDdBMDhFNEUxODU3NDZBNDVCRjVDNkVGMkExN0U4RDU1MDAwMDAxNTM3QTlEMDAwMDdBMDhFNEUxODU3NDZBNDVCRjVDNkVGMkExN0U4RDU1MDAwMDAxNTQwRkYzMDAwMCIgZmxhZ3M9IjB4MDAwMDAwMDAiIGVycm9ydHlwZT0iTWFwaUV4Y2VwdGlvbk1heFN1Ym1pc3Npb25FeGNlZWRlZCIgZXJyb3Jjb2RlPSIweDgwMDA0MDA1Ij4KICA8Zm9sZGVyIGlkPSIwMDAwMDAwMDQ2OUY2OEJCM0FEN0U3NDVCMkI4QTA0MUZDMUI2ODhDMDEwMDdBMDhFNEUxODU3NDZBNDVCRjVDNkVGMkExN0U4RDU1MDAwMDAxNTM3QTlEMDAwMCI&amp;#43;dmVyem9uZGVuIG5vdiAyMDA0LWF1ZyAyMDA1PC9mb2xkZXI&amp;#43;CiAgPHNlbmRlcj5KYW5lIERvZQogIDxyZWNpcGllbnQ&amp;#43;PC9yZWNpcGllbnQ&amp;#43;CiAgPHN1YmplY3Q&amp;#43;Rm90bydzIGFmc2NoZWlkIEpvaG4gRG9lIDEwIGZlYnJ1YXJpIGpsLjwvc3ViamVjdD4KICA8bWVzc2FnZWNsYXNzPklQTS5Ob3RlPC9tZXNzYWdlY2xhc3M&amp;#43;CiAgPHNpemU&amp;#43;NzYxMjE2OTQ8L3NpemU&amp;#43;CiAgPGRhdGVzZW50PjAyLzE1LzIwMDUgMTU6Mjg6MDY8L2RhdGVzZW50PgogIDxkYXRlcmVjZWl2ZWQ&amp;#43;MDIvMTUvMjAwNSAxNToyODowNjwvZGF0ZXJlY2VpdmVkPgogIDxlcnJvcm1lc3NhZ2U&amp;#43;TWVzc2FnZSAoc2l6ZSA3Mi42IE1CICg3NiwxMjEsNjk0IGJ5dGVzKSkgZXhjZWVkcyB0aGUgbWF4aW11bSBhbGxvd2VkIHNpemUgZm9yIHN1Ym1pc3Npb24gdG8gdGhlIHRhcmdldCBtYWlsYm94LiBZb3UgY2FuIGluY3JlYXNlIHRoaXMgbGltaXQgYnkgdXNpbmcgdGhlIFNldC1NYWlsYm94IGNtZGxldCBpbiB0aGUgRXhjaGFuZ2UgTWFuYWdlbWVudCBTaGVsbC4KRXJyb3IgZGV0YWlsczogTWFwaUV4Y2VwdGlvbk1heFN1Ym1pc3Npb25FeGNlZWRlZDogSUV4Y2hhbmdlRmFzdFRyYW5zZmVyRXguVHJhbnNmZXJCdWZmZXIgZmFpbGVkIChocj0weDgwMDA0MDA1LCBlYz0xMjQyKQpEaWFnbm9zdGljIGNvbnRleHQ6"&gt;Download&lt;/a&gt;
 &lt;/span&gt;
 &lt;/div&gt;
 &lt;div class="codebody"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-powershell" data-lang="powershell"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="mf"&gt;2&lt;/span&gt;&lt;span class="p"&gt;-&lt;/span&gt;&lt;span class="mf"&gt;10&lt;/span&gt;&lt;span class="p"&gt;-&lt;/span&gt;&lt;span class="mf"&gt;2011&lt;/span&gt; &lt;span class="mf"&gt;3&lt;/span&gt;&lt;span class="err"&gt;:&lt;/span&gt;&lt;span class="mf"&gt;18&lt;/span&gt;&lt;span class="err"&gt;:&lt;/span&gt;&lt;span class="mf"&gt;58&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="no"&gt;The Exchange Server&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="n"&gt;A&lt;/span&gt; &lt;span class="n"&gt;corrupted&lt;/span&gt; &lt;span class="n"&gt;item&lt;/span&gt; &lt;span class="n"&gt;was&lt;/span&gt; &lt;span class="n"&gt;encountered&lt;/span&gt; &lt;span class="n"&gt;during&lt;/span&gt; &lt;span class="n"&gt;the&lt;/span&gt; &lt;span class="nb"&gt;move &lt;/span&gt;&lt;span class="n"&gt;operation&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt; &lt;span class="n"&gt;The&lt;/span&gt; &lt;span class="n"&gt;item&lt;/span&gt; &lt;span class="n"&gt;wasn&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;t copied to the destination mailbox.
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="s1"&gt;&amp;lt;baditem id=&amp;#34;00000000469F68BB3AD7E745B2B8A041FC1B688C07007A08E4E185746A45BF5C6EF2A17E8D55000001537A9D00007A08E4E185746A45BF5C6EF2A17E8D55000001540FF30000&amp;#34; flags=&amp;#34;0x00000000&amp;#34; errortype=&amp;#34;MapiExceptionMaxSubmissionExceeded&amp;#34; errorcode=&amp;#34;0x80004005&amp;#34;&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="s1"&gt; &amp;lt;folder id=&amp;#34;00000000469F68BB3AD7E745B2B8A041FC1B688C01007A08E4E185746A45BF5C6EF2A17E8D55000001537A9D0000&amp;#34;&amp;gt;verzonden nov 2004-aug 2005&amp;lt;/folder&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="s1"&gt; &amp;lt;sender&amp;gt;Jane Doe
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="s1"&gt; &amp;lt;recipient&amp;gt;&amp;lt;/recipient&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="s1"&gt; &amp;lt;subject&amp;gt;Foto&amp;#39;&lt;/span&gt;&lt;span class="n"&gt;s&lt;/span&gt; &lt;span class="n"&gt;afscheid&lt;/span&gt; &lt;span class="n"&gt;John&lt;/span&gt; &lt;span class="n"&gt;Doe&lt;/span&gt; &lt;span class="mf"&gt;10&lt;/span&gt; &lt;span class="n"&gt;februari&lt;/span&gt; &lt;span class="n"&gt;jl&lt;/span&gt;&lt;span class="p"&gt;.&amp;lt;/&lt;/span&gt;&lt;span class="n"&gt;subject&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;messageclass&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;IPM&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Note&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="n"&gt;messageclass&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;size&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;&lt;span class="mf"&gt;76121694&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="n"&gt;size&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;datesent&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;&lt;span class="mf"&gt;02&lt;/span&gt;&lt;span class="p"&gt;/&lt;/span&gt;&lt;span class="mf"&gt;15&lt;/span&gt;&lt;span class="p"&gt;/&lt;/span&gt;&lt;span class="mf"&gt;2005&lt;/span&gt; &lt;span class="mf"&gt;15&lt;/span&gt;&lt;span class="err"&gt;:&lt;/span&gt;&lt;span class="mf"&gt;28&lt;/span&gt;&lt;span class="err"&gt;:&lt;/span&gt;&lt;span class="mf"&gt;06&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="n"&gt;datesent&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;datereceived&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;&lt;span class="mf"&gt;02&lt;/span&gt;&lt;span class="p"&gt;/&lt;/span&gt;&lt;span class="mf"&gt;15&lt;/span&gt;&lt;span class="p"&gt;/&lt;/span&gt;&lt;span class="mf"&gt;2005&lt;/span&gt; &lt;span class="mf"&gt;15&lt;/span&gt;&lt;span class="err"&gt;:&lt;/span&gt;&lt;span class="mf"&gt;28&lt;/span&gt;&lt;span class="err"&gt;:&lt;/span&gt;&lt;span class="mf"&gt;06&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="n"&gt;datereceived&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;errormessage&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;Message&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;size&lt;/span&gt; &lt;span class="mf"&gt;72.6&lt;/span&gt; &lt;span class="n"&gt;MB&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mf"&gt;76&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mf"&gt;121&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mf"&gt;694&lt;/span&gt; &lt;span class="n"&gt;bytes&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt; &lt;span class="n"&gt;exceeds&lt;/span&gt; &lt;span class="n"&gt;the&lt;/span&gt; &lt;span class="n"&gt;maximum&lt;/span&gt; &lt;span class="n"&gt;allowed&lt;/span&gt; &lt;span class="n"&gt;size&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;submission&lt;/span&gt; &lt;span class="n"&gt;to&lt;/span&gt; &lt;span class="n"&gt;the&lt;/span&gt; &lt;span class="n"&gt;target&lt;/span&gt; &lt;span class="n"&gt;mailbox&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt; &lt;span class="n"&gt;You&lt;/span&gt; &lt;span class="n"&gt;can&lt;/span&gt; &lt;span class="n"&gt;increase&lt;/span&gt; &lt;span class="n"&gt;this&lt;/span&gt; &lt;span class="n"&gt;limit&lt;/span&gt; &lt;span class="n"&gt;by&lt;/span&gt; &lt;span class="n"&gt;using&lt;/span&gt; &lt;span class="n"&gt;the&lt;/span&gt; &lt;span class="nb"&gt;Set-Mailbox&lt;/span&gt; &lt;span class="n"&gt;cmdlet&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="n"&gt;the&lt;/span&gt; &lt;span class="n"&gt;Exchange&lt;/span&gt; &lt;span class="n"&gt;Management&lt;/span&gt; &lt;span class="n"&gt;Shell&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;Error&lt;/span&gt; &lt;span class="n"&gt;details&lt;/span&gt;&lt;span class="err"&gt;:&lt;/span&gt; &lt;span class="n"&gt;MapiExceptionMaxSubmissionExceeded&lt;/span&gt;&lt;span class="err"&gt;:&lt;/span&gt; &lt;span class="n"&gt;IExchangeFastTransferEx&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="py"&gt;TransferBuffer&lt;/span&gt; &lt;span class="n"&gt;failed&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;hr&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="n"&gt;0x80004005&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;ec&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="mf"&gt;1242&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;Diagnostic&lt;/span&gt; &lt;span class="n"&gt;context&lt;/span&gt;&lt;span class="err"&gt;:&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;As you can see in the log this mailbox there is one item with a size of 72 MegaBytes.&lt;/p&gt;</description></item><item><title>Exchange Move Mailbox Experiences Part 3</title><link>https://remkoweijnen.nl/blog/2011/09/28/exchange-move-mailbox-experiences-part-3/</link><pubDate>Wed, 28 Sep 2011 11:08:21 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2011/09/28/exchange-move-mailbox-experiences-part-3/</guid><description>&lt;p&gt;In &lt;a href="https://remkoweijnen.nl/blog/2011/09/27/exchange-move-mailbox-experiences-part-2/" target="_blank"&gt;Part 2&lt;/a&gt; I showed some details about Mailbox Rule corruptions that can disturb Mailbox Moves.&lt;/p&gt; &lt;p&gt;For this part the topic is Mailbox size, which can be an important factor in deciding which mailboxes you want to move first.&lt;/p&gt; &lt;p&gt;In my case the mailbox size was important because we agreed to move smaller mailboxes during the day but larger mailboxes only outside working hours.&lt;/p&gt; &lt;p&gt;For Exchange 2010 mailboxes it's very easy to obtain the size using PowerShell. &lt;/p&gt; &lt;p&gt;Example:&lt;/p&gt; 
&lt;div class="codecard"&gt;
 &lt;div class="codehead"&gt;
 &lt;span class="codefile"&gt;&lt;/span&gt;
 &lt;span class="codetools" data-pagefind-ignore&gt;
 &lt;span class="codelang"&gt;powershell&lt;/span&gt;
 &lt;button class="codebtn" type="button" data-copy&gt;Copy&lt;/button&gt;
 &lt;a class="codebtn" download=".ps1" href="data:text/plain;charset=utf-8;base64,R2V0LU1haWxib3ggInJ3ZWlqbmVuIiB8IEdldC1NYWlsYm94U3RhdGlzdGljcyB8IHNlbGVjdCBEaXNwbGF5TmFtZSwgSXRlbUNvdW50LCBUb3RhbEl0ZW1TaXpl"&gt;Download&lt;/a&gt;
 &lt;/span&gt;
 &lt;/div&gt;
 &lt;div class="codebody"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-powershell" data-lang="powershell"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nb"&gt;Get-Mailbox&lt;/span&gt; &lt;span class="s2"&gt;&amp;#34;rweijnen&amp;#34;&lt;/span&gt; &lt;span class="p"&gt;|&lt;/span&gt; &lt;span class="nb"&gt;Get-MailboxStatistics&lt;/span&gt; &lt;span class="p"&gt;|&lt;/span&gt; &lt;span class="nb"&gt;select &lt;/span&gt;&lt;span class="n"&gt;DisplayName&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;ItemCount&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;TotalItemSize&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;table border="0" cellspacing="10" cellpadding="2" width="430"&gt;&lt;tbody&gt;
 &lt;tr&gt;
 &lt;td valign="top" width="130"&gt;DisplayName&lt;/td&gt;
&lt;pre&gt;&lt;code&gt; &amp;lt;td valign=&amp;quot;top&amp;quot; width=&amp;quot;70&amp;quot; align=&amp;quot;right&amp;quot;&amp;gt;ItemCount&amp;lt;/td&amp;gt;

 &amp;lt;td valign=&amp;quot;top&amp;quot; width=&amp;quot;230&amp;quot; align=&amp;quot;right&amp;quot;&amp;gt;TotalItemSize&amp;lt;/td&amp;gt;
&amp;lt;/tr&amp;gt;

&amp;lt;tr&amp;gt;
 &amp;lt;td valign=&amp;quot;top&amp;quot; width=&amp;quot;130&amp;quot;&amp;gt;Remko Weijnen&amp;lt;/td&amp;gt;

 &amp;lt;td valign=&amp;quot;top&amp;quot; width=&amp;quot;70&amp;quot; align=&amp;quot;right&amp;quot;&amp;gt;313&amp;lt;/td&amp;gt;

 &amp;lt;td valign=&amp;quot;top&amp;quot; width=&amp;quot;230&amp;quot; align=&amp;quot;right&amp;quot;&amp;gt;34.87 MB (36,564,183 bytes&amp;lt;/td&amp;gt;
&amp;lt;/tr&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
 &lt;/tbody&gt;&lt;/table&gt;
&lt;p&gt;But how can we get the Mailbox Size for Exchange 2003 mailboxes?&lt;/p&gt;
&lt;p&gt;&amp;#160;&lt;/p&gt;</description></item><item><title>Inline arrays in PowerShell</title><link>https://remkoweijnen.nl/blog/2011/09/28/inline-arrays-in-powershell/</link><pubDate>Wed, 28 Sep 2011 10:34:18 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2011/09/28/inline-arrays-in-powershell/</guid><description>&lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2011/09/image28.webp" class="glightbox" data-type="image" data-gallery="post-2119"&gt;&lt;img loading="lazy" decoding="async" style="background-image: none; margin: 0px 0px 0px 16px; padding-left: 0px; padding-right: 0px; display: inline; float: right; padding-top: 0px; border: 0px;" title="image" src="https://remkoweijnen.nl/blog/wp-content/uploads/2011/09/image_thumb28.webp" alt="image" width="119" height="79" align="right" border="0" /&gt;&lt;/a&gt;Sometimes I want to process a list of &amp;ldquo;things&amp;rdquo; easily in PowerShell where the list is not in an external file but in the script itself.&lt;/p&gt;
&lt;p&gt;Ideally this list would not be separated by e.g. a comma so it can be easily copy/pasted from external data sources.&lt;/p&gt;
&lt;p&gt;Something like this:&lt;/p&gt;
&lt;div class="codecard"&gt;
 &lt;div class="codehead"&gt;
 &lt;span class="codefile"&gt;&lt;/span&gt;
 &lt;span class="codetools" data-pagefind-ignore&gt;
 &lt;span class="codelang"&gt;powershell&lt;/span&gt;
 &lt;button class="codebtn" type="button" data-copy&gt;Copy&lt;/button&gt;
 &lt;a class="codebtn" download=".ps1" href="data:text/plain;charset=utf-8;base64,JExpc3QgPSBAKCIKSm9obiBEb2UKSmFuZSBEb2UKSmFtZXMgQm9uZApBbmQgc28gdGhlIGxpc3QgZ29lcyBvbgoiKQ=="&gt;Download&lt;/a&gt;
 &lt;/span&gt;
 &lt;/div&gt;
 &lt;div class="codebody"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-powershell" data-lang="powershell"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;$List&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="vm"&gt;@&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="s2"&gt;John Doe
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="s2"&gt;Jane Doe
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="s2"&gt;James Bond
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="s2"&gt;And so the list goes on
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="s2"&gt;&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;/div&gt;</description></item><item><title>RNS 510 Startup Logo–My thoughts</title><link>https://remkoweijnen.nl/blog/2011/09/27/rns-510-startup-logomy-thoughts/</link><pubDate>Tue, 27 Sep 2011 22:13:44 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2011/09/27/rns-510-startup-logomy-thoughts/</guid><description>&lt;p&gt;&lt;img style="margin: 0px 17px 0px 0px; display: inline; float: left" align="left" src="http://t2.gstatic.com/images?q=tbn:ANd9GcRI2QmWOaex_r7-CT5HVByOsEOLkoPkJObabRnm1oNW7YHijsqB" width="196" height="192" /&gt;If you have read my earlier blogs about the RNS 510 then you may know I have been working on creating custom startup logo&amp;rsquo;s for some time. &lt;p&gt;For some time now I know how the images are encoded and decoded between Windows bitmap and the native RNS 510 image format.&lt;/p&gt; &lt;p&gt;Recently I identified the checksums in the image data, and the differing parameters for the Seat, Skoda and VW versions of the RNS 510 firmware. &lt;/p&gt; &lt;p&gt; &lt;/p&gt;&lt;/p&gt;</description></item><item><title>Exchange Move Mailbox Experiences Part 2</title><link>https://remkoweijnen.nl/blog/2011/09/27/exchange-move-mailbox-experiences-part-2/</link><pubDate>Tue, 27 Sep 2011 15:07:15 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2011/09/27/exchange-move-mailbox-experiences-part-2/</guid><description>&lt;p&gt;In &lt;a href="https://remkoweijnen.nl/blog/2011/09/21/exchange-move-mailbox-experiences-part-1/" target="_blank"&gt;part 1&lt;/a&gt; we saw that a corrupted rule made the Mailbox Move fail.&lt;/p&gt; &lt;p&gt;I wanted to know if I had really a corrupted mailbox or maybe even corruption in the store or another problem. &lt;br /&gt;&lt;/p&gt; &lt;p&gt;So in this part I will describe how to break down the Mailbox Move Log. &lt;/p&gt; &lt;p&gt;First go to the Failed Move Request and select Properties:&lt;/p&gt; &lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2011/09/image12.webp" class="glightbox" data-type="image" data-gallery="post-2106"&gt;&lt;img loading="lazy" decoding="async" style="background-image: none; border-right-width: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://remkoweijnen.nl/blog/wp-content/uploads/2011/09/image_thumb12.webp" width="419" height="189" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&amp;#160;&lt;/p&gt;</description></item><item><title>Exchange Move Mailbox Experiences Part 1</title><link>https://remkoweijnen.nl/blog/2011/09/21/exchange-move-mailbox-experiences-part-1/</link><pubDate>Wed, 21 Sep 2011 16:38:23 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2011/09/21/exchange-move-mailbox-experiences-part-1/</guid><description>&lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2011/06/SNAGHTML1ca684c.webp"&gt;&lt;img loading="lazy" decoding="async" style="margin: 0px 10px 0px 0px;" title="Exchange Logo" src="https://remkoweijnen.nl/blog/wp-content/uploads/2011/06/SNAGHTML1ca684c_thumb.webp" alt="Exchange Logo" width="49" height="49" align="left" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I am currently working on a migration project from Exchange 2003 to Exchange 2010.&lt;/p&gt;
&lt;p&gt;Most Exchange migration projects use Mailbox Moves to move the mailbox data to the new Exchange environment.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2011/09/image1.webp" class="glightbox" data-type="image" data-gallery="post-2081"&gt;&lt;img loading="lazy" decoding="async" style="background-image: none; margin: 0px 0px 0px 6px; padding-left: 0px; padding-right: 0px; display: inline; float: right; padding-top: 0px; border-width: 0px;" title="image" src="https://remkoweijnen.nl/blog/wp-content/uploads/2011/09/image_thumb1.webp" alt="image" width="81" height="67" align="right" border="0" /&gt;&lt;/a&gt;But there are some things I observed during Mailbox Moves (from Exchange 2003 to 2010) that are worth mentioning.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;</description></item><item><title>RNS 510 Editor</title><link>https://remkoweijnen.nl/blog/2011/09/20/rns-510-editor/</link><pubDate>Tue, 20 Sep 2011 01:42:18 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2011/09/20/rns-510-editor/</guid><description>&lt;p&gt;Work is in progress.&lt;/p&gt; &lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2011/09/SNAGHTML3ff287a5.webp" class="glightbox" data-type="image" data-gallery="post-2058"&gt;&lt;img loading="lazy" decoding="async" style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="SNAGHTML3ff287a5" border="0" alt="SNAGHTML3ff287a5" src="https://remkoweijnen.nl/blog/wp-content/uploads/2011/09/SNAGHTML3ff287a5_thumb.webp" width="418" height="317" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;section class="comments"&gt;
&lt;h2&gt;2 Comments&lt;/h2&gt;
&lt;ol class="comment-list"&gt;
&lt;li class="comment depth-0"&gt;&lt;div class="comment-meta"&gt;&lt;span class="comment-author"&gt;&lt;a href="https://remkoweijnen.nl/blog/2011/09/27/rns-510-startup-logomy-thoughts/" rel="nofollow ugc"&gt;RNS 510 Startup Logo&amp;amp;ndash;My thoughts&lt;/a&gt;&lt;/span&gt; &lt;time datetime="2011-09-27"&gt;Sep 27, 2011&lt;/time&gt;&lt;/div&gt;&lt;div class="comment-body"&gt;&lt;p&gt;[...] Startup PicturesChanging the RNS 510 startup logoRNS510 firmware has new startup logo&amp;#8217;sRNS 510 Editorshare: Bookmark on Delicious Digg this post Recommend on Facebook share via Reddit Share with [...]&lt;/p&gt;</description></item><item><title>Oracle Client install fails with NullPointerException</title><link>https://remkoweijnen.nl/blog/2011/09/06/oracle-client-install-fails-with-nullpointerexception/</link><pubDate>Tue, 06 Sep 2011 15:51:45 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2011/09/06/oracle-client-install-fails-with-nullpointerexception/</guid><description>&lt;p&gt;&lt;img style="margin: 0px 10px 0px 0px; display: inline; float: left" align="left" src="http://t3.gstatic.com/images?q=tbn:ANd9GcR9Cs9herPZ7b62TQZehm5xWRcxW7t2JeV4kyTYpGQgF0TXORvSBg" width="69" height="65" /&gt;Today I was asked to assist in troubleshooting an Oracle Client (10g) installation. The installation halted very quickly with a java.lang.NullPointerException: &lt;/p&gt; &lt;p&gt;&amp;#160;&lt;/p&gt;</description></item><item><title>RNS510 firmware has new startup logo’s</title><link>https://remkoweijnen.nl/blog/2011/09/02/rns510-firmware-has-new-startup-logos/</link><pubDate>Fri, 02 Sep 2011 19:32:48 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2011/09/02/rns510-firmware-has-new-startup-logos/</guid><description>&lt;p&gt;I didn't notice it before but the new RNS 510 firmware (&lt;a href="http://www.my-gti.com/3093/volkswagen-rns-510-firmware-upgrade-to-version-3810-3814-3816-3818" target="_blank"&gt;3810/3814/3816/3818&lt;/a&gt;) has a new startup logo for the Volkswagen firmwares:&lt;/p&gt;</description></item><item><title>Settings NTFS Permissions by SID in PowerShell</title><link>https://remkoweijnen.nl/blog/2011/09/02/settings-ntfs-permissions-by-sid-in-powershell/</link><pubDate>Fri, 02 Sep 2011 17:21:42 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2011/09/02/settings-ntfs-permissions-by-sid-in-powershell/</guid><description>&lt;p&gt;&lt;img style="margin: 0px 0px 0px 10px" align="right" src="http://t0.gstatic.com/images?q=tbn:ANd9GcTPzlU95MOmfR0YwGb55TQkoZENCxgxFUKqp6qqfMMaa9skPMT5gw" width="60" height="47" /&gt;I am currently creating a PowerShell script that creates a user with all needed Active Directory attributes, Exchange mailbox, (TS) Home- and Profile directories and so on.&lt;/p&gt; &lt;p&gt;In such a script you can easily get failures because of Active Directory replication. &lt;br /&gt; &lt;br /&gt;&lt;/p&gt;</description></item><item><title>Check if a useraccount exists with PowerShell</title><link>https://remkoweijnen.nl/blog/2011/09/02/check-if-a-useraccount-exists-with-powershell/</link><pubDate>Fri, 02 Sep 2011 11:51:37 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2011/09/02/check-if-a-useraccount-exists-with-powershell/</guid><description>&lt;p&gt;Function below can be used to check if a given Username exists in Active Directory:&lt;/p&gt;
&lt;div class="codecard"&gt;
 &lt;div class="codehead"&gt;
 &lt;span class="codefile"&gt;&lt;/span&gt;
 &lt;span class="codetools" data-pagefind-ignore&gt;
 &lt;span class="codelang"&gt;powershell&lt;/span&gt;
 &lt;button class="codebtn" type="button" data-copy&gt;Copy&lt;/button&gt;
 &lt;a class="codebtn" download=".ps1" href="data:text/plain;charset=utf-8;base64,ZnVuY3Rpb24gVXNlckV4aXN0cyhbc3RyaW5nXSRVc2VybmFtZSkKewoJJHN0ckZpbHRlciA9ICIoJihvYmplY3RDYXRlZ29yeT1wZXJzb24pKHNBTUFjY291bnROYW1lPSRVc2VybmFtZSkpIgoKCSRvYmpEb21haW4gPSBOZXctT2JqZWN0IFN5c3RlbS5EaXJlY3RvcnlTZXJ2aWNlcy5EaXJlY3RvcnlFbnRyeQoKCSRvYmpTZWFyY2hlciA9IE5ldy1PYmplY3QgU3lzdGVtLkRpcmVjdG9yeVNlcnZpY2VzLkRpcmVjdG9yeVNlYXJjaGVyCgkkb2JqU2VhcmNoZXIuU2VhcmNoUm9vdCA9ICRvYmpEb21haW4KCSRvYmpTZWFyY2hlci5QYWdlU2l6ZSA9IDEwMDAKCSRvYmpTZWFyY2hlci5GaWx0ZXIgPSAkc3RyRmlsdGVyCgkkb2JqU2VhcmNoZXIuU2VhcmNoU2NvcGUgPSAiU3VidHJlZSIKCgkkY29sUmVzdWx0cyA9ICRvYmpTZWFyY2hlci5GaW5kQWxsKCkKCXJldHVybiBbYm9vbF0oJGNvbFJlc3VsdHMgLW5lICRudWxsKQp9"&gt;Download&lt;/a&gt;
 &lt;/span&gt;
 &lt;/div&gt;
 &lt;div class="codebody"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-powershell" data-lang="powershell"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="kd"&gt;function&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;UserExists([string]$Username&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;	&lt;span class="nv"&gt;$strFilter&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;&amp;#34;(&amp;amp;(objectCategory=person)(sAMAccountName=&lt;/span&gt;&lt;span class="nv"&gt;$Username&lt;/span&gt;&lt;span class="s2"&gt;))&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;	&lt;span class="nv"&gt;$objDomain&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;New-Object&lt;/span&gt; &lt;span class="n"&gt;System&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="py"&gt;DirectoryServices&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="py"&gt;DirectoryEntry&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;	&lt;span class="nv"&gt;$objSearcher&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;New-Object&lt;/span&gt; &lt;span class="n"&gt;System&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="py"&gt;DirectoryServices&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="py"&gt;DirectorySearcher&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;	&lt;span class="nv"&gt;$objSearcher&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="py"&gt;SearchRoot&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="nv"&gt;$objDomain&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;	&lt;span class="nv"&gt;$objSearcher&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="py"&gt;PageSize&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="mf"&gt;1000&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;	&lt;span class="nv"&gt;$objSearcher&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="k"&gt;Filter&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="nv"&gt;$strFilter&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;	&lt;span class="nv"&gt;$objSearcher&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="py"&gt;SearchScope&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;&amp;#34;Subtree&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;	&lt;span class="nv"&gt;$colResults&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="nv"&gt;$objSearcher&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="py"&gt;FindAll&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;	&lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="no"&gt;bool&lt;/span&gt;&lt;span class="p"&gt;](&lt;/span&gt;&lt;span class="nv"&gt;$colResults&lt;/span&gt; &lt;span class="o"&gt;-ne&lt;/span&gt; &lt;span class="vm"&gt;$null&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;/div&gt;</description></item><item><title>Changing the RNS 510 startup logo</title><link>https://remkoweijnen.nl/blog/2011/08/31/changing-the-rns-510-startup-logo/</link><pubDate>Wed, 31 Aug 2011 17:20:18 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2011/08/31/changing-the-rns-510-startup-logo/</guid><description>&lt;p&gt;I wrote &lt;a href="https://remkoweijnen.nl/blog/2011/05/04/vw-rns-510-navigation-startup-pictures/" target="_blank"&gt;earlier&lt;/a&gt; about the startup logo's on the Volkswagen RNS 510 navigation.&lt;/p&gt; &lt;p&gt;Today I can finally tell you that I succeeded! &lt;br /&gt;I changed the startup logo to the logo from the MFD2 DVD as you can seen on this picture:&lt;/p&gt;</description></item><item><title>RNS 315: Enable the hidden bluetooth carkit</title><link>https://remkoweijnen.nl/blog/2011/08/26/rns-315-enable-the-hidden-bluetooth-carkit/</link><pubDate>Fri, 26 Aug 2011 14:37:13 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2011/08/26/rns-315-enable-the-hidden-bluetooth-carkit/</guid><description>&lt;p&gt;&lt;img style="margin: 0px 10px 0px 0px; display: inline; float: left" align="left" src="http://t3.gstatic.com/images?q=tbn:ANd9GcQitX_plVMEEHpwnkxI-LcsAGsQmgflLj98KMghV7jwMT5mEPMGjg" width="69" height="71" /&gt;&lt;/p&gt; &lt;p&gt;The Volkswagen RNS 315 Navigation has a builtin Bluetooth carkit which is disabled by default. I am not sure why, I presume this is done because VW also sells carkits that integrate into the MFD.&lt;/p&gt; &lt;p&gt;The builtin carkit can be enabled using VCDS like this:&lt;/p&gt; &lt;p&gt;&amp;#160;&lt;/p&gt;</description></item><item><title>RNS 315 Enable Developer Mode</title><link>https://remkoweijnen.nl/blog/2011/08/26/rns-315-enable-developer-mode/</link><pubDate>Fri, 26 Aug 2011 14:24:19 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2011/08/26/rns-315-enable-developer-mode/</guid><description>&lt;p&gt;&lt;img style="margin: 0px 10px 0px 0px; display: inline; float: left" align="left" src="http://www.myturbodiesel.com/images/a5/nav/rns315.jpg" width="155" height="93" /&gt;I recently had some time to play with VCDS and a friend's RNS 315 navigation. By default there is no test mode or hidden menu with extra features like on some other Volkswagen systems.&lt;/p&gt; &lt;p&gt;Using VCDS we can however (temporarily) enable the Developer mode. &lt;/p&gt; &lt;p&gt;&amp;#160;&lt;/p&gt;</description></item><item><title>Cannot achieve Exchange Server authentication</title><link>https://remkoweijnen.nl/blog/2011/08/17/cannot-achieve-exchange-server-authentication/</link><pubDate>Wed, 17 Aug 2011 16:49:53 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2011/08/17/cannot-achieve-exchange-server-authentication/</guid><description>&lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2011/06/SNAGHTML1ca684c.webp"&gt;&lt;img loading="lazy" decoding="async" style="margin: 0px 10px 0px 0px" title="Exchange Logo" border="0" alt="Exchange Logo" align="left" src="https://remkoweijnen.nl/blog/wp-content/uploads/2011/06/SNAGHTML1ca684c_thumb.webp" width="49" height="49" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;I was testing outgoing mail flow in my new Exchange 2010 setup, which should go from the CAS Servers to the Edge server in the DMZ.&lt;/p&gt; &lt;p&gt;After configuring the Edge subscription I noticed that outgoing mails got stuck in the queue with the following error: &lt;/p&gt; &lt;p&gt;"&lt;em&gt;451 4.4.0 Primary target IP address responded with: &amp;quot;451 5.7.3 Cannot achieve Exchange Server authentication.&amp;quot; Attempted failover to alternate host, but that did not succeed. Either there are no alternate hosts, or delivery failed to all alternate hosts.&lt;/em&gt;"&lt;/p&gt; &lt;p&gt;I verified that name resolution back and forth was ok and that I could communicate on port 25, 50389 and 50636.&lt;/p&gt;</description></item><item><title>GetUserObjectInformation fails with Access Denied</title><link>https://remkoweijnen.nl/blog/2011/08/16/getuserobjectinformation-fails-with-access-denied/</link><pubDate>Tue, 16 Aug 2011 21:11:01 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2011/08/16/getuserobjectinformation-fails-with-access-denied/</guid><description>&lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2011/08/image2.webp" class="glightbox" data-type="image" data-gallery="post-1994"&gt;&lt;img loading="lazy" decoding="async" style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px 10px 0px 0px; padding-left: 0px; padding-right: 0px; display: inline; float: left; border-top: 0px; border-right: 0px; padding-top: 0px" title="Logon SID" border="0" alt="Logon SID" align="left" src="https://remkoweijnen.nl/blog/wp-content/uploads/2011/08/image_thumb2.webp" width="48" height="44" /&gt;&lt;/a&gt;Today I was reusing some old (pre vista) code the retrieves the Logon SID that I wrote a few years ago. The Logon SID is a special SID that identifies a logon session that has the form S-1-5-5-X-Y.&lt;/p&gt; &lt;p&gt;You can view your Logon SID with Process Explorer, right click a GUI process, select Properties and goto the Security Tab:&lt;/p&gt; &lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2011/08/SNAGHTML1b84fe6b.webp" class="glightbox" data-type="image" data-gallery="post-1994"&gt;&lt;img loading="lazy" decoding="async" style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="explorer.exe:4484 Properties" border="0" alt="Process Explorer|Security Tab|Logon SID" src="https://remkoweijnen.nl/blog/wp-content/uploads/2011/08/SNAGHTML1b84fe6b_thumb.webp" width="274" height="317" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&amp;#160;&lt;/p&gt;</description></item><item><title>Get smallest Exchange Database in PowerShell</title><link>https://remkoweijnen.nl/blog/2011/08/16/get-smallest-exchange-database-in-powershell/</link><pubDate>Tue, 16 Aug 2011 14:16:33 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2011/08/16/get-smallest-exchange-database-in-powershell/</guid><description>&lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2011/06/SNAGHTML1ca684c.webp"&gt;&lt;img loading="lazy" decoding="async" style="margin: 0px 10px 0px 0px" title="SNAGHTML1ca684c" border="0" alt="SNAGHTML1ca684c" align="left" src="https://remkoweijnen.nl/blog/wp-content/uploads/2011/06/SNAGHTML1ca684c_thumb.webp" width="49" height="49" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;I needed to adapt some scripts that create a user with mailbox for Exchange 2010. The existing scripts had a hardcoded database for new mailboxes.&lt;/p&gt; &lt;p&gt;I wanted the mailbox to be created in the smallest database, but how do we determine this?&lt;/p&gt;</description></item><item><title>Set Exchange Product Key with PowerShell</title><link>https://remkoweijnen.nl/blog/2011/08/15/set-exchange-product-key-with-powershell/</link><pubDate>Mon, 15 Aug 2011 09:17:14 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2011/08/15/set-exchange-product-key-with-powershell/</guid><description>&lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2011/06/SNAGHTML1ca684c.webp"&gt;&lt;img loading="lazy" decoding="async" style="margin: 0px 10px 0px 0px" title="SNAGHTML1ca684c" border="0" alt="SNAGHTML1ca684c" align="left" src="https://remkoweijnen.nl/blog/wp-content/uploads/2011/06/SNAGHTML1ca684c_thumb.webp" width="49" height="49" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;By default Exchange 2007 and 2010 are installed in Trial mode so before going into production you need to enter the Product Key.&lt;/p&gt; &lt;p&gt;The Exchange Management Console will warn you if one or more servers are still in trial mode:&lt;/p&gt; &lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2011/08/image.webp" class="glightbox" data-type="image" data-gallery="post-1985"&gt;&lt;img loading="lazy" decoding="async" style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://remkoweijnen.nl/blog/wp-content/uploads/2011/08/image_thumb.webp" width="419" height="246" /&gt;&lt;/a&gt;&lt;/p&gt;</description></item><item><title>GetTokenInformation with TokenLinkedToken returns error 1312</title><link>https://remkoweijnen.nl/blog/2011/08/11/gettokeninformation-with-tokenlinkedtoken-returns-error-1312/</link><pubDate>Thu, 11 Aug 2011 11:30:47 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2011/08/11/gettokeninformation-with-tokenlinkedtoken-returns-error-1312/</guid><description>&lt;p&gt;The &lt;a href="http://msdn.microsoft.com/en-us/library/aa446671(v=vs.85).aspx" target="_blank"&gt;GetTokenInformation&lt;/a&gt; function can be used with the TokenLinkedToken Information Class on Windows Vista and higher to the linked (Elevated) token.&lt;/p&gt;
&lt;p&gt;This is useful when User Account Control is enabled and you want to launch an elevated process e.g. from a service.&lt;/p&gt;</description></item><item><title>Programmatically Check if User Account Control is Enabled</title><link>https://remkoweijnen.nl/blog/2011/08/11/programmatically-check-if-user-account-control-is-enabled/</link><pubDate>Thu, 11 Aug 2011 11:27:13 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2011/08/11/programmatically-check-if-user-account-control-is-enabled/</guid><description>&lt;p&gt;&lt;img style="margin: 0px 10px 0px 0px; display: inline; float: left" align="left" src="http://www.security.nl/image/3420" width="28" height="34" /&gt;Snippet below can be used to programmatically determine if User Account Control is enabled:&lt;/p&gt; 
&lt;div class="codecard"&gt;
 &lt;div class="codehead"&gt;
 &lt;span class="codefile"&gt;&lt;/span&gt;
 &lt;span class="codetools" data-pagefind-ignore&gt;
 &lt;span class="codelang"&gt;objectpascal&lt;/span&gt;
 &lt;button class="codebtn" type="button" data-copy&gt;Copy&lt;/button&gt;
 &lt;a class="codebtn" download=".pas" href="data:text/plain;charset=utf-8;base64,dXNlcwogIEp3YVdpbmJhc2UsIEp3YVdpbk50OwoKZnVuY3Rpb24gSXNVQUNFbmFibGVkOiBCb29sZWFuOwp2YXIKICBoVG9rZW46IFRIYW5kbGU7CiAgdGV0OiBUT0tFTl9FTEVWQVRJT05fVFlQRTsKICBkd1NpemU6IERXT1JEOwpiZWdpbgogIFdpbjMyQ2hlY2soT3BlblByb2Nlc3NUb2tlbihHZXRDdXJyZW50UHJvY2VzcywgVE9LRU5fUVVFUlksIGhUb2tlbikpOwogIC8vIFRva2VuRWxldmF0aW9uVHlwZSBjbGFzcyBvbmx5IGF2YWlsYWJsZSBvbiBWaXN0YSsKICBXaW4zMkNoZWNrKEdldFRva2VuSW5mb3JtYXRpb24oaFRva2VuLCBUb2tlbkVsZXZhdGlvblR5cGUsIEB0ZXQsIFNpemVPZih0ZXQpLCBkd1NpemUpKTsKCiAgUmVzdWx0IDo9IHRldCA8PiBUb2tlbkVsZXZhdGlvblR5cGVEZWZhdWx0OwplbmQ7"&gt;Download&lt;/a&gt;
 &lt;/span&gt;
 &lt;/div&gt;
 &lt;div class="codebody"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-objectpascal" data-lang="objectpascal"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="kr"&gt;uses&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;JwaWinbase&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;JwaWinNt&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="kr"&gt;function&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;IsUACEnabled&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kt"&gt;Boolean&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="kr"&gt;var&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;hToken&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;THandle&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;tet&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;TOKEN_ELEVATION_TYPE&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;dwSize&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;DWORD&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="kr"&gt;begin&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;Win32Check&lt;span class="o"&gt;(&lt;/span&gt;OpenProcessToken&lt;span class="o"&gt;(&lt;/span&gt;GetCurrentProcess&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;TOKEN_QUERY&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;hToken&lt;span class="o"&gt;))&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="c1"&gt;// TokenElevationType class only available on Vista+&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;Win32Check&lt;span class="o"&gt;(&lt;/span&gt;GetTokenInformation&lt;span class="o"&gt;(&lt;/span&gt;hToken&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;TokenElevationType&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;@&lt;/span&gt;tet&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;SizeOf&lt;span class="o"&gt;(&lt;/span&gt;tet&lt;span class="o"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;dwSize&lt;span class="o"&gt;))&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="ge"&gt;Result&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;:=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;tet&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;TokenElevationTypeDefault&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="kr"&gt;end&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;section class="comments"&gt;
&lt;h2&gt;1 Comments&lt;/h2&gt;
&lt;ol class="comment-list"&gt;
&lt;li class="comment depth-0"&gt;&lt;div class="comment-meta"&gt;&lt;span class="comment-author"&gt;&lt;a href="https://remkoweijnen.nl/blog/2011/08/11/gettokeninformation-with-tokenlinkedtoken-returns-error-1312/" rel="nofollow ugc"&gt;GetTokenInformation with TokenLinkedToken returns error 1312&lt;/a&gt;&lt;/span&gt; &lt;time datetime="2011-08-11"&gt;Aug 11, 2011&lt;/time&gt;&lt;/div&gt;&lt;div class="comment-body"&gt;&lt;p&gt;[...] specified logon session does not exist. It may already have been terminated.&amp;#8221;So you should check if User Account Control is enabled in such cases (or make this error non critical).share: Bookmark on Delicious Digg this post [...]&lt;/p&gt;</description></item><item><title>PowerShell script to set Exchange Static RPC Ports</title><link>https://remkoweijnen.nl/blog/2011/08/10/powershell-script-to-set-exchange-static-rpc-ports/</link><pubDate>Wed, 10 Aug 2011 16:49:01 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2011/08/10/powershell-script-to-set-exchange-static-rpc-ports/</guid><description>&lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2011/06/SNAGHTML1ca684c.webp"&gt;&lt;img loading="lazy" decoding="async" style="margin: 0px 10px 0px 0px" title="SNAGHTML1ca684c" border="0" alt="SNAGHTML1ca684c" align="left" src="https://remkoweijnen.nl/blog/wp-content/uploads/2011/06/SNAGHTML1ca684c_thumb.webp" width="49" height="49" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;I am currently working on an Exchange migration from 2003 to 2010. For the implementation of a load balancing solution for the CAS/HUB servers I needed to set Static RPC Ports for the &lt;em&gt;RPC Client Access Service&lt;/em&gt; and the &lt;em&gt;Exchange Address Book Service&lt;/em&gt;.&lt;/p&gt; &lt;p&gt;The procedure of changing these ports is described on the Technet Wiki: &lt;a href="http://social.technet.microsoft.com/wiki/contents/articles/configure-static-rpc-ports-on-an-exchange-2010-client-access-server.aspx" target="_blank"&gt;Configure Static RPC Ports on an Exchange 2010 Client Access Server&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;img alt="" align="right" src="http://t0.gstatic.com/images?q=tbn:ANd9GcTPzlU95MOmfR0YwGb55TQkoZENCxgxFUKqp6qqfMMaa9skPMT5gw" width="66" height="52" /&gt;Since I am lazy I decided to do this with a PowerShell script that would automatically do this for all CAS/HUB servers in my 2010 environment.&lt;/p&gt;</description></item><item><title>Exchange 2010 Install-ADTopologyService 0x800706D</title><link>https://remkoweijnen.nl/blog/2011/07/05/exchange-2010-install-adtopologyservice-0x800706d/</link><pubDate>Tue, 05 Jul 2011 09:43:04 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2011/07/05/exchange-2010-install-adtopologyservice-0x800706d/</guid><description>&lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2011/06/SNAGHTML1ca684c.webp"&gt;&lt;img loading="lazy" decoding="async" style="margin: 0px 10px 5px 0px; display: inline; float: right" title="Exchange 2010" border="0" alt="Exchange 2010 Logo" align="right" src="https://remkoweijnen.nl/blog/wp-content/uploads/2011/06/SNAGHTML1ca684c_thumb.webp" width="49" height="49" /&gt;&lt;/a&gt; &lt;p&gt;I got the following error while installing Exchange 2010: &amp;ldquo;There are no more endpoints available from the endpoint mapper. (Exception from HRESULT: 0x800706D9)&amp;rdquo; &lt;/p&gt; &lt;p&gt;I looked up HRESULT 0x800706D9 which is defined in &lt;em&gt;winerror.h&lt;/em&gt; as EPT_S_NOT_REGISTERED with the same error text.&lt;/p&gt;</description></item><item><title>Virtualized Mac OS X Freezes</title><link>https://remkoweijnen.nl/blog/2011/07/01/virtualized-mac-os-x-freezes/</link><pubDate>Fri, 01 Jul 2011 15:12:39 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2011/07/01/virtualized-mac-os-x-freezes/</guid><description>&lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2011/07/image3.webp" class="glightbox" data-type="image" data-gallery="post-1965"&gt;&lt;img loading="lazy" decoding="async" style="background-image: none; border-right-width: 0px; margin: 2px 10px 5px 0px; padding-left: 0px; padding-right: 0px; display: inline; float: left; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="Mac OS X" border="0" alt="Mac OS X Snow Leopard" align="left" src="https://remkoweijnen.nl/blog/wp-content/uploads/2011/07/image_thumb3.webp" width="74" height="65" /&gt;&lt;/a&gt;I am running a virtualized Mac OS X machine in my VMWare Workstation but I noticed that after a period of inactivity the virtual machine would sometimes freeze.&lt;/p&gt; &lt;p&gt;Because this only happens after inactivity I assumed it had something to do with Power Saving so I changed the Energy Saver settings and that fixed it!&lt;/p&gt;</description></item><item><title>W3 Total Cache influences WP-PostViews counter</title><link>https://remkoweijnen.nl/blog/2011/06/28/w3-total-cache-influences-wp-postviews-counter/</link><pubDate>Tue, 28 Jun 2011 21:14:10 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2011/06/28/w3-total-cache-influences-wp-postviews-counter/</guid><description>&lt;p&gt;I have used the &lt;a href="http://lesterchan.net/portfolio/programming/php/" target="_blank"&gt;WP-Postviews&lt;/a&gt; Wordpress plugin for a while to keep track of the number of times my blog posts are being read.&lt;/p&gt;
&lt;p&gt;But after installing the &lt;a href="http://www.w3-edge.com/wordpress-plugins/w3-total-cache/" target="_blank"&gt;W3 Total Cache&lt;/a&gt; plugin I noticed that the read counters weren&amp;rsquo;t properly updated anymore. I figured this was a consequence of using a cache.&lt;/p&gt;</description></item><item><title>AD Internals: Display RID Allocation Pools</title><link>https://remkoweijnen.nl/blog/2011/06/27/ad-internals-display-rid-allocation-pools/</link><pubDate>Mon, 27 Jun 2011 15:37:04 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2011/06/27/ad-internals-display-rid-allocation-pools/</guid><description>&lt;p&gt;In my previous post I wrote about a problem I had with duplicate RID Allocation pools. &lt;/p&gt; &lt;p&gt;But how do we get more insight into these RID Allocation pools?&lt;/p&gt; &lt;p&gt;The DCDIAG tool can display this information per domain controleler using the following syntax&lt;/p&gt; 
&lt;div class="codecard"&gt;
 &lt;div class="codehead"&gt;
 &lt;span class="codefile"&gt;&lt;/span&gt;
 &lt;span class="codetools" data-pagefind-ignore&gt;
 &lt;span class="codelang"&gt;batch&lt;/span&gt;
 &lt;button class="codebtn" type="button" data-copy&gt;Copy&lt;/button&gt;
 &lt;a class="codebtn" download=".bat" href="data:text/plain;charset=utf-8;base64,ZGNkaWFnIC9zOnNlcnZlciAvdiAvdGVzdDpyaWRtYW5hZ2Vy"&gt;Download&lt;/a&gt;
 &lt;/span&gt;
 &lt;/div&gt;
 &lt;div class="codebody"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-batch" data-lang="batch"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;dcdiag /s:server /v /test:ridmanager&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Example output:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2011/06/image28.webp" class="glightbox" data-type="image" data-gallery="post-1950"&gt;&lt;img loading="lazy" decoding="async" style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="DCDiag Ridmanager Test" border="0" alt="DCDiag Ridmanager Test" src="https://remkoweijnen.nl/blog/wp-content/uploads/2011/06/image_thumb28.webp" width="419" height="85" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;But where in Active Directory is this information stored and can we display it for all Domain Controllers at once for larger environments?&lt;/p&gt;</description></item><item><title>The case of the duplicate SID’s</title><link>https://remkoweijnen.nl/blog/2011/06/27/the-case-of-the-duplicate-sids/</link><pubDate>Mon, 27 Jun 2011 10:04:01 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2011/06/27/the-case-of-the-duplicate-sids/</guid><description>&lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2011/06/SNAGHTML1ca684c.webp"&gt;&lt;img loading="lazy" decoding="async" style="margin: 0px 5px 0px 0px;" title="SNAGHTML1ca684c" src="https://remkoweijnen.nl/blog/wp-content/uploads/2011/06/SNAGHTML1ca684c_thumb.webp" border="0" alt="SNAGHTML1ca684c" width="49" height="49" align="left" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I encountered another interesting error during Exchange 2010 installation today. During the Organization Preparation I got the following error:&lt;/p&gt;
&lt;p&gt;&lt;a class="glightbox" data-type="image" data-gallery="post-1932" href="https://remkoweijnen.nl/blog/wp-content/uploads/2011/06/image25.webp"&gt;&lt;img loading="lazy" decoding="async" style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="Exchange Server 2010 Setup" src="https://remkoweijnen.nl/blog/wp-content/uploads/2011/06/image_thumb25.webp" border="0" alt="The requested object has a non-unique identifier and cannot be retrieved.Active directory response: 0000219D: SvcErr: DSID-031A0FC0, problem 5003 (WILL_NOT_PERFORM), data 0" width="370" height="317" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The setup.log doesn&amp;rsquo;t give us much more detailed info:&lt;/p&gt;
&lt;div class="codecard"&gt;
 &lt;div class="codehead"&gt;
 &lt;span class="codefile"&gt;&lt;/span&gt;
 &lt;span class="codetools" data-pagefind-ignore&gt;
 &lt;span class="codelang"&gt;text&lt;/span&gt;
 &lt;button class="codebtn" type="button" data-copy&gt;Copy&lt;/button&gt;
 &lt;a class="codebtn" download=".txt" href="data:text/plain;charset=utf-8;base64,WzA2LTIyLTIwMTEgMTE6MTY6MjkuMDYxNF0gWzJdIFtFUlJPUl0gQWN0aXZlIERpcmVjdG9yeSBvcGVyYXRpb24gZmFpbGVkIG9uIGRjMDAxLnpvcmcubG9jYWwuIFRoaXMgZXJyb3IgaXMgbm90IHJldHJpYWJsZS4gQWRkaXRpb25hbCBpbmZvcm1hdGlvbjogVGhlIHJlcXVlc3RlZCBvYmplY3QgaGFzIGEgbm9uLXVuaXF1ZSBpZGVudGlmaWVyIGFuZCBjYW5ub3QgYmUgcmV0cmlldmVkLgpBY3RpdmUgZGlyZWN0b3J5IHJlc3BvbnNlOiAwMDAwMjE5RDogU3ZjRXJyOiBEU0lELTAzMUEwRkMwLCBwcm9ibGVtIDUwMDMgKFdJTExfTk9UX1BFUkZPUk0pLCBkYXRhIDAKClswNi0yMi0yMDExIDExOjE2OjI5LjA2MzBdIFsyXSBbRVJST1JdIFRoZSBzZXJ2ZXIgY2Fubm90IGhhbmRsZSBkaXJlY3RvcnkgcmVxdWVzdHMuClswNi0yMi0yMDExIDExOjE2OjI5LjA2MzBdIFsyXSBFbmRpbmcgcHJvY2Vzc2luZyBpbml0aWFsaXplLUV4Y2hhbmdlVW5pdmVyc2FsR3JvdXBzClswNi0yMi0yMDExIDExOjE2OjI5LjA2MzBdIFsxXSBUaGUgZm9sbG93aW5nIDEgZXJyb3Iocykgb2NjdXJyZWQgZHVyaW5nIHRhc2sgZXhlY3V0aW9uOgpbMDYtMjItMjAxMSAxMToxNjoyOS4wNjMwXSBbMV0gMC4gIEVycm9yUmVjb3JkOiBBY3RpdmUgRGlyZWN0b3J5IG9wZXJhdGlvbiBmYWlsZWQgb24gZGMwMDEuem9yZy5sb2NhbC4gVGhpcyBlcnJvciBpcyBub3QgcmV0cmlhYmxlLiBBZGRpdGlvbmFsIGluZm9ybWF0aW9uOiBUaGUgcmVxdWVzdGVkIG9iamVjdCBoYXMgYSBub24tdW5pcXVlIGlkZW50aWZpZXIgYW5kIGNhbm5vdCBiZSByZXRyaWV2ZWQuCkFjdGl2ZSBkaXJlY3RvcnkgcmVzcG9uc2U6IDAwMDAyMTlEOiBTdmNFcnI6IERTSUQtMDMxQTBGQzAsIHByb2JsZW0gNTAwMyAoV0lMTF9OT1RfUEVSRk9STSksIGRhdGEgMAoKWzA2LTIyLTIwMTEgMTE6MTY6MjkuMDYzMF0gWzFdIDAuICBFcnJvclJlY29yZDogTWljcm9zb2Z0LkV4Y2hhbmdlLkRhdGEuRGlyZWN0b3J5LkFET3BlcmF0aW9uRXhjZXB0aW9uOiBBY3RpdmUgRGlyZWN0b3J5IG9wZXJhdGlvbiBmYWlsZWQgb24gZGMwMDEuem9yZy5sb2NhbC4gVGhpcyBlcnJvciBpcyBub3QgcmV0cmlhYmxlLiBBZGRpdGlvbmFsIGluZm9ybWF0aW9uOiBUaGUgcmVxdWVzdGVkIG9iamVjdCBoYXMgYSBub24tdW5pcXVlIGlkZW50aWZpZXIgYW5kIGNhbm5vdCBiZSByZXRyaWV2ZWQuCkFjdGl2ZSBkaXJlY3RvcnkgcmVzcG9uc2U6IDAwMDAyMTlEOiBTdmNFcnI6IERTSUQtMDMxQTBGQzAsIHByb2JsZW0gNTAwMyAoV0lMTF9OT1RfUEVSRk9STSksIGRhdGEgMA=="&gt;Download&lt;/a&gt;
 &lt;/span&gt;
 &lt;/div&gt;
 &lt;div class="codebody"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;[06-22-2011 11:16:29.0614] [2] [ERROR] Active Directory operation failed on dc001.zorg.local. This error is not retriable. Additional information: The requested object has a non-unique identifier and cannot be retrieved.
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;Active directory response: 0000219D: SvcErr: DSID-031A0FC0, problem 5003 (WILL_NOT_PERFORM), data 0
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;[06-22-2011 11:16:29.0630] [2] [ERROR] The server cannot handle directory requests.
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;[06-22-2011 11:16:29.0630] [2] Ending processing initialize-ExchangeUniversalGroups
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;[06-22-2011 11:16:29.0630] [1] The following 1 error(s) occurred during task execution:
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;[06-22-2011 11:16:29.0630] [1] 0. ErrorRecord: Active Directory operation failed on dc001.zorg.local. This error is not retriable. Additional information: The requested object has a non-unique identifier and cannot be retrieved.
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;Active directory response: 0000219D: SvcErr: DSID-031A0FC0, problem 5003 (WILL_NOT_PERFORM), data 0
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;[06-22-2011 11:16:29.0630] [1] 0. ErrorRecord: Microsoft.Exchange.Data.Directory.ADOperationException: Active Directory operation failed on dc001.zorg.local. This error is not retriable. Additional information: The requested object has a non-unique identifier and cannot be retrieved.
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;Active directory response: 0000219D: SvcErr: DSID-031A0FC0, problem 5003 (WILL_NOT_PERFORM), data 0&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;I remembered from a &lt;a href="http://twitter.com/#!/HelgeKlein/status/79641965238562817" target="_blank"&gt;Tweet by Helge Klein&lt;/a&gt; recently that the Active Directory schema has no mechanism for enforcing uniqueness of an attribute.&lt;/p&gt;</description></item><item><title>Exchange 2010 well-known object entry install error</title><link>https://remkoweijnen.nl/blog/2011/06/24/exchange-2010-well-known-object-entry-install-error/</link><pubDate>Fri, 24 Jun 2011 12:52:30 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2011/06/24/exchange-2010-well-known-object-entry-install-error/</guid><description>&lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2011/06/SNAGHTML1ca684c.webp" class="glightbox" data-type="image" data-gallery="post-1921"&gt;&lt;img loading="lazy" decoding="async" style="border-width: 0px; padding-top: 0px; padding-right: 0px; padding-left: 0px; display: inline; background-image: none;" title="SNAGHTML1ca684c" src="https://remkoweijnen.nl/blog/wp-content/uploads/2011/06/SNAGHTML1ca684c_thumb.webp" border="0" alt="SNAGHTML1ca684c" width="49" height="49" align="left" /&gt;&lt;/a&gt;Today I was testing the installation of Exchange 2010 in a VMWare sandbox environment. We created the sandbox to test migration from a 2003 AD and Exchange environment to 2008 R2 with Exchange 2010.&lt;/p&gt;
&lt;p&gt;We used a P2V to get real copies of the Active Directory and the AD upgrade to 2008 R2 was already tested.&lt;/p&gt;
&lt;p&gt;But during the Exchange installation in the sandbox I got the following error:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2011/06/image16.webp" class="glightbox" data-type="image" data-gallery="post-1921"&gt;&lt;img loading="lazy" decoding="async" style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="Exchange Server 2010 Setup Error" src="https://remkoweijnen.nl/blog/wp-content/uploads/2011/06/image_thumb16.webp" border="0" alt="The well-known object entry on the otherWellKnownObjects attribute in the container object CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=zorg,DC=local points to an invalid DN or a deleted object. Remove the entry, and then rerun the task." width="429" height="366" /&gt;&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Reading the otherWellKnownObjects attribute with PowerShell</title><link>https://remkoweijnen.nl/blog/2011/06/24/reading-the-otherwellknownobjects-attribute-with-powershell/</link><pubDate>Fri, 24 Jun 2011 11:19:25 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2011/06/24/reading-the-otherwellknownobjects-attribute-with-powershell/</guid><description>&lt;p&gt;I wanted to read the &lt;a href="http://msdn.microsoft.com/en-us/library/ms679095(v=vs.85).aspx" target="_blank"&gt;otherWellKnownObjects&lt;/a&gt; attribute from an Active Directory object.&lt;/p&gt; &lt;p&gt;In my case this was the Microsoft Exchange container in the Configuration partition:&lt;/p&gt; &lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2011/06/image14.webp" class="glightbox" data-type="image" data-gallery="post-1899"&gt;&lt;img loading="lazy" decoding="async" style="background-image: none; border-right-width: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://remkoweijnen.nl/blog/wp-content/uploads/2011/06/image_thumb14.webp" width="243" height="317" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;The otherWellKnownObjects attribute is of type ADSTYPE_DN_WITH_BINARY which unfortunately cannot be viewed or edited with ADSI Edit:&lt;/p&gt; &lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2011/06/image15.webp" class="glightbox" data-type="image" data-gallery="post-1899"&gt;&lt;img loading="lazy" decoding="async" style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="ADSI Edit" border="0" alt="There is no editor registered to handle this attribute type" src="https://remkoweijnen.nl/blog/wp-content/uploads/2011/06/image_thumb15.webp" width="381" height="149" /&gt;&lt;/a&gt;&amp;#160;&lt;/p&gt; &lt;p&gt;&amp;#160;&lt;/p&gt;</description></item><item><title>Delphi TSaveDialog doesn’t work on Windows PE</title><link>https://remkoweijnen.nl/blog/2011/06/21/delphi-tsavedialog-doesnt-work-on-windows-pe/</link><pubDate>Tue, 21 Jun 2011 15:03:07 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2011/06/21/delphi-tsavedialog-doesnt-work-on-windows-pe/</guid><description>&lt;p&gt;In my &lt;a href="https://remkoweijnen.nl/blog/2011/06/18/switch-sata-operation-mode/"&gt;SATA Controller Identification tool&lt;/a&gt; I was using the TSaveDialog (Delphi 2010) but I got a report that under Windows PE the dialog is never shown.&lt;/p&gt;
&lt;p&gt;There&amp;rsquo;s no exception and I didn&amp;rsquo;t really bother to check why it fails. Instead I decided to replace it with the &lt;a href="http://msdn.microsoft.com/en-us/library/ms646928(v=vs.85).aspx" target="_blank"&gt;GetSaveFileName&lt;/a&gt; API which does work under Windows PE.&lt;/p&gt;</description></item><item><title>Switch SATA Operation Mode</title><link>https://remkoweijnen.nl/blog/2011/06/18/switch-sata-operation-mode/</link><pubDate>Sat, 18 Jun 2011 21:38:19 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2011/06/18/switch-sata-operation-mode/</guid><description>&lt;p&gt;Modern systems usually offer different SATA Operation Modes such as ATA, AHCI or IRRT.&lt;/p&gt;
&lt;p&gt;The AHCI mode offers extra features such as hot swapping and &lt;a title="Wikipedia Native Command Queueing" href="http://en.wikipedia.org/wiki/Native_Command_Queuing" target="_blank"&gt;native command queuing&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Many vendors set the SATA Operation Mode to ATA by default because it&amp;rsquo;s the most compatible mode but there are a few reasons why you might want to change it:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;AHCI has a higher performance than ATA.&lt;/li&gt;
	&lt;li&gt;AHCI is a requirement for the &lt;a title="Why You Need TRIM For Your SSD" href="http://www.bit-tech.net/hardware/storage/2010/02/04/windows-7-ssd-performance-and-trim/" target="_blank"&gt;TRIM command&lt;/a&gt;.&lt;/li&gt;
	&lt;li&gt;AHCI is required for self encrypting hard drives&lt;/li&gt;
&lt;/ul&gt;
&lt;span style="color: #4c4c4c;"&gt;Please note that the IRRT (integrated raid) mode is supposed to support all functionality of AHCI but in my experience it doesn't. &lt;/span&gt;
&lt;p&gt;&lt;span style="color: #4c4c4c;"&gt;So the question is: how do we switch the SATA Operation Mode from ATA or IRRT to AHCI?&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Crack WEP Encryption</title><link>https://remkoweijnen.nl/blog/2011/06/14/crack-wep-encryption/</link><pubDate>Tue, 14 Jun 2011 11:55:39 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2011/06/14/crack-wep-encryption/</guid><description>&lt;p&gt;I think everybody knows that using &lt;a href="http://en.wikipedia.org/wiki/Wired_Equivalent_Privacy" target="_blank"&gt;WEP&lt;/a&gt; to encrypt your WiFi network is not very safe. To demonstrate this I will show you how easy it is to crack the WEP encryption in this post.&lt;/p&gt;
&lt;p&gt;Note that I am using my own Access Point here so I am not actually cracking someone else&amp;rsquo;s WEP Key.&lt;/p&gt;
&lt;p&gt;Requirements:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;span style="color: #35383d;"&gt;&lt;a href="http://www.backtrack-linux.org/downloads/" target="_blank"&gt;back|track Linux distribution&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;
	&lt;li&gt;&lt;span style="color: #35383d;"&gt;USB WiFi card (most internal WiFi cards will not work)&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
	&lt;li&gt;&lt;/li&gt;
	&lt;li&gt;In this post I am using the 32 bit back|track 5 VMWare image which you can use with VMWare Workstation or VMWare player.&lt;a class="glightbox" data-type="image" data-gallery="post-1833" href="https://remkoweijnen.nl/blog/wp-content/uploads/2011/06/image.webp"&gt;&lt;img loading="lazy" decoding="async" style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="back|track downloads" src="https://remkoweijnen.nl/blog/wp-content/uploads/2011/06/image_thumb.webp" border="0" alt="back|track downloads" width="244" height="145" /&gt;&lt;/a&gt;
&lt;p&gt;After starting the back track Virtual Machine you can login with username &lt;strong&gt;root&lt;/strong&gt; and password &lt;strong&gt;toor&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;a class="glightbox" data-type="image" data-gallery="post-1833" href="https://remkoweijnen.nl/blog/wp-content/uploads/2011/06/image1.webp"&gt;&lt;img loading="lazy" decoding="async" style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="back track 5 logon screen" src="https://remkoweijnen.nl/blog/wp-content/uploads/2011/06/image_thumb1.webp" border="0" alt="back track 5 logon screen" width="428" height="322" /&gt;&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Installing Dell Wireless 5530 HSPA Mini PCI</title><link>https://remkoweijnen.nl/blog/2011/05/27/installing-dell-wireless-5530-hspa-mini-pci/</link><pubDate>Fri, 27 May 2011 17:40:14 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2011/05/27/installing-dell-wireless-5530-hspa-mini-pci/</guid><description>&lt;p&gt;&lt;strong&gt;EDIT:&lt;/strong&gt; See my &lt;a href="https://remkoweijnen.nl/blog/2011/11/13/installing-dell-wireless-5530-hspa-mini-pc-2/"&gt;followup article&lt;/a&gt; to learn how to reverse driver_auth.exe, decrypt and encrypt dell_wwan_sysID.dat.&lt;/p&gt;
&lt;p&gt;I bought a Dell Wireless 5530 HSPA Mini PCI card for my Dell Precision M4500 laptop.&lt;/p&gt;
&lt;p&gt;This is a small expansion card that works together with the built in SIM card slot that is present in most Dell (Business) laptops.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2011/05/016.jpg" class="glightbox" data-type="image" data-gallery="post-1809"&gt;&lt;img loading="lazy" decoding="async" style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="-) 016" src="https://remkoweijnen.nl/blog/wp-content/uploads/2011/05/016_thumb.jpg" alt="-) 016" width="283" height="212" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This SIM card slot is usually located near the battery compartment:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2011/05/SimCardSlot.webp" class="glightbox" data-type="image" data-gallery="post-1809"&gt;&lt;img loading="lazy" decoding="async" style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="SimCardSlot" src="https://remkoweijnen.nl/blog/wp-content/uploads/2011/05/SimCardSlot_thumb.webp" alt="SimCardSlot" width="283" height="212" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The card was installed in a few minutes since the antenna cables were present already and on my laptop I only needed to remove the backcover with just one screw.&lt;/p&gt;
&lt;p&gt;Then I wanted to install the required software but this card is not officially supported in the M4500 (I bought this card because it was much cheaper on ebay).&lt;/p&gt;
&lt;p&gt;So I took the driver from the M4400/Latitude E range, labeled &lt;a title="R251153.exe" href="http://ftp.dell.com/comm/R251153.exe"&gt;R251153&lt;/a&gt; but I got this error message when installing:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2011/05/image22.webp" class="glightbox" data-type="image" data-gallery="post-1809"&gt;&lt;img loading="lazy" decoding="async" style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="Internal error 23000" src="https://remkoweijnen.nl/blog/wp-content/uploads/2011/05/image_thumb22.webp" alt="Internal error 23000. Authentification failed. The Dell Wireless 5540 HSPA Mobile Broadband Mini-Card cannot be installed on this computer" width="324" height="153" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;</description></item><item><title>Determining stack size</title><link>https://remkoweijnen.nl/blog/2011/05/27/determining-stack-size/</link><pubDate>Fri, 27 May 2011 15:10:00 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2011/05/27/determining-stack-size/</guid><description>&lt;p&gt;I just read an answer on &lt;a href="http://stackoverflow.com/questions/6150018/what-is-a-safe-maximum-stack-size-or-how-to-measure-use-of-stack" target="_blank"&gt;StackOverflow&lt;/a&gt; with this code:&lt;/p&gt; 
&lt;div class="codecard"&gt;
 &lt;div class="codehead"&gt;
 &lt;span class="codefile"&gt;&lt;/span&gt;
 &lt;span class="codetools" data-pagefind-ignore&gt;
 &lt;span class="codelang"&gt;objectpascal&lt;/span&gt;
 &lt;button class="codebtn" type="button" data-copy&gt;Copy&lt;/button&gt;
 &lt;a class="codebtn" download=".pas" href="data:text/plain;charset=utf-8;base64,dmFyCiAgZXU6RFdPUkQ7CmJlZ2luCiAgYXNtCiAgICBtb3YgZWF4LFtmczokNF0KICAgIG1vdiBlYngsW2ZzOiQ4XQogICAgc3ViIGVheCxlYngKICAgIG1vdiBldSxlYXgKICBlbmQ7CgogIFNob3dNZXNzYWdlKEludFRvU3RyKGV1KSk7CmVuZDs="&gt;Download&lt;/a&gt;
 &lt;/span&gt;
 &lt;/div&gt;
 &lt;div class="codebody"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-objectpascal" data-lang="objectpascal"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="kr"&gt;var&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;eu&lt;span class="o"&gt;:&lt;/span&gt;DWORD&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="kr"&gt;begin&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kr"&gt;asm&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;mov&lt;span class="w"&gt; &lt;/span&gt;eax&lt;span class="p"&gt;,[&lt;/span&gt;fs&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="mh"&gt;$4&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;mov&lt;span class="w"&gt; &lt;/span&gt;ebx&lt;span class="p"&gt;,[&lt;/span&gt;fs&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="mh"&gt;$8&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;sub&lt;span class="w"&gt; &lt;/span&gt;eax&lt;span class="p"&gt;,&lt;/span&gt;ebx
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;mov&lt;span class="w"&gt; &lt;/span&gt;eu&lt;span class="p"&gt;,&lt;/span&gt;eax
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kr"&gt;end&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;ShowMessage&lt;span class="o"&gt;(&lt;/span&gt;IntToStr&lt;span class="o"&gt;(&lt;/span&gt;eu&lt;span class="o"&gt;))&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="kr"&gt;end&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Unfortunately it lacked explanation, so what does this code do?&lt;/p&gt;</description></item><item><title>RNS 510 Checksum Calculator</title><link>https://remkoweijnen.nl/blog/2011/05/20/rns-510-checksum-calculator/</link><pubDate>Fri, 20 May 2011 16:42:27 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2011/05/20/rns-510-checksum-calculator/</guid><description>&lt;p&gt;About a year ago I wrote a checksum calculator for the Volkswagen RNS 510 navigation unit.&lt;/p&gt;
&lt;p&gt;The checksum is a variant on Crc16 and is present either at the end of certain files (eg #CRC16:db1d) or as a special file with the name CRC.16.&lt;/p&gt;</description></item><item><title>Renaming and hiding object in PowerPoint</title><link>https://remkoweijnen.nl/blog/2011/05/20/renaming-and-hiding-object-in-powerpoint/</link><pubDate>Fri, 20 May 2011 11:26:59 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2011/05/20/renaming-and-hiding-object-in-powerpoint/</guid><description>&lt;p&gt;I was working on a PowerPoint presentation that included screenshots that were using the Appear animation. I use it to only show a particular screenshot when I am actually talking about it.&lt;/p&gt; &lt;p&gt;However when editing the slide, the screenshots hide the slide text which makes it difficult to edit it.&lt;/p&gt; &lt;p&gt;And in the Animation Pane the pictures are shown as Picture1, Picture2 etc.&lt;/p&gt; &lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2011/05/image19.webp" class="glightbox" data-type="image" data-gallery="post-1787"&gt;&lt;img loading="lazy" decoding="async" style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://remkoweijnen.nl/blog/wp-content/uploads/2011/05/image_thumb19.webp" width="225" height="147" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;So I wanted two things;&lt;/p&gt; &lt;ol&gt; &lt;li&gt;Rename the object to a more meaningfull name in the Animation Pane &lt;/li&gt; &lt;li&gt;Hide the screenshots when I want to edit the text in the slide. &lt;/li&gt; &lt;/ol&gt; &lt;p&gt;&amp;#160;&lt;/p&gt;</description></item><item><title>Using i-Clickr when you have no WiFi Connection</title><link>https://remkoweijnen.nl/blog/2011/05/20/using-i-clickr-when-you-have-no-wifi-connection/</link><pubDate>Fri, 20 May 2011 11:22:25 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2011/05/20/using-i-clickr-when-you-have-no-wifi-connection/</guid><description>&lt;p&gt;I started using the &lt;a href="http://www.senstic.com/iphone/iclickr/iclickr.aspx" target="_blank"&gt;i-Clickr PowerPoint Remote&lt;/a&gt; iPhone App for my presentations recently. I like this app as it shows me the current (or next slide), annations and previous/next buttons:&lt;/p&gt; &lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2011/05/IMG_0118.webp" class="glightbox" data-type="image" data-gallery="post-1777"&gt;&lt;img loading="lazy" decoding="async" style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="IMG_0118" border="0" alt="IMG_0118" src="https://remkoweijnen.nl/blog/wp-content/uploads/2011/05/IMG_0118_thumb.webp" width="164" height="244" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&amp;#160;&lt;/p&gt;</description></item><item><title>How Outlook and Exchange handle Timezones</title><link>https://remkoweijnen.nl/blog/2011/05/18/how-outlook-and-exchange-handle-timezones/</link><pubDate>Wed, 18 May 2011 19:53:27 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2011/05/18/how-outlook-and-exchange-handle-timezones/</guid><description>&lt;p&gt;Again an old war story, this time about timezone handling in Outlook/Exchange.&lt;/p&gt; &lt;p&gt;I am not sure which year it was but I had just started to work for a new company and inherited an Exchange 5.5 Server.&lt;/p&gt; &lt;p&gt;The mail had been migrated from an earlier version and calendar data was migrated from &lt;a href="http://en.wikipedia.org/wiki/Microsoft_Schedule_Plus" target="_blank"&gt;Schedule+&lt;/a&gt;.&lt;/p&gt; &lt;p&gt;On the first change to Daylight Savings (DTS) all recurring appointments where shown one hour later (or earlier can't remember) in Outlook. A manual change was not an option: there were over 2000 mailboxes each with a lot of appointments.&lt;/p&gt; &lt;p&gt;We first tried a workaround by disabling DTS on the the workstations and then manually change the time when changing from and to DTS.&amp;#160; &lt;/p&gt; &lt;p&gt;But this influenced the timestamps on externals mails and of course appointments with external parties.&lt;/p&gt; &lt;p&gt;After a lot of (and I really mean a lot) of researching I found that Outlook stores all times in an appointment as relative (UTC) time. &lt;/p&gt; &lt;p&gt;Upon display it uses an undocumented TimeZone descriptor field to convert to Local Time.&lt;/p&gt; &lt;p&gt;&amp;#160;&lt;/p&gt;</description></item><item><title>Stuff from an ancient past</title><link>https://remkoweijnen.nl/blog/2011/05/18/stuff-from-an-ancien-past/</link><pubDate>Wed, 18 May 2011 10:08:35 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2011/05/18/stuff-from-an-ancien-past/</guid><description>&lt;p&gt;I just found a very old backup file containing old source code for a few tools I wrote ages ago.&lt;/p&gt; &lt;p&gt;This was in 1997 on my first job for a company called PTT Telecom (the Dutch Telecoms) and I wrote some tools to make life easier.&lt;/p&gt; &lt;p&gt;They were all written in Turbo Pascal and supported Long Filenames when running under Windows '95 (there was a trick to do that under DOS).&lt;/p&gt; &lt;p&gt;The first tool was called Retreive Tool, it parsed a backup file from a private branch exchange (PBX) and could make reports about Licensing, the hardware in the PBX, Extension numbers and their hardware positions and so on.&lt;/p&gt; &lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2011/05/image13.webp" class="glightbox" data-type="image" data-gallery="post-1757"&gt;&lt;img loading="lazy" decoding="async" style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://remkoweijnen.nl/blog/wp-content/uploads/2011/05/image_thumb13.webp" width="421" height="199" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&amp;#160;&lt;/p&gt;</description></item><item><title>Programmatically determine if we run server core</title><link>https://remkoweijnen.nl/blog/2011/05/17/programmatically-determine-if-we-run-server-core/</link><pubDate>Tue, 17 May 2011 21:32:22 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2011/05/17/programmatically-determine-if-we-run-server-core/</guid><description>&lt;p&gt;If you want to check if you are running on a Server Core edition of Windows you can use the &lt;a href="http://msdn.microsoft.com/en-us/library/ms724358.aspx" target="_blank"&gt;GetProductInfo&lt;/a&gt; API.&lt;/p&gt; &lt;p&gt;GetProductInfo takes 4 input parameters that can be obtained using &lt;a href="http://msdn.microsoft.com/en-us/library/ms724451(VS.85).aspx" target="_blank"&gt;GetVersionEx&lt;/a&gt; and the &lt;a href="http://msdn.microsoft.com/en-us/library/ms724833(v=VS.85).aspx" target="_blank"&gt;OSVERSIONINFOEX&lt;/a&gt; structure:&lt;/p&gt; 
&lt;div class="codecard"&gt;
 &lt;div class="codehead"&gt;
 &lt;span class="codefile"&gt;&lt;/span&gt;
 &lt;span class="codetools" data-pagefind-ignore&gt;
 &lt;span class="codelang"&gt;objectpascal&lt;/span&gt;
 &lt;button class="codebtn" type="button" data-copy&gt;Copy&lt;/button&gt;
 &lt;a class="codebtn" download=".pas" href="data:text/plain;charset=utf-8;base64,dmFyCiAgb3N2aTogT1NWRVJTSU9OSU5GT0VYOwpiZWdpbgogIFplcm9NZW1vcnkoQG9zdmksIFNpemVPZihvc3ZpKSk7CiAgb3N2aS5kd09TVmVyc2lvbkluZm9TaXplIDo9IFNpemVPZihvc3ZpKTsKICBXaW4zMkNoZWNrKEdldFZlcnNpb25FeChvc3ZpKSk7"&gt;Download&lt;/a&gt;
 &lt;/span&gt;
 &lt;/div&gt;
 &lt;div class="codebody"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-objectpascal" data-lang="objectpascal"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="kr"&gt;var&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;osvi&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;OSVERSIONINFOEX&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="kr"&gt;begin&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;ZeroMemory&lt;span class="o"&gt;(@&lt;/span&gt;osvi&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;SizeOf&lt;span class="o"&gt;(&lt;/span&gt;osvi&lt;span class="o"&gt;))&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;osvi&lt;span class="p"&gt;.&lt;/span&gt;dwOSVersionInfoSize&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;:=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;SizeOf&lt;span class="o"&gt;(&lt;/span&gt;osvi&lt;span class="o"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;Win32Check&lt;span class="o"&gt;(&lt;/span&gt;GetVersionEx&lt;span class="o"&gt;(&lt;/span&gt;osvi&lt;span class="o"&gt;))&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;No we call GetProductInfo:&lt;/p&gt;
&lt;div class="codecard"&gt;
 &lt;div class="codehead"&gt;
 &lt;span class="codefile"&gt;&lt;/span&gt;
 &lt;span class="codetools" data-pagefind-ignore&gt;
 &lt;span class="codelang"&gt;objectpascal&lt;/span&gt;
 &lt;button class="codebtn" type="button" data-copy&gt;Copy&lt;/button&gt;
 &lt;a class="codebtn" download=".pas" href="data:text/plain;charset=utf-8;base64,dmFyCiAgZHdQcm9kVHlwZTogRFdPUkQ7CmJlZ2luCiAgV2luMzJDaGVjayhHZXRQcm9kdWN0SW5mbyhvc3ZpLmR3TWFqb3JWZXJzaW9uLCBvc3ZpLmR3TWlub3JWZXJzaW9uLAogICAgb3N2aS53U2VydmljZVBhY2tNYWpvciwgb3N2aS53U2VydmljZVBhY2tNaW5vciwgZHdQcm9kVHlwZSkpOw=="&gt;Download&lt;/a&gt;
 &lt;/span&gt;
 &lt;/div&gt;
 &lt;div class="codebody"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-objectpascal" data-lang="objectpascal"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="kr"&gt;var&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;dwProdType&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;DWORD&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="kr"&gt;begin&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;Win32Check&lt;span class="o"&gt;(&lt;/span&gt;GetProductInfo&lt;span class="o"&gt;(&lt;/span&gt;osvi&lt;span class="p"&gt;.&lt;/span&gt;dwMajorVersion&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;osvi&lt;span class="p"&gt;.&lt;/span&gt;dwMinorVersion&lt;span class="p"&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;osvi&lt;span class="p"&gt;.&lt;/span&gt;wServicePackMajor&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;osvi&lt;span class="p"&gt;.&lt;/span&gt;wServicePackMinor&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;dwProdType&lt;span class="o"&gt;))&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&amp;#160;&lt;/p&gt;
&lt;p&gt;&amp;#160;&lt;/p&gt;</description></item><item><title>VW RNS 510 Navigation Startup Pictures</title><link>https://remkoweijnen.nl/blog/2011/05/04/vw-rns-510-navigation-startup-pictures/</link><pubDate>Wed, 04 May 2011 21:06:43 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2011/05/04/vw-rns-510-navigation-startup-pictures/</guid><description>&lt;p&gt;A while ago I started exploring the firmware of an RNS510 Navigation unit. The RNS510 is an OEM navigation system, manufactured by Continental Automotive and is used in several models of Volkswagen, Seat and Skoda Cars&lt;/p&gt; &lt;p&gt;&lt;img src="http://www.volkswagen.nl/media/home/modellen/touran/rns_510.jpg" width="265" height="133" /&gt;&lt;/p&gt; &lt;p&gt;When the units is booting it shows a startup logo and I wanted to replace this logo with my own picture.&lt;/p&gt; &lt;p&gt;&amp;#160;&lt;/p&gt;</description></item><item><title>Deleting scheduled Altiris tasks from SQL</title><link>https://remkoweijnen.nl/blog/2011/05/03/deleting-scheduled-altiris-tasks-from-sql/</link><pubDate>Tue, 03 May 2011 10:27:30 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2011/05/03/deleting-scheduled-altiris-tasks-from-sql/</guid><description>&lt;p&gt;I needed to delete around 50 scheduled tasks from several machines in Altiris because something went wrong in on of the first jobs.&lt;/p&gt; &lt;p&gt;It would have better if the jobs were configured to fail on error and not continue but they weren't.&lt;/p&gt; &lt;p&gt;Deleting the jobs from the Altiris console is very, very, slow. First the console asks for confirmation (after showing the hourglass for a long time): &lt;br /&gt; &lt;br /&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2011/05/image10.webp" class="glightbox" data-type="image" data-gallery="post-1731"&gt;&lt;img loading="lazy" decoding="async" style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://remkoweijnen.nl/blog/wp-content/uploads/2011/05/image_thumb10.webp" width="244" height="88" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Then the actual delete can take a few minutes and then the next server and so on.&lt;/p&gt; &lt;p&gt;I decided to delete the tasks directly from SQL.&lt;/p&gt; &lt;p&gt;I know this is not preferred but I think in the end it's safe enough because I found a stored procedure called &lt;em&gt;del_event_schedule&lt;/em&gt; which looks like this:&lt;/p&gt; 
&lt;div class="codecard"&gt;
 &lt;div class="codehead"&gt;
 &lt;span class="codefile"&gt;&lt;/span&gt;
 &lt;span class="codetools" data-pagefind-ignore&gt;
 &lt;span class="codelang"&gt;sql&lt;/span&gt;
 &lt;button class="codebtn" type="button" data-copy&gt;Copy&lt;/button&gt;
 &lt;a class="codebtn" download=".sql" href="data:text/plain;charset=utf-8;base64,QUxURVIgcHJvY2VkdXJlIFtkYm9dLltkZWxfZXZlbnRfc2NoZWR1bGVdCiAgIEBzY2hlZHVsZV9pZCAgICAgICAgIGludAphcwogICBiZWdpbiB0cmFuc2FjdGlvbgoKICAgZGVsZXRlIGZyb20gZXZlbnRfc2NoZWR1bGUgd2hlcmUgc2NoZWR1bGVfaWQgPSBAc2NoZWR1bGVfaWQKCiAgIGlmIChAQGVycm9yICE9IDApCiAgICAgIHJvbGxiYWNrIHRyYW5zYWN0aW9uCiAgIGVsc2UKICAgICAgY29tbWl0IHRyYW5zYWN0aW9u"&gt;Download&lt;/a&gt;
 &lt;/span&gt;
 &lt;/div&gt;
 &lt;div class="codebody"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-sql" data-lang="sql"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;ALTER&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;procedure&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;dbo&lt;/span&gt;&lt;span class="p"&gt;].[&lt;/span&gt;&lt;span class="n"&gt;del_event_schedule&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;@&lt;/span&gt;&lt;span class="n"&gt;schedule_id&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;int&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;as&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;begin&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;transaction&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;delete&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;from&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;event_schedule&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;where&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;schedule_id&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;@&lt;/span&gt;&lt;span class="n"&gt;schedule_id&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;if&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;@@&lt;/span&gt;&lt;span class="n"&gt;error&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;!=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;rollback&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;transaction&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;else&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;commit&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;transaction&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;So al it does is a (transacted) delete from the table. &lt;/p&gt;
&lt;p&gt;&amp;#160;&lt;/p&gt;</description></item><item><title>SSL Certificates in termsrv.dll</title><link>https://remkoweijnen.nl/blog/2011/05/02/ssl-certificates-in-termsrv-dll/</link><pubDate>Mon, 02 May 2011 14:54:39 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2011/05/02/ssl-certificates-in-termsrv-dll/</guid><description>&lt;p&gt;I was digging around in termsrv.dll yesterday when I noticed that there are some (well 372 to be exact) SSL certificates inside the Terminal Server binary (termsrv.dll):&lt;/p&gt; &lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2011/05/image7.webp" class="glightbox" data-type="image" data-gallery="post-1726"&gt;&lt;img loading="lazy" decoding="async" style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://remkoweijnen.nl/blog/wp-content/uploads/2011/05/image_thumb7.webp" width="416" height="195" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Two of them seem to actually contain the private keys as well, but I am not 100% sure it may be just a certificate in another format.&lt;/p&gt; &lt;p&gt;&amp;#160;&lt;/p&gt;</description></item><item><title>Extremely slow Virtual Machines on HP Smart Array P410</title><link>https://remkoweijnen.nl/blog/2011/05/02/extremely-slow-virtual-machines-on-hp-smart-array-p410/</link><pubDate>Mon, 02 May 2011 14:15:50 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2011/05/02/extremely-slow-virtual-machines-on-hp-smart-array-p410/</guid><description>&lt;p&gt;I was deploying virtualized Citrix XenApp Servers on HP BL460c G6 servers and somehow the storage (direct attached) responded very slowly.&lt;/p&gt; &lt;p&gt;I had expected reduced performance (see &lt;a href="https://remkoweijnen.nl/blog/2010/10/16/slow-power-on-and-storage-operations-with-hp-smart-array-p410i-controller-on-vmware-vsphere-4-0/" target="_blank"&gt;my earlier post&lt;/a&gt;) since I didn't have the&amp;#160; Battery Backed Write Cache module installed. &lt;br /&gt;I did order them but had to start deployment before they arrived. &lt;/p&gt; &lt;p&gt;I did not however expect such an extreme bad performance. Deployment took ages or sometimes failed completely and when logging in to a VM it responded very sluggish. &lt;br /&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;&lt;u&gt;Disk Latency&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;I looked in the vSphere console what the Disk Latency was. Latency under 10ms is usually considered good while a latency between 10 and 20ms is a potential performance problem.&lt;/p&gt; &lt;p&gt;I was shocked to notice that the Disk Latency was much higher with peaks toward 2.000 ms (2 seconds!):&lt;/p&gt; &lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2011/05/DiskLatency.webp" class="glightbox" data-type="image" data-gallery="post-1719"&gt;&lt;img loading="lazy" decoding="async" style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="DiskLatency" border="0" alt="DiskLatency" src="https://remkoweijnen.nl/blog/wp-content/uploads/2011/05/DiskLatency_thumb.webp" width="362" height="243" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&amp;#160;&lt;/p&gt;</description></item><item><title>Apply IP Configuration from a Database</title><link>https://remkoweijnen.nl/blog/2011/04/29/apply-ip-configuration-from-a-database/</link><pubDate>Fri, 29 Apr 2011 10:27:27 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2011/04/29/apply-ip-configuration-from-a-database/</guid><description>&lt;p&gt;I am currently deploying 64 Citrix XenApp servers with Altiris. The deployment consists of an OS Image, OS Configuration and finally Citrix XenApp and Applications.&lt;/p&gt;
&lt;p&gt;In the OS Configuration part the IP configuration needs to be applied and I decided to do this with a database.&lt;/p&gt;
&lt;p&gt;The database consists of 2 tables; one table with the per host settings and one table with the global settings (such as DNS).&lt;/p&gt;
&lt;p&gt;In the Altiris job both tables are read from an embedded VBScript and assigned to the NIC.&lt;/p&gt;
&lt;p&gt;&lt;span style="text-decoration: underline;"&gt;&lt;strong&gt;Database configuration&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;I created a database (SQL Server) called IPManagement with 2 tables:&lt;/p&gt;
&lt;p&gt;&lt;a class="glightbox" data-type="image" data-gallery="post-1695" href="https://remkoweijnen.nl/blog/wp-content/uploads/2011/04/image7.webp"&gt;&lt;img loading="lazy" decoding="async" style="background-image: none; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="image" src="https://remkoweijnen.nl/blog/wp-content/uploads/2011/04/image_thumb7.webp" border="0" alt="image" width="177" height="100" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;</description></item><item><title>HP Smart Array controller previous lockup code 0xAB</title><link>https://remkoweijnen.nl/blog/2011/04/28/hp-smart-array-controller-previous-lockup-code-0xab/</link><pubDate>Thu, 28 Apr 2011 11:47:51 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2011/04/28/hp-smart-array-controller-previous-lockup-code-0xab/</guid><description>&lt;p&gt;I ran into an error when I was upgrading hardware on an HP BL460c G6 Blade.&lt;/p&gt; &lt;p&gt;After placing 2 new (larger) hard drives the Array Configuration would hang after saving the configuration (It just kept blinking "Saving Configuration." forever.&lt;/p&gt; &lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2011/04/image6.webp" class="glightbox" data-type="image" data-gallery="post-1677"&gt;&lt;img loading="lazy" decoding="async" style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://remkoweijnen.nl/blog/wp-content/uploads/2011/04/image_thumb6.webp" width="394" height="296" /&gt;&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Post Ratings Rant</title><link>https://remkoweijnen.nl/blog/2011/04/13/post-ratings-rant/</link><pubDate>Wed, 13 Apr 2011 22:32:30 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2011/04/13/post-ratings-rant/</guid><description>&lt;p&gt;On my blog I offer visitors the options to rate the articles I write using either thumbs up/down or a 1-10 star rating.&lt;/p&gt; &lt;p&gt;I am interested in what content my readers like so these ratings (and of course comments you leave) indicate what kind of articles you like and which you don't.&lt;/p&gt; &lt;p&gt;However some people feel the need to abuse this, take a look at this:&lt;/p&gt; &lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2011/04/image2.webp" class="glightbox" data-type="image" data-gallery="post-1674"&gt;&lt;img loading="lazy" decoding="async" style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://remkoweijnen.nl/blog/wp-content/uploads/2011/04/image_thumb2.webp" width="175" height="244" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&amp;#160;&lt;/p&gt;</description></item><item><title>Wordpress redirects to wp-admin/install.php</title><link>https://remkoweijnen.nl/blog/2011/04/13/wordpress-redirects-to-wp-admininstall-php/</link><pubDate>Wed, 13 Apr 2011 22:14:36 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2011/04/13/wordpress-redirects-to-wp-admininstall-php/</guid><description>&lt;p&gt;My blog has been down for a short period, if you tried to open Wordpress would redirect to wp-admin.install.php and you would see this message:&lt;/p&gt;
&lt;p&gt;&lt;a class="glightbox" data-type="image" data-gallery="post-1665" href="https://remkoweijnen.nl/blog/wp-content/uploads/2011/04/image.webp"&gt;&lt;img loading="lazy" decoding="async" style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="image" src="https://remkoweijnen.nl/blog/wp-content/uploads/2011/04/image_thumb.webp" border="0" alt="image" width="394" height="132" /&gt;&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Windows 2003 Server Standard memory patch</title><link>https://remkoweijnen.nl/blog/2011/03/27/windows-2003-server-standard-memory-patch/</link><pubDate>Sun, 27 Mar 2011 21:42:17 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2011/03/27/windows-2003-server-standard-memory-patch/</guid><description>&lt;p&gt;So a few days ago I got new memory for a development box - an upgrade from 4 to 6 GiB (later on even 8 GiB). Much appreciated as you can imagine. After dismissing the BIOS warning about changed amount of memory (oh really? :mrgreen:), I booted into Ubuntu and happily looked at the memory stats. After that I booted into Windows (a Windows 2003 Server Standard, but I&amp;rsquo;ll just use Windows from here on) and was disappointed to see only 4 GiB available. This is apparently a limitation specific to the Standard edition.&lt;/p&gt;
&lt;p&gt;After some pouting, I decided to take action. Of course one of my first thoughts was to ask Remko, because he had done similar things for some other Windows versions. He pointed me to &lt;code&gt;MmInitSystem&lt;/code&gt;, which was not an immediate hit, though. I loaded my kernel .exe into a disassembler to look at the details, but &lt;code&gt;MmInitSystem&lt;/code&gt; was a lengthy and rather boring function. However, the advice was good and got me a good bit closer, especially when Remko also mentioned the use of &lt;code&gt;ExVerifySuite&lt;/code&gt; in the logic that would set the limits. So I brought up the references to &lt;code&gt;ExVerifySuite&lt;/code&gt; and - surprise surprise - only seven other functions used it and out of these only one was not recognized by name from the exports and debug symbols. And since the inspection of that function (at &lt;code&gt;0x00615FB0&lt;/code&gt; in my kernel) proved that it was being called from &lt;code&gt;MmInitSystem&lt;/code&gt;, this was an immediate hit.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;</description></item><item><title>dUP2 Patcher update</title><link>https://remkoweijnen.nl/blog/2011/03/27/dup2-patcher-update/</link><pubDate>Sun, 27 Mar 2011 21:31:24 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2011/03/27/dup2-patcher-update/</guid><description>&lt;p&gt;A missing feature in the dUP2 Patch Generator has always been to correct the PE Checksum.&lt;/p&gt; &lt;p&gt;After all if you write a clever search&amp;amp;replace patch but have to include the PE Checksum it doesn't make any sense.&lt;/p&gt; &lt;p&gt;But then I saw there's a beta version of dUP2 that supports ome new features one of them being a fix checksum option!&lt;/p&gt;</description></item><item><title>Tips for using SysPrep with Altiris</title><link>https://remkoweijnen.nl/blog/2011/03/22/tips-for-using-sysprep-with-altiris/</link><pubDate>Tue, 22 Mar 2011 12:29:32 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2011/03/22/tips-for-using-sysprep-with-altiris/</guid><description>&lt;p&gt;Altiris has built in support for &lt;a href="http://en.wikipedia.org/wiki/Sysprep" target="_blank"&gt;Sysprep&lt;/a&gt; when creating or distributing images.&lt;/p&gt; &lt;p&gt;The documentation doesn't mention some things that are worth knowing so I will try to address them in this post.&lt;/p&gt; &lt;p&gt;Sysprep support can be added to Altiris during the install where it will ask you for the Sysprep install files (deploy.cab) per selected OS.&lt;/p&gt; &lt;p&gt;If you didn't add Sysprep during install you can copy deploy.cab to one of subfolders in the Sysprep folder. Eg for 32 bit Windows 2003 deploy.cab goes to &lt;em&gt;Sysprep\DotNet\x86&lt;/em&gt;:&lt;/p&gt; &lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2011/03/image46.webp" class="glightbox" data-type="image" data-gallery="post-1651"&gt;&lt;img loading="lazy" decoding="async" style="background-image: none; border-right-width: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://remkoweijnen.nl/blog/wp-content/uploads/2011/03/image_thumb46.webp" width="86" height="244" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;As I wrote earlier in &lt;a href="https://remkoweijnen.nl/blog/2010/11/03/cannot-complete-customization-when-cloning-from-template/" target="_blank"&gt;this post&lt;/a&gt; it's very important to use the correct Sysprep version as each OS has it's own version. &lt;br /&gt;&lt;/p&gt;</description></item><item><title>Add VMXNET3 driver to Windows PE PXE Image</title><link>https://remkoweijnen.nl/blog/2011/03/18/add-vmxnet3-driver-to-windows-pe-pxe-image/</link><pubDate>Fri, 18 Mar 2011 14:20:08 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2011/03/18/add-vmxnet3-driver-to-windows-pe-pxe-image/</guid><description>&lt;p&gt;After &lt;a href="https://remkoweijnen.nl/blog/2011/03/17/compiling-drivers-for-altiris-linux-pxe-image-part-2/" target="_blank"&gt;compiling the VMWare VMXNET3 Driver&lt;/a&gt; for Linux I needed a driver for the Windows PE Image as well.&lt;/p&gt; &lt;p&gt;Compared to what I needed to do for Linux this was a breeze!&lt;/p&gt; &lt;p&gt;First we need the VMWare tools again so I grabbed windows.iso from /vmimages/tools-isomages.&lt;/p&gt; &lt;p&gt;The driver files are in a cab file, VMXNET3.cab, extract this cab file somewhere and open the Altiris PXE Configuration tool.&lt;/p&gt; &lt;p&gt;Select the Windows PE Entry and click Edit:&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2011/03/image39.webp" class="glightbox" data-type="image" data-gallery="post-1626"&gt;&lt;img loading="lazy" decoding="async" style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://remkoweijnen.nl/blog/wp-content/uploads/2011/03/image_thumb39.webp" width="403" height="142" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Then click Edit Boot Image: &lt;br /&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2011/03/image40.webp" class="glightbox" data-type="image" data-gallery="post-1626"&gt;&lt;img loading="lazy" decoding="async" style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://remkoweijnen.nl/blog/wp-content/uploads/2011/03/image_thumb40.webp" width="244" height="171" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&amp;#160;&lt;/p&gt;</description></item><item><title>Compiling Drivers for Altiris Linux PXE Image Part 2</title><link>https://remkoweijnen.nl/blog/2011/03/17/compiling-drivers-for-altiris-linux-pxe-image-part-2/</link><pubDate>Thu, 17 Mar 2011 15:39:12 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2011/03/17/compiling-drivers-for-altiris-linux-pxe-image-part-2/</guid><description>&lt;p&gt;In the &lt;a href="https://remkoweijnen.nl/blog/2011/03/17/compiling-drivers-for-altiris-linux-pxe-image-part-1/" target="_blank"&gt;previous part&lt;/a&gt; we have already setup the Ubuntu Virtual Machine and we did a build of the kernel image.&lt;/p&gt;
&lt;p&gt;So now we can finally compile the driver, in my case I needed a driver for VMWare&amp;rsquo;s VMXNET3 Network Card.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&amp;amp;cmd=displayKC&amp;amp;externalId=1001805" target="_blank"&gt;VMXNET3&lt;/a&gt; is VMWare&amp;rsquo;s paravirtualized network driver and offers better performance with less host processing power compared to the default e1000 driver.&lt;/p&gt;
&lt;p&gt;First we need the source for the driver, we can obtain this from the VMWare Tools either from a running Linux VM or like I did by transferring the file linux.iso from /vmimages/tools-isomages from the vSphere server.&lt;/p&gt;
&lt;p&gt;In the iso file is a single file, VMWARETO.TGZ and after unpacking we get a folder called &lt;em&gt;vmware-tools-distrib&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;In &lt;em&gt;vmware-tools-distrib/lib/modules/source&lt;/em&gt; we find the vmxnet3.tar file that contains our sources. Copy the tar to the Virtual Machine and unpack it, then start a Terminal and cd to the directory where you unpacked the tar.&lt;/p&gt;
&lt;p&gt;The first time I attempted a compile I received an error indicating that the file &lt;em&gt;autoconf.h&lt;/em&gt; could not be found. After I found this &lt;a href="https://bugs.launchpad.net/ubuntu/+source/linux/+bug/579813" target="_blank"&gt;bug report&lt;/a&gt; I was able to fix this by creating a link:&lt;/p&gt;
&lt;div class="codecard"&gt;
 &lt;div class="codehead"&gt;
 &lt;span class="codefile"&gt;&lt;/span&gt;
 &lt;span class="codetools" data-pagefind-ignore&gt;
 &lt;span class="codelang"&gt;bash&lt;/span&gt;
 &lt;button class="codebtn" type="button" data-copy&gt;Copy&lt;/button&gt;
 &lt;a class="codebtn" download=".sh" href="data:text/plain;charset=utf-8;base64,c3VkbyBsbiAtcyAvdXNyL3NyYy9saW51eC1oZWFkZXJzLTIuNi4zNS0yMi1nZW5lcmljL2luY2x1ZGUvZ2VuZXJhdGVkL2F1dG9jb25mLmggL3Vzci9zcmMvbGludXgtaGVhZGVycy0yLjYuMzUtMjItZ2VuZXJpYy9pbmNsdWRlL2xpbnV4L2F1dG9jb25mLmg="&gt;Download&lt;/a&gt;
 &lt;/span&gt;
 &lt;/div&gt;
 &lt;div class="codebody"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;sudo ln -s /usr/src/linux-headers-2.6.35-22-generic/include/generated/autoconf.h /usr/src/linux-headers-2.6.35-22-generic/include/linux/autoconf.h&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;We can compile the driver with the make command, referencing the kernel image we created earlier:&lt;/p&gt;</description></item><item><title>Compiling Drivers for Altiris Linux PXE Image Part 1</title><link>https://remkoweijnen.nl/blog/2011/03/17/compiling-drivers-for-altiris-linux-pxe-image-part-1/</link><pubDate>Thu, 17 Mar 2011 13:07:22 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2011/03/17/compiling-drivers-for-altiris-linux-pxe-image-part-1/</guid><description>&lt;p&gt;First we need to setup a Linux Virtual Machine with a distro of choice (I recommend a 32 bit version). I will be using Ubuntu here and the first step is to &lt;a href="http://www.ubuntu.com/desktop/get-ubuntu/download" target="_blank"&gt;download&lt;/a&gt; the iso.&lt;/p&gt;
&lt;p&gt;At the time of writing Ubuntu 10.10 was the Latest version so I used that one.&lt;/p&gt;
&lt;p&gt;Create a new Virtual Machine and use the iso as install media, I am using VMWare Workstation and it recognises Ubuntu and performs an &amp;ldquo;easy install&amp;rdquo;:&lt;/p&gt;
&lt;p&gt;&lt;a class="glightbox" data-type="image" data-gallery="post-1594" href="https://remkoweijnen.nl/blog/wp-content/uploads/2011/03/image23.webp"&gt;&lt;img loading="lazy" decoding="async" style="background-image: none; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="image" src="https://remkoweijnen.nl/blog/wp-content/uploads/2011/03/image_thumb23.webp" border="0" alt="image" width="244" height="64" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The install is unattended (when VMWare Tools are installed you need to perform a login) and took only 6 minutes on my laptop!&lt;/p&gt;
&lt;p&gt;Now we need to install gcc (the compiler), open the Ubuntu Software Center:&lt;/p&gt;
&lt;p&gt;&lt;a class="glightbox" data-type="image" data-gallery="post-1594" href="https://remkoweijnen.nl/blog/wp-content/uploads/2011/03/image24.webp"&gt;&lt;img loading="lazy" decoding="async" style="background-image: none; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="image" src="https://remkoweijnen.nl/blog/wp-content/uploads/2011/03/image_thumb24.webp" border="0" alt="image" width="232" height="231" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;</description></item><item><title>STOP: 0x0000005D when booting Windows PE</title><link>https://remkoweijnen.nl/blog/2011/03/15/stop-0x0000005d-when-booting-windows-pe/</link><pubDate>Tue, 15 Mar 2011 12:47:13 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2011/03/15/stop-0x0000005d-when-booting-windows-pe/</guid><description>&lt;p&gt;I was booting a new VMWare Virtual Machine with Windows PE through Altiris for initial deployment but Windows PE halted with a BSOD:&lt;/p&gt; &lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2011/03/image22.webp" class="glightbox" data-type="image" data-gallery="post-1570"&gt;&lt;img loading="lazy" decoding="async" style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://remkoweijnen.nl/blog/wp-content/uploads/2011/03/image_thumb22.webp" width="438" height="38" /&gt;&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Windows 2003 align OS disk</title><link>https://remkoweijnen.nl/blog/2011/03/14/windows-2003-align-os-disk/</link><pubDate>Mon, 14 Mar 2011 15:11:48 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2011/03/14/windows-2003-align-os-disk/</guid><description>&lt;p&gt;If you read one of VMWare's Best Practices Guides (in my case &lt;a href="http://www.peppercrew.nl/?p=1637" target="_blank"&gt;this&lt;/a&gt; one) then you may have read that it's important to align guest partitions.&lt;/p&gt; &lt;p&gt;We can do this (for Windows OS) using the DiskPart tool that comes with the OS since Windows 2003 SP1 (there is a &lt;a href="http://support.microsoft.com/kb/923076" target="_blank"&gt;hotfix&lt;/a&gt; for earlier versions).&lt;/p&gt; &lt;p&gt;On Windows 2008, and higher, all partitions are automatically aligned to a &lt;a href="http://frankdenneman.nl/2009/05/windows-2008-disk-alignment/" target="_blank"&gt;1 MB boundary&lt;/a&gt;.&lt;/p&gt; &lt;p&gt;But how to do this for the OS disk on Server 2003? &lt;/p&gt; &lt;p&gt;My first thought was to open a &lt;a href="http://support.microsoft.com/kb/242380" target="_blank"&gt;command prompt during setup&lt;/a&gt;, right before creating the partitions and then use diskpart.&lt;/p&gt; &lt;p&gt;However the OS partition is created during the Text portion of the install process and even though we can get a cmd prompt using SHIFT-F10 we get the recovery console (which has a builtin diskpart but cannot align).&lt;/p&gt; &lt;p&gt;So I used a Windows PE bootdisk. Any version with Diskpart should do but I used a bootdisk from Symantec Backup Exec System Recovery that I've customized to my own needs.&lt;/p&gt; &lt;p&gt;If you boot the original Symantec disk you can open a command prompt by accessing a hidden feature: move the mouse above the "S" from Symantec until you get a Hand icon and press the left mouse button:&lt;/p&gt; &lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2011/03/image12.webp" class="glightbox" data-type="image" data-gallery="post-1561"&gt;&lt;img loading="lazy" decoding="async" style="background-image: none; border-right-width: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://remkoweijnen.nl/blog/wp-content/uploads/2011/03/image_thumb12.webp" width="244" height="184" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&amp;#160;&lt;/p&gt; &lt;p&gt;&amp;#160;&lt;/p&gt;</description></item><item><title>Booting a Virtual Machine from USB Drive</title><link>https://remkoweijnen.nl/blog/2011/03/14/booting-a-virtual-machine-from-usb-drive/</link><pubDate>Mon, 14 Mar 2011 12:59:53 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2011/03/14/booting-a-virtual-machine-from-usb-drive/</guid><description>&lt;p&gt;I wanted to boot a Virtual Machine from an USB Stick but even though you can Connect USB devices to VMWare you cannot boot from it.&lt;/p&gt;
&lt;p&gt;It can be done however using a boot manager that is able to perform a boot from USB media. I used &lt;a href="http://www.plop.at/en/bootmanager.html#download" target="_blank"&gt;Plop Boot Manager&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Download one of the stable releases (I used &lt;a href="http://download.plop.at/files/bootmngr/plpbt-5.0.11-2.zip" target="_blank"&gt;5.0.11-2&lt;/a&gt;) and extract plpbt.img from the archive and mount this (don&amp;rsquo;t forget to select the Connect at power on option) and when booting press Esc for the Boot Menu.&lt;/p&gt;
&lt;p&gt;&lt;a class="glightbox" data-type="image" data-gallery="post-1545" href="https://remkoweijnen.nl/blog/wp-content/uploads/2011/03/image6.webp"&gt;&lt;img loading="lazy" decoding="async" style="background-image: none; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="image" src="https://remkoweijnen.nl/blog/wp-content/uploads/2011/03/image_thumb6.webp" border="0" alt="image" width="244" height="147" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This would be a good time to Connect the USB device to the Virtual Machine, right click the USB device in the bottom bar:&lt;/p&gt;
&lt;p&gt;&lt;a class="glightbox" data-type="image" data-gallery="post-1545" href="https://remkoweijnen.nl/blog/wp-content/uploads/2011/03/image7.webp"&gt;&lt;img loading="lazy" decoding="async" style="background-image: none; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="image" src="https://remkoweijnen.nl/blog/wp-content/uploads/2011/03/image_thumb7.webp" border="0" alt="image" width="244" height="52" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;And select the Connect option:&lt;/p&gt;
&lt;p&gt;&lt;a class="glightbox" data-type="image" data-gallery="post-1545" href="https://remkoweijnen.nl/blog/wp-content/uploads/2011/03/image8.webp"&gt;&lt;img loading="lazy" decoding="async" style="background-image: none; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="image" src="https://remkoweijnen.nl/blog/wp-content/uploads/2011/03/image_thumb8.webp" border="0" alt="image" width="244" height="70" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Click OK on the warning message:&lt;/p&gt;
&lt;p&gt;&lt;a class="glightbox" data-type="image" data-gallery="post-1545" href="https://remkoweijnen.nl/blog/wp-content/uploads/2011/03/image9.webp"&gt;&lt;img loading="lazy" decoding="async" style="background-image: none; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="image" src="https://remkoweijnen.nl/blog/wp-content/uploads/2011/03/image_thumb9.webp" border="0" alt="image" width="244" height="89" /&gt;&lt;/a&gt;&lt;/p&gt;</description></item><item><title>AES-NI Benchmarks</title><link>https://remkoweijnen.nl/blog/2011/03/11/aes-ni-benchmarks/</link><pubDate>Fri, 11 Mar 2011 11:35:20 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2011/03/11/aes-ni-benchmarks/</guid><description>&lt;p&gt;As you may know, recent Intel processors have an extension to the x86 instruction set called Advanced Encryption Standard Instruction Set (&lt;a href="http://en.wikipedia.org/wiki/AES_instruction_set" target="_blank"&gt;AES-NI&lt;/a&gt;).&lt;/p&gt;
&lt;p&gt;AES-NI is basically hardware support for AES based encryption and because I had a chance to run some benchmarks on differing systems I was curious what the impact of AES-NI would be.&lt;/p&gt;
&lt;p&gt;I used &lt;a href="http://www.truecrypt.org/" target="_blank"&gt;TrueCrypt&lt;/a&gt; for running the benchmarks because this is a real life application and it had support for AES-NI.&lt;/p&gt;
&lt;p&gt;I first ran the benchmark on a laptop with an Intel Core2 DUO (P9700 2,80 GHz):&lt;/p&gt;
&lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2011/03/image2.webp" class="glightbox" data-type="image" data-gallery="post-1530"&gt;&lt;img loading="lazy" decoding="async" style="background-image: none; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="image" alt="image" src="https://remkoweijnen.nl/blog/wp-content/uploads/2011/03/image_thumb2.webp" width="244" height="76" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2011/03/clip_image0025.jpg" class="glightbox" data-type="image" data-gallery="post-1530"&gt;&lt;img loading="lazy" decoding="async" style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="clip_image002[5]" alt="clip_image002[5]" src="https://remkoweijnen.nl/blog/wp-content/uploads/2011/03/clip_image0025_thumb.jpg" width="250" height="195" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The next system was an Intel Core i7 Q740 (Quad Core with &lt;a href="http://en.wikipedia.org/wiki/Hyper-threading" target="_blank"&gt;Hyperthreading&lt;/a&gt;, so 8 in total) machine.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2011/03/image3.webp" class="glightbox" data-type="image" data-gallery="post-1530"&gt;&lt;img loading="lazy" decoding="async" style="background-image: none; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="image" alt="image" src="https://remkoweijnen.nl/blog/wp-content/uploads/2011/03/image_thumb3.webp" width="244" height="91" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Office Communicator 2007 R2 crashes after sign on</title><link>https://remkoweijnen.nl/blog/2011/03/10/office-communicator-2007-r2-crashes-after-sign-on/</link><pubDate>Thu, 10 Mar 2011 15:45:45 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2011/03/10/office-communicator-2007-r2-crashes-after-sign-on/</guid><description>&lt;p&gt;After I uninstalled Office 2010 64 bit and installed Office 2010 32 bit I had a problem with Office Communicator 2007 R2.&lt;/p&gt; &lt;p&gt;After entering my password and clicking sign in it crashed every time:&lt;/p&gt; &lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2011/03/image.webp" class="glightbox" data-type="image" data-gallery="post-1515"&gt;&lt;img loading="lazy" decoding="async" style="background-image: none; border-right-width: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://remkoweijnen.nl/blog/wp-content/uploads/2011/03/image_thumb.webp" width="244" height="136" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;In the EventLog an Application Error was recorded with some additional error info:&lt;/p&gt; &lt;blockquote&gt;Event Type: Error Event Source: Application Error Event Category: (100) Event ID: 1000 Date: 10-3-2011 Time: 15:20:52 User: N/A Computer: remkolaptop Description: Faulting application name: communicator.exe, version: 3.5.6907.221, time stamp: 0x4cddcd9f Faulting module name: KERNELBASE.dll, version: 6.1.7601.17514, time stamp: 0x4ce7bafa Exception code: 0xc06d007e Fault offset: 0x0000b727 Faulting process id: 0xf94 Faulting application start time: 0x01cbdf2e592fc53c Faulting application path: C:\Program Files (x86)\Microsoft Office Communicator\communicator.exe Faulting module path: C:\Windows\syswow64\KERNELBASE.dll Report Id: 9a4e3adf-4b21-11e0-8f0f-c0cb38a92f9b For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp. &lt;/blockquote&gt; &lt;p&gt;The exception code is 0xc06d007e which is defined in WINERROR.h as ERROR_MOD_NOT_FOUND, the error description is: "The specified module could not be found". &lt;br /&gt;&lt;/p&gt;</description></item><item><title>Office 2010 cannot remove registry key</title><link>https://remkoweijnen.nl/blog/2011/03/10/office-2010-cannot-remove-registry-key/</link><pubDate>Thu, 10 Mar 2011 14:12:22 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2011/03/10/office-2010-cannot-remove-registry-key/</guid><description>&lt;p&gt;I have worked with Office 2010 x64 for a while now but because of compatibility issues I wanted to remove it and install the x86 version instead.&lt;/p&gt;
&lt;p&gt;After uninstall Office left a key in the registry:&lt;/p&gt;
&lt;blockquote&gt;HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\Common\SmartTag\Actions\{B7EFF951-E52F-45CC-9EF7-57124F2177CC}&lt;/blockquote&gt;
I couldn't remove it so I figured there was a specific process that had opened this key but couldn't find anything (using Process Explorer).
&lt;p&gt;Then I checked the permissions on the Office key but it was set to Full Control for Administrators.&lt;/p&gt;</description></item><item><title>Autologon user on Windows XP/2003 using AutoReconnect pipe - part 3 (implementation details)</title><link>https://remkoweijnen.nl/blog/2011/03/03/autologon-user-on-windows-xp2003-using-autoreconnect-pipe-part-3-implementation-details/</link><pubDate>Thu, 03 Mar 2011 13:00:46 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2011/03/03/autologon-user-on-windows-xp2003-using-autoreconnect-pipe-part-3-implementation-details/</guid><description>&lt;p&gt;In the previous parts (&lt;a href="https://remkoweijnen.nl/blog/2011/02/09/autologon-user-on-windows-xp2003-using-autoreconnect-pipe-part-1-theory/"&gt;part 1&lt;/a&gt; &lt;a href="https://remkoweijnen.nl/blog/2011/03/02/autologon-user-on-windows-xp2003-using-autoreconnect-pipe-part-2-problems-and-workarounds/"&gt;part 2&lt;/a&gt;) i&amp;rsquo;ve described the theoretical part and implementation problems. So, now we can write the code:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;In case we login the user, we just call &lt;a href="http://msdn.microsoft.com/en-us/library/aa378292(v=vs.85).aspx"&gt;LsaLogonUser&lt;/a&gt; to get the token:&lt;/li&gt;
&lt;/ol&gt;</description></item><item><title>Autologon user on Windows XP/2003 using AutoReconnect pipe - part 2 (problems and workarounds)</title><link>https://remkoweijnen.nl/blog/2011/03/02/autologon-user-on-windows-xp2003-using-autoreconnect-pipe-part-2-problems-and-workarounds/</link><pubDate>Wed, 02 Mar 2011 00:10:02 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2011/03/02/autologon-user-on-windows-xp2003-using-autoreconnect-pipe-part-2-problems-and-workarounds/</guid><description>&lt;p&gt;In &lt;a href="https://remkoweijnen.nl/blog/2011/02/09/autologon-user-on-windows-xp2003-using-autoreconnect-pipe-part-1-theory/"&gt;part 1&lt;/a&gt; I&amp;rsquo;ve described the theoretical parts needed for a custom autologon application implementation.&lt;/p&gt;
&lt;p&gt;But there are some practical problems which I will describe here.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;I use the &lt;a href="http://msdn.microsoft.com/en-us/library/aa378292(v=vs.85).aspx"&gt;LsaLogonUser&lt;/a&gt; function to log in the user. However, if I do not pass not null for the &lt;em&gt;LocalGroups&lt;/em&gt; parameter, msgina.dll fails to process the logon.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Why? Because it looks for the &lt;strong&gt;SE_GROUP_LOGON_ID&lt;/strong&gt; SID and treat it as logon SID. So we have to add the logon SID manually:&lt;/p&gt;</description></item><item><title>Autologon user on Windows XP/2003 using AutoReconnect pipe - part 1 (theory)</title><link>https://remkoweijnen.nl/blog/2011/02/28/autologon-user-on-windows-xp2003-using-autoreconnect-pipe-part-1-theory/</link><pubDate>Mon, 28 Feb 2011 10:46:29 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2011/02/28/autologon-user-on-windows-xp2003-using-autoreconnect-pipe-part-1-theory/</guid><description>&lt;p&gt;Windows XP introduced the ability to use Fast User Switching (FUS from here on), which is implemented using &lt;em&gt;Terminal Services&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;But in some cases (i.e. when FUS is not enabled, or when you connect to the console in Windows 2003 server), the Winlogon process in an RDP session needs to transfer credentials to Session 0.&lt;/p&gt;
&lt;p&gt;Although not documented in MSDN, the process of transferring credentials is described by Keith Brown in the June 2005 issue of MSDN magazine: &lt;a href="http://msdn.microsoft.com/en-us/magazine/cc163786.aspx"&gt;Customizing GINA, Part 2&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/aa380577(v=vs.85).aspx"&gt;WlxQueryConsoleSwitchCredentials&lt;/a&gt; and &lt;a href="http://msdn.microsoft.com/en-us/library/aa380563(v=vs.85).aspx"&gt;WlxGetConsoleSwitchCredentials&lt;/a&gt; are used in the transfer with the semi-documented &lt;strong&gt;WLX_SAS_TYPE_AUTHENTICATED&lt;/strong&gt; SAS code constant.&lt;/p&gt;
&lt;p&gt;Internally, &lt;em&gt;winlogon.exe&lt;/em&gt; uses a Named Pipe, &lt;strong&gt;\.\Pipe\TerminalServer\AutoReconnect, &lt;/strong&gt;to implement both of these functions.&lt;/p&gt;
&lt;p&gt;The pipe format is described in this structure:&lt;/p&gt;</description></item><item><title>The case of the intermittent hangs</title><link>https://remkoweijnen.nl/blog/2011/02/14/the-case-of-the-intermittent-hangs/</link><pubDate>Mon, 14 Feb 2011 13:20:40 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2011/02/14/the-case-of-the-intermittent-hangs/</guid><description>&lt;p&gt;Yesterday I had some intermittent hangs on the family pc, and old Medion MD-8800 PC.&lt;/p&gt; &lt;p&gt;&lt;img src="http://www.rcsystems.de/uploads/shop/icons_thumbnails/big/md8800fb.png" width="250" height="250" /&gt;&lt;/p&gt; &lt;p&gt;Since there was no crash and thus no crash dump, there was nothing to debug. &lt;/p&gt; &lt;p&gt;I suspected a hardware issue and opened the pc and I noticed that there was an enormous amount of heat.&lt;/p&gt;</description></item><item><title>Windows XP Cmd Prompt Patch</title><link>https://remkoweijnen.nl/blog/2011/02/08/windows-xp-cmd-prompt-patch/</link><pubDate>Tue, 08 Feb 2011 22:28:31 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2011/02/08/windows-xp-cmd-prompt-patch/</guid><description>&lt;p&gt;A few days ago I needed to test a few things on a Windows XP Workstation running under a regular user account.&lt;/p&gt;
&lt;p&gt;I wanted to verify if some files and registry keys existed but Group Policies were in place that denied me access to the command prompt and regedit.&lt;/p&gt;
&lt;p&gt;While this may be a good thought to secure the pc it is not very convenient if you need to verify some settings.&lt;/p&gt;
&lt;p&gt;For that purpose I created patched versions of the Windows Server 2003 command prompt and regedit utilities.&lt;/p&gt;
&lt;p&gt;They are patched to ignore the Group Policy settings and I usually place them in some share, secured by NTFS permissions.&lt;/p&gt;
&lt;p&gt;You can read about it in my post: &lt;a href="https://remkoweijnen.nl/blog/2008/08/12/registry-editing-has-been-disabled-by-your-administrator/" target="_blank"&gt;Registry editing has been disabled by your administrator (not anymore!)&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;However due to kernel differences you cannot use the Windows 2003 cmd.exe on Windows XP (you can do it the other way round btw). So I decided to create a patched version of the XP version as well.&lt;/p&gt;
&lt;p&gt;I thought it might be interesting to show you how it&amp;rsquo;s done so here we go:&lt;/p&gt;</description></item><item><title>The Case of the Citrix Ready Printer Driver</title><link>https://remkoweijnen.nl/blog/2011/02/08/the-case-of-the-citrix-ready-printer-driver/</link><pubDate>Tue, 08 Feb 2011 21:47:44 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2011/02/08/the-case-of-the-citrix-ready-printer-driver/</guid><description>&lt;p&gt;I had a very interesting issue today on a new Citrix XenApp 5 farm. We went into production yesterday and we noticed a number of issues:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;span style="color: #35383d;"&gt;Printing in general was slow, especially when a user connects to a printer for the first time.&lt;/span&gt;&lt;/li&gt;
	&lt;li&gt;User Profiles were rapidly growing in size (from the expected 1-2 MB to over 40 MB).&lt;/li&gt;
	&lt;li&gt;Logons took much longer then in the testing period (and since we use a Full Screen Desktop the user doesn't see any progress).&lt;/li&gt;
	&lt;li&gt;Performance monitoring showed CPU spikes in Word, Excel and IE processes.&lt;/li&gt;
&lt;/ul&gt;
&lt;span style="color: #4c4c4c;"&gt;I took a look at the profiles first and noticed that the size growth was due to a Xerox subfolder in %APPDATA%:</description></item><item><title>Script to install SNMP</title><link>https://remkoweijnen.nl/blog/2011/02/04/script-to-install-snmp/</link><pubDate>Fri, 04 Feb 2011 11:22:26 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2011/02/04/script-to-install-snmp/</guid><description>&lt;p&gt;In my project the monitoring group required that SNMP was installed and configured on all servers. &lt;p&gt;I wrote scripts for Windows 2003 and Windows 2008 that I deploy from my Altiris Server.&lt;/p&gt; &lt;p&gt;This is the script for Windows 2003:&lt;/p&gt;&lt;/p&gt;
&lt;div class="codecard"&gt;
 &lt;div class="codehead"&gt;
 &lt;span class="codefile"&gt;&lt;/span&gt;
 &lt;span class="codetools" data-pagefind-ignore&gt;
 &lt;span class="codelang"&gt;batch&lt;/span&gt;
 &lt;button class="codebtn" type="button" data-copy&gt;Copy&lt;/button&gt;
 &lt;a class="codebtn" download=".bat" href="data:text/plain;charset=utf-8;base64,QGVjaG8gb2ZmCnJlbSBJbnN0YWxsIFNOTVAKCnJlbSBDcmVhdGUgU3lzb2MgQW5zd2VyIEZpbGUKZWNobyBbTmV0T3B0aW9uYWxDb21wb25lbnRzXSAgPkluc3RhbGxTTk1QLnR4dAplY2hvIFNOTVAgPSAxID4&amp;#43;SW5zdGFsbFNOTVAudHh0CmVjaG8uID4&amp;#43;SW5zdGFsbFNOTVAudHh0CmVjaG8gW1NOTVBdID4&amp;#43;SW5zdGFsbFNOTVAudHh0CmVjaG8gQWNjZXB0X0NvbW11bml0eU5hbWUgPSBNWUNPTU1VTklUWTpSZWFkX09ubHkgPj5JbnN0YWxsU05NUC50eHQKZWNobyBBbnlfSG9zdCA9IE5vID4&amp;#43;SW5zdGFsbFNOTVAudHh0CmVjaG8gQ29tbXVuaXR5X05hbWUgPSAiTVlDT01NVU5JVFkiID4&amp;#43;SW5zdGFsbFNOTVAudHh0CmVjaG8gQ29udGFjdF9OYW1lID0gIk1ZQ09OVEFOVCIgID4&amp;#43;SW5zdGFsbFNOTVAudHh0CmVjaG8gTGltaXRfSG9zdCA9IE1ZSVAgID4&amp;#43;SW5zdGFsbFNOTVAudHh0CmVjaG8gTG9jYXRpb24gPSAiTVlMT0NBVElPTiIgID4&amp;#43;SW5zdGFsbFNOTVAudHh0CmVjaG8gU2VuZF9BdXRoZW50aWNhdGlvbiA9IFllcyA&amp;#43;Pkluc3RhbGxTTk1QLnR4dAplY2hvIFNlcnZpY2UgPSBBcHBsaWNhdGlvbnMsIEludGVybmV0LCBFbmQtdG8tRW5kLCBQaHlzaWNhbCwgRGF0YWxpbmsgPj5JbnN0YWxsU05NUC50eHQKZWNobyBUcmFwcyA9IFRIRVRSQVBJUCAgPj5JbnN0YWxsU05NUC50eHQKClN5c29jbWdyLmV4ZSAvaTpcd2luZG93c1xpbmZcc3lzb2MuaW5mIC91OlxXaW5kb3dzXFRlbXBcSW5zdGFsbFNOTVAudHh0IC9y"&gt;Download&lt;/a&gt;
 &lt;/span&gt;
 &lt;/div&gt;
 &lt;div class="codebody"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-batch" data-lang="batch"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;@&lt;/span&gt;&lt;span class="k"&gt;echo&lt;/span&gt; off
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;rem Install SNMP&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;rem Create Sysoc Answer File&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;echo&lt;/span&gt; [NetOptionalComponents] &lt;span class="p"&gt;&amp;gt;&lt;/span&gt;InstallSNMP.txt
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;echo&lt;/span&gt; SNMP = 1 &lt;span class="p"&gt;&amp;gt;&amp;gt;&lt;/span&gt;InstallSNMP.txt
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;echo&lt;/span&gt;. &lt;span class="p"&gt;&amp;gt;&amp;gt;&lt;/span&gt;InstallSNMP.txt
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;echo&lt;/span&gt; [SNMP] &lt;span class="p"&gt;&amp;gt;&amp;gt;&lt;/span&gt;InstallSNMP.txt
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;echo&lt;/span&gt; Accept_CommunityName = MYCOMMUNITY:Read_Only &lt;span class="p"&gt;&amp;gt;&amp;gt;&lt;/span&gt;InstallSNMP.txt
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;echo&lt;/span&gt; Any_Host = No &lt;span class="p"&gt;&amp;gt;&amp;gt;&lt;/span&gt;InstallSNMP.txt
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;echo&lt;/span&gt; Community_Name = &lt;span class="s2"&gt;&amp;#34;MYCOMMUNITY&amp;#34;&lt;/span&gt; &lt;span class="p"&gt;&amp;gt;&amp;gt;&lt;/span&gt;InstallSNMP.txt
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;echo&lt;/span&gt; Contact_Name = &lt;span class="s2"&gt;&amp;#34;MYCONTANT&amp;#34;&lt;/span&gt; &lt;span class="p"&gt;&amp;gt;&amp;gt;&lt;/span&gt;InstallSNMP.txt
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;echo&lt;/span&gt; Limit_Host = MYIP &lt;span class="p"&gt;&amp;gt;&amp;gt;&lt;/span&gt;InstallSNMP.txt
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;echo&lt;/span&gt; Location = &lt;span class="s2"&gt;&amp;#34;MYLOCATION&amp;#34;&lt;/span&gt; &lt;span class="p"&gt;&amp;gt;&amp;gt;&lt;/span&gt;InstallSNMP.txt
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;echo&lt;/span&gt; Send_Authentication = Yes &lt;span class="p"&gt;&amp;gt;&amp;gt;&lt;/span&gt;InstallSNMP.txt
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;echo&lt;/span&gt; Service = Applications, Internet, End-to-End, Physical, Datalink &lt;span class="p"&gt;&amp;gt;&amp;gt;&lt;/span&gt;InstallSNMP.txt
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;echo&lt;/span&gt; Traps = THETRAPIP &lt;span class="p"&gt;&amp;gt;&amp;gt;&lt;/span&gt;InstallSNMP.txt
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;Sysocmgr.exe /i:\windows\inf\sysoc.inf /u:\Windows\Temp\InstallSNMP.txt /r&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;/div&gt;</description></item><item><title>Restart Altiris Client Agent Service Tool</title><link>https://remkoweijnen.nl/blog/2011/02/04/restart-altiris-client-agent-service-tool/</link><pubDate>Fri, 04 Feb 2011 10:57:48 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2011/02/04/restart-altiris-client-agent-service-tool/</guid><description>&lt;p&gt;After a restart of the Altiris Services or the Altiris Server some machines refuse to reconnect.&lt;/p&gt; &lt;p&gt;They are shown in the Computers Tree with the Inactive state icon:&lt;/p&gt; &lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2011/02/image.webp" class="glightbox" data-type="image" data-gallery="post-1391"&gt;&lt;img loading="lazy" decoding="async" style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://remkoweijnen.nl/blog/wp-content/uploads/2011/02/image_thumb.webp" width="138" height="244" /&gt;&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Move WSUS content folder</title><link>https://remkoweijnen.nl/blog/2011/02/02/move-wsus-content-folder/</link><pubDate>Wed, 02 Feb 2011 11:15:55 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2011/02/02/move-wsus-content-folder/</guid><description>&lt;p&gt;I needed to relocate the WSUS content folder because it was placed on the C Drive (even though there was a 2nd 150 GB Data Partition) to prevent WSUS from filling up the OS Drive.&lt;/p&gt; &lt;p&gt;Unfortunately there doesn't seem to be a GUI option to do that, all Google searches lead to a GUI option for Small Business Server.&lt;/p&gt;</description></item><item><title>Get last char of the computername in PowerShell</title><link>https://remkoweijnen.nl/blog/2011/02/01/get-last-char-of-the-computername-in-powershell/</link><pubDate>Tue, 01 Feb 2011 10:02:20 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2011/02/01/get-last-char-of-the-computername-in-powershell/</guid><description>&lt;p&gt;For my &lt;a href="https://remkoweijnen.nl/blog/2011/01/31/powershell-script-to-add-reboot-scheduled-task-for-citrix/" target="_blank"&gt;Reboot Script&lt;/a&gt; I needed to get the last character of the computername and convert it to an integer.&lt;/p&gt; &lt;p&gt;We can do it like this in PowerShell:&lt;/p&gt; 
&lt;div class="codecard"&gt;
 &lt;div class="codehead"&gt;
 &lt;span class="codefile"&gt;&lt;/span&gt;
 &lt;span class="codetools" data-pagefind-ignore&gt;
 &lt;span class="codelang"&gt;powershell&lt;/span&gt;
 &lt;button class="codebtn" type="button" data-copy&gt;Copy&lt;/button&gt;
 &lt;a class="codebtn" download=".ps1" href="data:text/plain;charset=utf-8;base64,JGkgPSBbaW50XSIkKChnYyBlbnY6Y29tcHV0ZXJuYW1lKVstMV0pIg=="&gt;Download&lt;/a&gt;
 &lt;/span&gt;
 &lt;/div&gt;
 &lt;div class="codebody"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-powershell" data-lang="powershell"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;$i&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="no"&gt;int&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;$((&lt;/span&gt;&lt;span class="nb"&gt;gc &lt;/span&gt;&lt;span class="n"&gt;env&lt;/span&gt;&lt;span class="err"&gt;:&lt;/span&gt;&lt;span class="n"&gt;computername&lt;/span&gt;&lt;span class="p"&gt;)[&lt;/span&gt;&lt;span class="mf"&gt;-1&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;/div&gt;</description></item><item><title>PowerShell Script to add reboot scheduled task for Citrix</title><link>https://remkoweijnen.nl/blog/2011/01/31/powershell-script-to-add-reboot-scheduled-task-for-citrix/</link><pubDate>Mon, 31 Jan 2011 22:53:47 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2011/01/31/powershell-script-to-add-reboot-scheduled-task-for-citrix/</guid><description>&lt;p&gt;I wanted to create a Scheduled Task on my Citrix Servers to have the reboot every other night.&lt;/p&gt;
&lt;p&gt;The idea is that half of the servers will reboot in a night and the other half the following night.&lt;/p&gt;
&lt;p&gt;The &lt;a href="http://support.microsoft.com/kb/320188" target="_blank"&gt;TSSHUTDN&lt;/a&gt; tool is handy since it can issue a warning to logged on users, log them out after a certain period and finally issue the reboot.&lt;/p&gt;
&lt;p&gt;Since I needed to add a scheduled task to many servers I wanted to do this with a script.&lt;/p&gt;
&lt;p&gt;WMI Exposes the &lt;a href="http://msdn.microsoft.com/en-us/library/aa394399(v=VS.85).aspx" target="_blank"&gt;Win32_ScheduledJob&lt;/a&gt; Class and it&amp;rsquo;s &lt;a href="http://msdn.microsoft.com/en-us/library/aa389389(v=vs.85).aspx" target="_blank"&gt;Create Method&lt;/a&gt;.&lt;/p&gt;</description></item><item><title>Using Synctoy in Data Migrations</title><link>https://remkoweijnen.nl/blog/2011/01/31/using-synctoy-in-data-migrations/</link><pubDate>Mon, 31 Jan 2011 11:39:03 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2011/01/31/using-synctoy-in-data-migrations/</guid><description>&lt;p&gt;In every project I do I will have to migrate data at some point. This usually involves three types of data:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;span style="color: #35383d;"&gt;Home Directory Data&lt;/span&gt;&lt;/li&gt;
	&lt;li&gt;&lt;span style="color: #35383d;"&gt;Workgroup Data (eg office documents)&lt;/span&gt;&lt;/li&gt;
	&lt;li&gt;&lt;span style="color: #35383d;"&gt;Application Data (not database but flat file data belonging to applications such as templates and documents).&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
Home Directory Data is usually a flat copy although I tend to filter out the garbage (temp files and such).
&lt;p&gt;Workgroup data usually needs to be cleaned up so it involves some kind of data mapping (folder x goes to place y).&lt;/p&gt;
&lt;p&gt;Application Data is usually a flat copy from old to new location but often there are things like ini files that are adjusted and we don&amp;rsquo;t want to overwrite that.&lt;/p&gt;</description></item><item><title>Using Fast User Switching on domain XP computers</title><link>https://remkoweijnen.nl/blog/2011/01/30/using-fast-user-switching-on-domain-xp-computers/</link><pubDate>Sun, 30 Jan 2011 20:42:20 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2011/01/30/using-fast-user-switching-on-domain-xp-computers/</guid><description>&lt;p&gt;As you may know, Fast User Switching (FUS) is not available (disabled) on Windows XP computers joined to a domain, Microsoft confirms this in &lt;a href="http://support.microsoft.com/kb/280758" target="_blank"&gt;kb280758&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;However, Microsoft doesn&amp;rsquo;t tell us there&amp;rsquo;s an undocumented registry value that allows us to have FUS when joined to a domain!&lt;/p&gt;
&lt;p&gt;To enable FUS you need to set the &lt;strong&gt;DWORD&lt;/strong&gt; registry value &lt;em&gt;HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\ForceFriendlyUI&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;It can also be set by Group Policy at &lt;em&gt;HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;When the value is set to 1, and &lt;em&gt;LogonType&lt;/em&gt; key is also set to 1, it allows you to use a Friendly UI on a computer joined in a domain:&lt;/p&gt;</description></item><item><title>Querying a user token under 64 bit version of 2003/XP</title><link>https://remkoweijnen.nl/blog/2011/01/29/querying-a-user-token-under-64-bit-version-of-2003xp/</link><pubDate>Sat, 29 Jan 2011 22:17:52 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2011/01/29/querying-a-user-token-under-64-bit-version-of-2003xp/</guid><description>&lt;p&gt;If you want to obtain a user&amp;rsquo;s token in a Terminal Server or Citrix session (eg to launch a process in a session) you can call the &lt;a href="http://msdn.microsoft.com/en-us/library/aa383840(v=vs.85).aspx"&gt;WTSQueryUserToken&lt;/a&gt; function.&lt;/p&gt;
&lt;p&gt;On the x64 versions of Windows XP and Server 2003 this function fails however and returns &lt;strong&gt;ERROR_INSUFFICIENT_BUFFER&lt;/strong&gt; (&amp;quot;&lt;em&gt;The data area passed to a system call is too small&lt;/em&gt;.&amp;quot;) when called from a 32 bit process.&lt;/p&gt;
&lt;p&gt;Internally WTSQueryUserToken calls the undocumented function &lt;a href="http://msdn.microsoft.com/en-us/library/aa383827(v=vs.85).aspx"&gt;WinstationQueryInformationW&lt;/a&gt; with the &lt;strong&gt;WinStationUserToken&lt;/strong&gt; class (14) and passing a &lt;a href="http://msdn.microsoft.com/en-us/library/cc248658(PROT.10).aspx"&gt;WINSTATIONUSERTOKEN&lt;/a&gt; struct, filled with caller ProcessId and ThreadId.&lt;/p&gt;
&lt;p&gt;But on x64 Windows the size of this structure is 24 bytes, while on 32 bit Windows the size of the structure is 12 bytes!&lt;/p&gt;</description></item><item><title>Making String.IndexOf case insensitive</title><link>https://remkoweijnen.nl/blog/2011/01/29/making-string-indexof-case-insensitive/</link><pubDate>Sat, 29 Jan 2011 10:41:24 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2011/01/29/making-string-indexof-case-insensitive/</guid><description>&lt;p&gt;I don't do much programming in .NET based languages but I have to for some things like the Windows Live Writer plugin I am creating.&lt;/p&gt; &lt;p&gt;I didn't expect this but the &lt;a href="http://msdn.microsoft.com/en-us/library/system.string.indexof.aspx" target="_blank"&gt;String.IndexOf&lt;/a&gt; Method is by default case sensitive.&lt;/p&gt; &lt;p&gt;But we can make it case insensitive if we use one of the overloads: &lt;a href="http://msdn.microsoft.com/en-us/library/ms224425.aspx"&gt;IndexOf(String, StringComparison)&lt;/a&gt;.&lt;/p&gt;</description></item><item><title>PowerShell Script to raise Citrix Video Memory</title><link>https://remkoweijnen.nl/blog/2011/01/28/powershell-script-to-raise-citrix-video-memory/</link><pubDate>Fri, 28 Jan 2011 15:23:08 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2011/01/28/powershell-script-to-raise-citrix-video-memory/</guid><description>&lt;p&gt;On a Citrix XenApp 5 environment a user reported that he was unable to start a Full Screen session on a Dual Monitor Configuration.&lt;/p&gt;
&lt;p&gt;He received this error message:&lt;/p&gt;
&lt;p&gt;&lt;a class="glightbox" data-type="image" data-gallery="post-1316" href="https://remkoweijnen.nl/blog/wp-content/uploads/2011/01/foutmelding-2.webp"&gt;&lt;img loading="lazy" decoding="async" style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="foutmelding (2)" src="https://remkoweijnen.nl/blog/wp-content/uploads/2011/01/foutmelding-2_thumb.webp" border="0" alt="foutmelding (2)" width="244" height="78" /&gt;&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Saving Password in Office Communicator</title><link>https://remkoweijnen.nl/blog/2011/01/27/saving-password-in-office-communicator/</link><pubDate>Thu, 27 Jan 2011 15:50:27 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2011/01/27/saving-password-in-office-communicator/</guid><description>&lt;p&gt;If you want to be able save the password in Office Communicator you must create the key &lt;em&gt;HKLM\Software\Microsoft\Communicator&lt;/em&gt; or on x64 OS &lt;em&gt;HKLM\Software\Wow6432Node\Policies\Microsoft\Communicator &lt;/em&gt;and set the DWORD value SavePassword to 1.&lt;/p&gt;
&lt;p&gt;Now you will have the Save my password checkbox (which will save the encrpted password to HKCU\Software\Microsoft\Communicator\AccountPassword&lt;/p&gt;</description></item><item><title>Enabling Privileges for WMI in PowerShell</title><link>https://remkoweijnen.nl/blog/2011/01/27/enabling-privileges-for-wmi-in-powershell/</link><pubDate>Thu, 27 Jan 2011 11:05:30 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2011/01/27/enabling-privileges-for-wmi-in-powershell/</guid><description>&lt;p&gt;A few days ago I wrote about a &lt;a href="https://remkoweijnen.nl/blog/2011/01/25/script-to-install-all-print-drivers-on-citrix-or-terminal-server/"&gt;PowerShell Script to Install Printer Drivers&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;I noticed there was a problem with this script: some drivers fail to load with error 1797 which means &lt;a href="http://msdn.microsoft.com/en-us/library/ms681386(v=vs.85).aspx" target="_blank"&gt;ERROR_UNKNOWN_PRINTER_DRIVER&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;I reread the &lt;a href="http://msdn.microsoft.com/en-us/library/aa384769(v=vs.85).aspx" target="_blank"&gt;AddPrinterConnection&lt;/a&gt; documentation on MSDN but it didn&amp;rsquo;t mention anything about additional required permissions or anything.&lt;/p&gt;</description></item><item><title>Script to install all print drivers on Citrix or Terminal Server</title><link>https://remkoweijnen.nl/blog/2011/01/25/script-to-install-all-print-drivers-on-citrix-or-terminal-server/</link><pubDate>Tue, 25 Jan 2011 15:24:14 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2011/01/25/script-to-install-all-print-drivers-on-citrix-or-terminal-server/</guid><description>&lt;p&gt;I wrote a PowerShell script to install all printer drivers on a Citrix or Terminal Server.&lt;/p&gt;
&lt;p&gt;Actually the script isn&amp;rsquo;t specific to Citrix or Terminal Server but on such environments we need to preload all drivers because users do not have the permissions to do that.&lt;/p&gt;
&lt;p&gt;I have chosen for PowerShell because you can do it in a one-liner which makes it easy to run this script from my Altiris server on all Citrix Servers.&lt;/p&gt;
&lt;p&gt;The idea is that we enumerate all the shared printers on a Printer Server and make a connection to each printer. This will make sure that the driver is installed if it wasn&amp;rsquo;t already present.&lt;/p&gt;
&lt;p&gt;The script could even be scheduled to enforce that newly added printer drivers are added to each Citrix Server.&lt;/p&gt;</description></item><item><title>Adding a hidden Exchange mailbox to Outlook</title><link>https://remkoweijnen.nl/blog/2011/01/25/adding-a-hidden-exchange-mailbox-to-outlook/</link><pubDate>Tue, 25 Jan 2011 13:11:42 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2011/01/25/adding-a-hidden-exchange-mailbox-to-outlook/</guid><description>&lt;p&gt;In Exchange it&amp;rsquo;s possible to hide a Mailbox from the (Global) Address List. You can do that in the Exchange System Manager:&lt;/p&gt;
&lt;p&gt;&lt;a class="glightbox" data-type="image" data-gallery="post-1286" href="https://remkoweijnen.nl/blog/wp-content/uploads/2011/01/image13.webp"&gt;&lt;img loading="lazy" decoding="async" style="background-image: none; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="image" src="https://remkoweijnen.nl/blog/wp-content/uploads/2011/01/image_thumb13.webp" border="0" alt="image" width="207" height="244" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;But after you have hidden a Mailbox you cannot create an Outlook profile for it (or add it as an extra mailbox).&lt;/p&gt;
&lt;p&gt;&lt;a class="glightbox" data-type="image" data-gallery="post-1286" href="https://remkoweijnen.nl/blog/wp-content/uploads/2011/01/image14.webp"&gt;&lt;img loading="lazy" decoding="async" style="background-image: none; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="image" src="https://remkoweijnen.nl/blog/wp-content/uploads/2011/01/image_thumb14.webp" border="0" alt="image" width="244" height="188" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;When you click Check Name in the wizard you&amp;rsquo;ll get an error:&lt;/p&gt;
&lt;p&gt;&lt;a class="glightbox" data-type="image" data-gallery="post-1286" href="https://remkoweijnen.nl/blog/wp-content/uploads/2011/01/image15.webp"&gt;&lt;img loading="lazy" decoding="async" style="background-image: none; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="image" src="https://remkoweijnen.nl/blog/wp-content/uploads/2011/01/image_thumb15.webp" border="0" alt="image" width="244" height="95" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The common workaround is to remove the &amp;ldquo;&lt;em&gt;Hide from Exchange address lists&lt;/em&gt;&amp;rdquo; setting, create the profile (or add the Mailbox) and afterwards set it again.&lt;/p&gt;
&lt;p&gt;Once the profile is created it all keeps working.&lt;/p&gt;
&lt;p&gt;There is an easier solution though!&lt;/p&gt;</description></item><item><title>Determine the System Page Size</title><link>https://remkoweijnen.nl/blog/2011/01/24/determine-the-system-page-size/</link><pubDate>Mon, 24 Jan 2011 15:46:58 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2011/01/24/determine-the-system-page-size/</guid><description>&lt;p&gt;Just a quick note: if you want to determine the page size of the OS (Windows) you can use the &lt;a href="http://msdn.microsoft.com/en-us/library/ms724381(v=vs.85).aspx" target="_blank"&gt;GetSystemInfo&lt;/a&gt; function.&lt;/p&gt;
&lt;p&gt;Example:&lt;/p&gt;
&lt;div class="codecard"&gt;
 &lt;div class="codehead"&gt;
 &lt;span class="codefile"&gt;&lt;/span&gt;
 &lt;span class="codetools" data-pagefind-ignore&gt;
 &lt;span class="codelang"&gt;objectpascal&lt;/span&gt;
 &lt;button class="codebtn" type="button" data-copy&gt;Copy&lt;/button&gt;
 &lt;a class="codebtn" download=".pas" href="data:text/plain;charset=utf-8;base64,dmFyCiAgU3lzdGVtSW5mbzogU1lTVEVNX0lORk87CiAgUGFnZVNpemU6IERXT1JEOwpiZWdpbgogIEdldFN5c3RlbUluZm8oU3lzdGVtSW5mbyk7CiAgUGFnZVNpemUgOj0gU3lzdGVtSW5mby5kd1BhZ2VTaXplOw=="&gt;Download&lt;/a&gt;
 &lt;/span&gt;
 &lt;/div&gt;
 &lt;div class="codebody"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-objectpascal" data-lang="objectpascal"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="kr"&gt;var&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;SystemInfo&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;SYSTEM_INFO&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;PageSize&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;DWORD&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="kr"&gt;begin&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;GetSystemInfo&lt;span class="o"&gt;(&lt;/span&gt;SystemInfo&lt;span class="o"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;PageSize&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;:=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;SystemInfo&lt;span class="p"&gt;.&lt;/span&gt;dwPageSize&lt;span class="p"&gt;;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Note that MSDN recommends to use the &lt;a href="http://msdn.microsoft.com/en-us/library/ms724340(v=vs.85).aspx" target="_blank"&gt;GetNativeSystemInfo&lt;/a&gt; function when running in a 32 bit app on an x64 OS (and you can use the &lt;a href="http://msdn.microsoft.com/en-us/library/ms684139(v=vs.85).aspx" target="_blank"&gt;IsWow64Process&lt;/a&gt; function to determine that).&lt;/p&gt;</description></item><item><title>The case of the UPS discovery not working</title><link>https://remkoweijnen.nl/blog/2011/01/24/the-case-of-the-ups-discovery-not-working/</link><pubDate>Mon, 24 Jan 2011 15:22:03 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2011/01/24/the-case-of-the-ups-discovery-not-working/</guid><description>&lt;p&gt;I am doing a project involving a Citrix Xenapp environment running on VMWare vSphere.&lt;/p&gt;
&lt;p&gt;The physical machines are powered by two Eaton Uninterruptable Power Supplies that both a network card.&lt;/p&gt;
&lt;p&gt;I received some &lt;a href="http://download.mgeops.com/install/linux/ipp/IPP_how_to_vmware_esx_en_1_9.pdf" target="_blank"&gt;documentation&lt;/a&gt; that describes how to implement automatic shutdown in a VMWare vSphere environment.&lt;/p&gt;
&lt;p&gt;This documentation describes that a &lt;a href="http://www.vmware.com/support/developer/vima/" target="_blank"&gt;vSphere Management Assistant&lt;/a&gt; (vMA) must be deployed in which we need to install some software from Eaton.&lt;/p&gt;
&lt;p&gt;I followed the documentation that even described the needed iptables rules needed for their software.&lt;/p&gt;
&lt;p&gt;In the last step a discovery is done and the UPS is supposed to be found. And you have probably guessed by now: it didn&amp;rsquo;t!&lt;/p&gt;
&lt;p&gt;At first I figured that maybe the iptables configuration was still too tight so I stopped the iptables service but that didn&amp;rsquo;t help.&lt;/p&gt;</description></item><item><title>Enumerating Session Processes with NtQuerySystemInformation</title><link>https://remkoweijnen.nl/blog/2011/01/20/enumerating-session-process-with-ntquerysysteminformation/</link><pubDate>Thu, 20 Jan 2011 15:34:23 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2011/01/20/enumerating-session-process-with-ntquerysysteminformation/</guid><description>&lt;p&gt;As you may know, you can enumerate processes of a specific Terminal Server or Citrix session using the &lt;a href="http://msdn.microsoft.com/en-us/library/ms724509(VS.85).aspx"&gt;NtQuerySystemInformation&lt;/a&gt; function.&lt;/p&gt;
&lt;p&gt;On x86 system the code below works fine:&lt;/p&gt;
&lt;div class="codecard"&gt;
 &lt;div class="codehead"&gt;
 &lt;span class="codefile"&gt;&lt;/span&gt;
 &lt;span class="codetools" data-pagefind-ignore&gt;
 &lt;span class="codelang"&gt;objectpascal&lt;/span&gt;
 &lt;button class="codebtn" type="button" data-copy&gt;Copy&lt;/button&gt;
 &lt;a class="codebtn" download=".pas" href="data:text/plain;charset=utf-8;base64,dmFyCiAgU3RhdHVzIDogTlRTVEFUVVM7CiAgUmV0TGVuZ3RoIDogRFdPUkQ7CiAgU2Vzc2lvbkluZm8gOiAgU1lTVEVNX1NFU1NJT05fUFJPQ0VTU19JTkZPUk1BVElPTjsKICBDdXJyZW50UHJvY2VzcyA6IFBTeXN0ZW1Qcm9jZXNzZXM7CmJlZ2luCgogIFNlc3Npb25JbmZvLlNlc3Npb25JZCA6PSBTZXNzaW9uSWQ7CiAgU2Vzc2lvbkluZm8uQnVmZmVyIDo9IG5pbDsKICBTZXNzaW9uSW5mby5TaXplT2ZCdWYgOj0gMDsKCiAgU3RhdHVzIDo9IE50UXVlcnlTeXN0ZW1JbmZvcm1hdGlvbihTeXN0ZW1TZXNzaW9uUHJvY2Vzc2VzSW5mb3JtYXRpb24sIEBTZXNzaW9uSW5mbywgU2l6ZU9mKFNlc3Npb25JbmZvKSwgQFJldExlbmd0aCk7CiAgd2hpbGUgKFN0YXR1cyA9IFNUQVRVU19JTkZPX0xFTkdUSF9NSVNNQVRDSCkgZG8KICBiZWdpbgogICAgU2Vzc2lvbkluZm8uU2l6ZU9mQnVmIDo9IFJldExlbmd0aDsKICAgIFNlc3Npb25JbmZvLkJ1ZmZlciA6PSBHZXRNZW1vcnkoUmV0TGVuZ3RoKTsKICAgIHRyeQogICAgICBTdGF0dXMgOj0gTnRRdWVyeVN5c3RlbUluZm9ybWF0aW9uKFN5c3RlbVNlc3Npb25Qcm9jZXNzZXNJbmZvcm1hdGlvbiwgQFNlc3Npb25JbmZvLCBTaXplT2YoU2Vzc2lvbkluZm8pLCBAUmV0TGVuZ3RoKTsKICAgICAgaWYgTlRfU1VDQ0VTUyhTdGF0dXMpIHRoZW4KICAgICAgYmVnaW4KICAgICAgICBDdXJyZW50UHJvY2VzcyA6PSBTZXNzaW9uSW5mby5CdWZmZXI7CiAgICAgICAgd2hpbGUgVHJ1ZSBkbwogICAgICAgIGJlZ2luCiAgICAgICAgICAvLyBZb3VyIGNvZGUgaGVyZQoKICAgICAgICAgIGlmIChDdXJyZW50UHJvY2Vzc14uTmV4dEVudHJ5RGVsdGEgPSAwKSB0aGVuCiAgICAgICAgICAgIEJyZWFrOwoKICAgICAgICAgIENhcmRpbmFsKEN1cnJlbnRQcm9jZXNzKSA6PSBDYXJkaW5hbChDdXJyZW50UHJvY2VzcykgKyBDdXJyZW50UHJvY2Vzc14uTmV4dEVudHJ5RGVsdGE7CiAgICAgICAgZW5kOwoKICAgICAgICBFeGl0OwogICAgICBlbmQ7CiAgICBmaW5hbGx5CiAgICAgIEZyZWVNZW1vcnkoU2Vzc2lvbkluZm8uQnVmZmVyKTsKICAgIGVuZDsKICBlbmQ7CgogIFNldExhc3RFcnJvcihSdGxOdFN0YXR1c1RvRG9zRXJyb3IoU3RhdHVzKSk7CiAgUmFpc2VMYXN0T1NFcnJvcjsKZW5kOw=="&gt;Download&lt;/a&gt;
 &lt;/span&gt;
 &lt;/div&gt;
 &lt;div class="codebody"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-objectpascal" data-lang="objectpascal"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="kr"&gt;var&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;Status&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;NTSTATUS&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;RetLength&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;DWORD&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;SessionInfo&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;SYSTEM_SESSION_PROCESS_INFORMATION&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;CurrentProcess&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;PSystemProcesses&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="kr"&gt;begin&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;SessionInfo&lt;span class="p"&gt;.&lt;/span&gt;SessionId&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;:=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;SessionId&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;SessionInfo&lt;span class="p"&gt;.&lt;/span&gt;Buffer&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;:=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kr"&gt;nil&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;SessionInfo&lt;span class="p"&gt;.&lt;/span&gt;SizeOfBuf&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;:=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;Status&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;:=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;NtQuerySystemInformation&lt;span class="o"&gt;(&lt;/span&gt;SystemSessionProcessesInformation&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;@&lt;/span&gt;SessionInfo&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;SizeOf&lt;span class="o"&gt;(&lt;/span&gt;SessionInfo&lt;span class="o"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;@&lt;/span&gt;RetLength&lt;span class="o"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kr"&gt;while&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;Status&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;STATUS_INFO_LENGTH_MISMATCH&lt;span class="o"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kr"&gt;do&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kr"&gt;begin&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;SessionInfo&lt;span class="p"&gt;.&lt;/span&gt;SizeOfBuf&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;:=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;RetLength&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;SessionInfo&lt;span class="p"&gt;.&lt;/span&gt;Buffer&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;:=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;GetMemory&lt;span class="o"&gt;(&lt;/span&gt;RetLength&lt;span class="o"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kr"&gt;try&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;Status&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;:=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;NtQuerySystemInformation&lt;span class="o"&gt;(&lt;/span&gt;SystemSessionProcessesInformation&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;@&lt;/span&gt;SessionInfo&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;SizeOf&lt;span class="o"&gt;(&lt;/span&gt;SessionInfo&lt;span class="o"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;@&lt;/span&gt;RetLength&lt;span class="o"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kr"&gt;if&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;NT_SUCCESS&lt;span class="o"&gt;(&lt;/span&gt;Status&lt;span class="o"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kr"&gt;then&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kr"&gt;begin&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;CurrentProcess&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;:=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;SessionInfo&lt;span class="p"&gt;.&lt;/span&gt;Buffer&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kr"&gt;while&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="no"&gt;True&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kr"&gt;do&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kr"&gt;begin&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="c1"&gt;// Your code here&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kr"&gt;if&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;CurrentProcess&lt;span class="o"&gt;^&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;NextEntryDelta&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kr"&gt;then&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;Break&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;Cardinal&lt;span class="o"&gt;(&lt;/span&gt;CurrentProcess&lt;span class="o"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;:=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;Cardinal&lt;span class="o"&gt;(&lt;/span&gt;CurrentProcess&lt;span class="o"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;CurrentProcess&lt;span class="o"&gt;^&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;NextEntryDelta&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kr"&gt;end&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;Exit&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kr"&gt;end&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kr"&gt;finally&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;FreeMemory&lt;span class="o"&gt;(&lt;/span&gt;SessionInfo&lt;span class="p"&gt;.&lt;/span&gt;Buffer&lt;span class="o"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kr"&gt;end&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kr"&gt;end&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;SetLastError&lt;span class="o"&gt;(&lt;/span&gt;RtlNtStatusToDosError&lt;span class="o"&gt;(&lt;/span&gt;Status&lt;span class="o"&gt;))&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;RaiseLastOSError&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="kr"&gt;end&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;While this works fine on Windows XP and 2003 x86, it fails to work correctly on the x64 versions of Windows XP and 2003 (or maybe even higher).&lt;/p&gt;
&lt;p&gt;The problem is that RetLength is always SizeOf(SYSTEM_SESSION_PROCESS_INFORMATION) and thus we are in an endless loop!&lt;/p&gt;</description></item><item><title>SasLibEx Screencast</title><link>https://remkoweijnen.nl/blog/2011/01/19/saslibex-screencast/</link><pubDate>Wed, 19 Jan 2011 22:36:44 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2011/01/19/saslibex-screencast/</guid><description>&lt;p&gt;I just recorded a SasLibEx Screencast, it shows some of the very powerfull features of SasLibEx.&lt;/p&gt;
&lt;p&gt;The following features are shown:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;span style="color: #35383d;"&gt;Simulate Ctrl Alt Del (Secure Attention Sequence)&lt;/span&gt;&lt;/li&gt;
	&lt;li&gt;&lt;span style="color: #35383d;"&gt;Cancel Ctrl Alt Del&lt;/span&gt;&lt;/li&gt;
	&lt;li&gt;&lt;span style="color: #35383d;"&gt;Lock Workstation&lt;/span&gt;&lt;/li&gt;
	&lt;li&gt;&lt;span style="color: #35383d;"&gt;Unlock Workstation (without credentials)&lt;/span&gt;&lt;/li&gt;
	&lt;li&gt;&lt;span style="color: #35383d;"&gt;Disable Ctrl Alt Del&lt;/span&gt;&lt;/li&gt;
	&lt;li&gt;&lt;span style="color: #35383d;"&gt;Enable Ctrl Alt Del again&lt;/span&gt;&lt;/li&gt;
	&lt;li&gt;&lt;span style="color: #35383d;"&gt;Cancel pending UAC request&lt;/span&gt;&lt;/li&gt;
	&lt;li&gt;&lt;span style="color: #35383d;"&gt;Is Desktop Locked&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div id="scid:5737277B-5D6D-4f48-ABFC-DD9C333F4C5D:8c371d04-5435-4a86-a54a-5611345258b5" class="wlWriterEditableSmartContent" style="margin: 0px; display: inline; float: none; padding: 0px;"&gt;
&lt;div&gt;&lt;object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="448" height="252" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"&gt;&lt;param name="src" value="http://www.youtube.com/v/Nyl4_ECe5xI?hl=en&amp;amp;hd=1" /&gt;&lt;embed type="application/x-shockwave-flash" width="448" height="252" src="http://www.youtube.com/v/Nyl4_ECe5xI?hl=en&amp;amp;hd=1"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;/div&gt;
&lt;div style="width: 448px; clear: both; font-size: 0.8em;"&gt;SasLibEx Feature Demo #1&lt;/div&gt;
&lt;/div&gt;
&lt;section class="comments"&gt;
&lt;h2&gt;1 Comments&lt;/h2&gt;
&lt;ol class="comment-list"&gt;
&lt;li class="comment depth-0"&gt;&lt;div class="comment-meta"&gt;&lt;span class="comment-author"&gt;&lt;a href="http://topsy.com/www.remkoweijnen.nl/blog/2011/01/19/saslibex-screencast/?utm_source=pingback&amp;amp;amp;utm_campaign=L2" rel="nofollow ugc"&gt;Tweets die vermelden SasLibEx Screencast | Remko Weijnen&amp;#x27;s Blog (Remko&amp;#x27;s Blog) -- Topsy.com&lt;/a&gt;&lt;/span&gt; &lt;time datetime="2011-01-20"&gt;Jan 20, 2011&lt;/time&gt;&lt;/div&gt;&lt;div class="comment-body"&gt;&lt;p&gt;[...] Dit blogartikel was vermeld op Twitter door Remko Weijnen, Remko Weijnen. Remko Weijnen heeft gezegd: First #SasLibEx ScreenCast! showing simulate ctrl alt del, unlock workstation without credentials, disable cad and more http://bit.ly/fFM8wB [...]&lt;/p&gt;</description></item><item><title>Recursive Groups #2</title><link>https://remkoweijnen.nl/blog/2011/01/18/recursive-groups-2/</link><pubDate>Tue, 18 Jan 2011 19:51:15 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2011/01/18/recursive-groups-2/</guid><description>&lt;p&gt;In my &lt;a href="https://remkoweijnen.nl/blog/2011/01/18/recursive-group-membership-in-powershell/"&gt;previous post&lt;/a&gt; I explained how to get the recursive group membership with a very simple Powershell Script.&lt;/p&gt;
&lt;p&gt;Commenter Michel thought that the script only tested one level deep but it doesn&amp;rsquo;t.&lt;/p&gt;
&lt;p&gt;But let&amp;rsquo;s prove that!&lt;/p&gt;
&lt;p&gt;Create 3 Global Groups in your Active Directory and name them Level1, 2 and 3:&lt;/p&gt;
&lt;p&gt;&lt;a class="glightbox" data-type="image" data-gallery="post-1234" href="https://remkoweijnen.nl/blog/wp-content/uploads/2011/01/image2.webp"&gt;&lt;img loading="lazy" decoding="async" style="background-image: none; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="image" src="https://remkoweijnen.nl/blog/wp-content/uploads/2011/01/image_thumb2.webp" border="0" alt="image" width="244" height="48" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Make Level3 a Member of Level 2 and make Level a member of Level 1 and finally add an account to the Level 3 group:&lt;/p&gt;
&lt;p&gt;&lt;a class="glightbox" data-type="image" data-gallery="post-1234" href="https://remkoweijnen.nl/blog/wp-content/uploads/2011/01/image3.webp"&gt;&lt;img loading="lazy" decoding="async" style="background-image: none; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="image" src="https://remkoweijnen.nl/blog/wp-content/uploads/2011/01/image_thumb3.webp" border="0" alt="image" width="244" height="81" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a class="glightbox" data-type="image" data-gallery="post-1234" href="https://remkoweijnen.nl/blog/wp-content/uploads/2011/01/image4.webp"&gt;&lt;img loading="lazy" decoding="async" style="background-image: none; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="image" src="https://remkoweijnen.nl/blog/wp-content/uploads/2011/01/image_thumb4.webp" border="0" alt="image" width="244" height="77" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a class="glightbox" data-type="image" data-gallery="post-1234" href="https://remkoweijnen.nl/blog/wp-content/uploads/2011/01/image5.webp"&gt;&lt;img loading="lazy" decoding="async" style="background-image: none; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="image" src="https://remkoweijnen.nl/blog/wp-content/uploads/2011/01/image_thumb5.webp" border="0" alt="image" width="244" height="79" /&gt;&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Kofax VRS Unattended Install</title><link>https://remkoweijnen.nl/blog/2011/01/18/kofax-vrs-unattended-install/</link><pubDate>Tue, 18 Jan 2011 14:53:39 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2011/01/18/kofax-vrs-unattended-install/</guid><description>&lt;p&gt;Recently I needed to create an Unattended Install for an application that uses a piece of software (for scanning) called &lt;a href="http://www.kofax.com/vrs-virtualrescan/" target="_blank"&gt;Kofax VRS&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;This Kofax software comes with an .msi file but there was no documentation on the install options.&lt;/p&gt;
&lt;p&gt;In fact it didn&amp;rsquo;t seem like the Vendor anticipated on an Unatttended Install.&lt;/p&gt;
&lt;p&gt;I browsed in the msi file using &lt;a href="http://msdn.microsoft.com/en-us/library/aa370557(v=vs.85).aspx" target="_blank"&gt;Microsoft&amp;rsquo;s Orca tool&lt;/a&gt; and tried some of the properties I found in the public properties table.&lt;/p&gt;</description></item><item><title>Recursive group Membership in Powershell</title><link>https://remkoweijnen.nl/blog/2011/01/18/recursive-group-membership-in-powershell/</link><pubDate>Tue, 18 Jan 2011 12:54:17 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2011/01/18/recursive-group-membership-in-powershell/</guid><description>&lt;p&gt;In this post I will show an easy way to get the recursive group membership for the current user.&lt;/p&gt;
&lt;p&gt;I use this in a logon script to handle certain tasks based on group membership.&lt;/p&gt;
&lt;p&gt;Most scripts I see for this task do a manual recursive enumeration but in a large environment this could be very slow.&lt;/p&gt;
&lt;p&gt;A better way would be to use the &lt;a href="http://msdn.microsoft.com/en-us/library/ms680275(v=vs.85).aspx" target="_blank"&gt;tokenGroups&lt;/a&gt; attribute of the Active Directory user object.&lt;/p&gt;
&lt;p&gt;The tokenGroups attribute is an array of SIDs computed by Active Directory and is used to verify user access.&lt;/p&gt;
&lt;p&gt;We need to translate these SIDs to their sAMAccountNames to get the actual group names.&lt;/p&gt;
&lt;p&gt;In unmanaged code this could be accomplished by calling the &lt;a href="http://msdn.microsoft.com/en-us/library/ms675970(VS.85).aspx" target="_blank"&gt;DsCrackNames&lt;/a&gt; API or the &lt;a href="http://msdn.microsoft.com/en-us/library/aa706046(v=VS.85).aspx" target="_blank"&gt;IADsNameTranslate&lt;/a&gt; interface.&lt;/p&gt;
&lt;img width="1" height="1" loading="lazy" decoding="async" title="More..." src="https://remkoweijnen.nl/blog/wp-content/uploads/2011/01/trans.gif" alt="" /&gt;</description></item><item><title>The case of the Annotations Toolbar</title><link>https://remkoweijnen.nl/blog/2011/01/17/the-case-of-the-annotations-toolbar/</link><pubDate>Mon, 17 Jan 2011 22:24:22 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2011/01/17/the-case-of-the-annotations-toolbar/</guid><description>&lt;p&gt;I got some interesting questions from a user today regarding TIFF images on a Windows 2003 based Citrix environment.&lt;/p&gt;
&lt;p&gt;This user has an application that works with scanned documents and for each document exists both a pdf and a tiff version in the application.&lt;/p&gt;
&lt;p&gt;By default the TIF (and TIFF) file extensions are linked to the Windows Picture and Fax Viewer in Windows 2003.&lt;/p&gt;
&lt;p&gt;The user told me that some time ago she had an extra toolbar where she could perform some extra operations such as making a selection on TIFF images.&lt;/p&gt;
&lt;p&gt;At some point in time this mysterious Toolbar disappeared and she was never able to get it back. She reported this to the helpdesk and the system administrator but they were unable to resolve this.&lt;/p&gt;
&lt;p&gt;I hadn&amp;rsquo;t hear of this toolbar before but a Google Search led me to &lt;a href="http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/image_toolbar.mspx?mfr=true" target="_blank"&gt;this page&lt;/a&gt; which explains the toolbar in question which is called the &lt;em&gt;Annotation Toolbar&lt;/em&gt;.&lt;/p&gt;</description></item><item><title>Another packaging challenge</title><link>https://remkoweijnen.nl/blog/2011/01/17/another-packaging-challenge/</link><pubDate>Mon, 17 Jan 2011 09:15:37 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2011/01/17/another-packaging-challenge/</guid><description>&lt;p&gt;Another post on something that happened last week, this time it&amp;rsquo;s about a Java based Application again.&lt;/p&gt;
&lt;p&gt;This particular application wanted to download three DLL&amp;rsquo;s from the Webserver to the Java bin directory.&lt;/p&gt;
&lt;p&gt;This presents us with several issues on a multi user server such as a Citrix of Terminal Server:&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;&lt;span style="color: #35383d;"&gt;The user does not have write permissions in this directory&lt;/span&gt;&lt;/li&gt;
	&lt;li&gt;&lt;span style="color: #35383d;"&gt;If we we give the user write permissions here what happens when the DLL's are in use by another user?&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
I assumed that if I preinstalled the DLL's the application wouldn't try to overwrite them but that didn't work.
&lt;p&gt;Then I monitored with Process Monitor if the Application wrote some kind of check file but at first I didn&amp;rsquo;t find anything.&lt;/p&gt;
&lt;p&gt;So I decided to use the CorrectFilePaths shim to redirect the DLL&amp;rsquo;s to the user&amp;rsquo;s homedirectory (see &lt;a href="https://remkoweijnen.nl/blog/2010/12/28/using-the-correctfilepaths-shim-to-redirect-an-ini-file-to-a-writable-location/" target="_blank"&gt;Using the CorrectFilePaths shim to redirect an ini file to a writable location&lt;/a&gt; for an explanation).&lt;/p&gt;</description></item><item><title>Troubleshoot CorrectFilePath shim</title><link>https://remkoweijnen.nl/blog/2011/01/16/troubleshoot-correctfilepath-shim/</link><pubDate>Sun, 16 Jan 2011 20:42:03 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2011/01/16/troubleshoot-correctfilepath-shim/</guid><description>&lt;p&gt;A few days ago I was packaging an application that was writing an INI file in the application directory.&lt;/p&gt;
&lt;p&gt;If you have read my earlier article, &lt;a href="https://remkoweijnen.nl/blog/2010/12/28/using-the-correctfilepaths-shim-to-redirect-an-ini-file-to-a-writable-location/" target="_blank"&gt;Using the CorrectFilePaths shim to redirect an ini file to a writable location&lt;/a&gt;, then you will probably think: create a nice shim and redirect that ini file!&lt;/p&gt;
&lt;p&gt;But this application had a few challenges, the first being that it writes %COMPUTERNAME%.INI. The application&amp;rsquo;s developer probably assumed that a user is bound to one pc and that no other user&amp;rsquo;s use that pc.&lt;/p&gt;
&lt;p&gt;To solve it we we need to catch all possible computer names (it would be nice if the CorrectFilePaths shims was able to accept wildcards and environment variables).&lt;/p&gt;
&lt;p&gt;But it doesn&amp;rsquo;t so it means we have to add a parameter for each possible computer name. In my case that was doable because I have only 8 Citrix servers.&lt;/p&gt;
&lt;p&gt;So I created a Fix using the Application Compatibility Manager as described in my previous post.&lt;/p&gt;
&lt;p&gt;However it didn&amp;rsquo;t work, so I started to trace what happens.&lt;/p&gt;</description></item><item><title>Convert Drive Bitmask to Drive Letter</title><link>https://remkoweijnen.nl/blog/2011/01/14/convert-drive-bitmask-to-drive-letter/</link><pubDate>Fri, 14 Jan 2011 11:06:03 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2011/01/14/convert-drive-bitmask-to-drive-letter/</guid><description>&lt;p&gt;I was writing a test program that will perform some actions when a USB Memory Stick is inserted.&lt;/p&gt; &lt;p&gt;When this happens Windows send a Broadcast a &lt;a href="http://msdn.microsoft.com/en-us/library/aa363480(VS.85).aspx" target="_blank"&gt;WM_DEVICECHANGE&lt;/a&gt; message.&lt;/p&gt; &lt;p&gt;The wParam member of this Message contains a (pointer to) a &lt;a href="http://msdn.microsoft.com/en-us/library/aa363246(VS.85).aspx" target="_blank"&gt;DEV_BROADCAST_HDR&lt;/a&gt; structure.&lt;/p&gt; &lt;p&gt;if the dbch_devicetype member of this structure is of type DBT_DEVTYP_VOLUME then we can cast the structure to &lt;a href="http://msdn.microsoft.com/en-us/library/aa363249(v=VS.85).aspx" target="_blank"&gt;DEV_BROADCAST_VOLUME&lt;/a&gt;.&lt;/p&gt;</description></item><item><title>Self Signing Word Macro’s</title><link>https://remkoweijnen.nl/blog/2011/01/12/self-signing-word-macros/</link><pubDate>Wed, 12 Jan 2011 15:45:51 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2011/01/12/self-signing-word-macros/</guid><description>&lt;p&gt;Today I noticed that a recently added Application to the Citrix Test environment added a Macro to the Office Startup directory.&lt;/p&gt;
&lt;p&gt;When a user launches Word he will get a popup because the Template (.dot file) was not signed:&lt;/p&gt;
&lt;p&gt;&lt;a class="glightbox" data-type="image" data-gallery="post-1175" href="https://remkoweijnen.nl/blog/wp-content/uploads/2011/01/OfficeMacro.webp"&gt;&lt;img loading="lazy" decoding="async" style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="OfficeMacro" src="https://remkoweijnen.nl/blog/wp-content/uploads/2011/01/OfficeMacro_thumb.webp" border="0" alt="OfficeMacro" width="244" height="128" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;It would have been a lot easier if Application Vendors sign their stuff because in that case I could have just added the certificate using Group Policy (&lt;a href="https://remkoweijnen.nl/blog/2011/01/11/java-webapplication-certificates-and-citrix/" target="_blank"&gt;yesterday&amp;rsquo;s post&lt;/a&gt; describes how to do this).&lt;/p&gt;
&lt;p&gt;Application Vendors usually tell you that you should lower the Macro security in Office (or Word in this case) to Low to get rid of this message. But I think there&amp;rsquo;s a better solution: we will sign the .dot file ourselves!&lt;/p&gt;</description></item><item><title>Java Webapplication, certificates and Citrix</title><link>https://remkoweijnen.nl/blog/2011/01/11/java-webapplication-certificates-and-citrix/</link><pubDate>Tue, 11 Jan 2011 15:23:47 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2011/01/11/java-webapplication-certificates-and-citrix/</guid><description>&lt;p&gt;Yesterday I created an Unattended Installation of a webapplication. Of course it was &amp;ldquo;just a web link&amp;rdquo; and the application vendor usually says: you don&amp;rsquo;t need to install it just go the URL and that&amp;rsquo;s it.&lt;/p&gt;
&lt;p&gt;The reality is usually that you go to the URL and need to install several (ActiveX) components and maybe other dependencies such as Java.&lt;/p&gt;
&lt;p&gt;While a user may have the permissions for this on his own pc, on a Citrix or Terminal Server environment this is highly unlikely.&lt;/p&gt;
&lt;p&gt;So we need to package and pre-install this for the users.&lt;/p&gt;
&lt;p&gt;Nothing special so far but this particular application had some special things that were interesting enough to blog about.&lt;/p&gt;
&lt;p&gt;So let&amp;rsquo;s start with what happened, I visited the URL of an application called Centric Key 2 Financien.&lt;/p&gt;
&lt;p&gt;First I got a few popups with Certificates that needed to be accepted:&lt;/p&gt;
&lt;p&gt;&lt;a class="glightbox" data-type="image" data-gallery="post-1147" href="https://remkoweijnen.nl/blog/wp-content/uploads/2011/01/Cert1.png"&gt;&lt;img loading="lazy" decoding="async" style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="Cert1" src="https://remkoweijnen.nl/blog/wp-content/uploads/2011/01/Cert1_thumb.webp" border="0" alt="Cert1" width="244" height="150" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The application&amp;rsquo;s instructions say that the user must accept this and set the &amp;ldquo;Always trust content from this publisher&amp;rdquo; checkbox.&lt;/p&gt;</description></item><item><title>New Categories</title><link>https://remkoweijnen.nl/blog/2011/01/09/new-categories/</link><pubDate>Sun, 09 Jan 2011 21:03:24 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2011/01/09/new-categories/</guid><description>&lt;p&gt;I added some new Categories to the Blog, something I should have done a long time ago.&lt;/p&gt;
&lt;p&gt;I also tried to add missing Categories to existing posts but I didn&amp;rsquo;t check all posts ever written so feel free to add a comment to this post if you miss a category or that a certain post is properly categorized.&lt;/p&gt;</description></item><item><title>Fixing Applications: The Next Step</title><link>https://remkoweijnen.nl/blog/2011/01/07/fixing-applications-the-next-step/</link><pubDate>Fri, 07 Jan 2011 14:39:55 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2011/01/07/fixing-applications-the-next-step/</guid><description>&lt;p&gt;Lately I wrote a few articles about fixing bad applications using Compatibility Shims. If you didn&amp;rsquo;t read them yet, here are the links: &lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;
&lt;div&gt;&lt;a href="https://remkoweijnen.nl/blog/2010/12/28/using-the-correctfilepaths-shim-to-redirect-an-ini-file-to-a-writable-location/"&gt;Using the CorrectFilePaths shim to redirect an ini file to a writable location&lt;/a&gt;&lt;/div&gt;&lt;/li&gt;
	&lt;li&gt;
&lt;div&gt;&lt;a href="https://remkoweijnen.nl/blog/2010/12/28/using-the-correctfilepaths-shim-with-visual-basic-applications/"&gt;Using the CorrectFilePaths Shim with Visual Basic Applications&lt;/a&gt;&lt;/div&gt;&lt;/li&gt;
	&lt;li&gt;
&lt;div&gt;&lt;a href="https://remkoweijnen.nl/blog/2011/01/06/redirect-global-object-to-local-objects-aka-fix-that-bad-app/"&gt;Redirect Global Object to Local Objects (aka fix that bad app!)&lt;/a&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ul&gt;
I also described that you can install an Application Compatibility Database using the sdbinst command.
&lt;p&gt;At first I just took a script task in my Altiris Server to deploy the database using sdbinst -q &amp;lt;dbname&amp;gt; but later on I got a better idea.&lt;/p&gt;</description></item><item><title>Paging file and Memory Dump</title><link>https://remkoweijnen.nl/blog/2011/01/07/paging-file-and-memory-dump/</link><pubDate>Fri, 07 Jan 2011 13:45:55 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2011/01/07/paging-file-and-memory-dump/</guid><description>&lt;p&gt;I often hear that people configure the Paging File (on Citrix or Terminal Servers) on a seperate volume but, the reasons is either performance or the chance that the Paging File might corrupt the volume.&lt;/p&gt;
&lt;p&gt;However if at some point you would like to create a Memory Dump you must have a paging file on the boot volume.&lt;/p&gt;</description></item><item><title>Another Oracle Error</title><link>https://remkoweijnen.nl/blog/2011/01/07/another-oracle-error/</link><pubDate>Fri, 07 Jan 2011 13:26:20 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2011/01/07/another-oracle-error/</guid><description>&lt;p&gt;My collegue that is working with me on the current project was packaging another application that uses Oracle.&lt;/p&gt;
&lt;p&gt;The interesting thing about it is that he ran into the same error I did: the Oracle client tries to create (and access) an Object in the Global namespace.&lt;/p&gt;</description></item><item><title>Redirect Global Object to Local Objects (aka fix that bad app!)</title><link>https://remkoweijnen.nl/blog/2011/01/06/redirect-global-object-to-local-objects-aka-fix-that-bad-app/</link><pubDate>Thu, 06 Jan 2011 14:34:11 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2011/01/06/redirect-global-object-to-local-objects-aka-fix-that-bad-app/</guid><description>&lt;p&gt;Today I was working on Unattended Installation of an Application called SmartDocuments.&lt;/p&gt;
&lt;p&gt;The application seemed to behave nicely on a Multi User (Citrix/Terminal Server) environment: it writes user configuration to the user part of the registry and writes configuration files in a user accessible path.&lt;/p&gt;
&lt;p&gt;When testing with a normal user account I ran into a problem though, I got an Oracle ORA-01019 error message:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2011/01/ora01019.webp" class="glightbox" data-type="image" data-gallery="post-1083"&gt;&lt;img loading="lazy" decoding="async" src="https://remkoweijnen.nl/blog/wp-content/uploads/2011/01/ora01019-small.webp" alt="ORA01019" width="430" height="57" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The English message is ORA01019: unable to allocate memory in the user side.&lt;/p&gt;</description></item><item><title>Default User Profile: Remko’s solution</title><link>https://remkoweijnen.nl/blog/2011/01/04/default-user-profile-remkos-solution/</link><pubDate>Tue, 04 Jan 2011 15:46:18 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2011/01/04/default-user-profile-remkos-solution/</guid><description>&lt;p&gt;If you are implementing a Citrix, Terminal Server or even just a plain Client-Server environment you will need to create a Default User Profile at some point.&lt;/p&gt;
&lt;p&gt;The Default User Profile can be thought of as the initial registry settings that are used when a new profile is created.&lt;/p&gt;
&lt;p&gt;Many people think that the Default User Profile is available in regedit via HKEY_USERS.Default but this is NOT the Default User Profile.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2011/01/usersdefault.webp" class="glightbox" data-type="image" data-gallery="post-1066"&gt;&lt;img loading="lazy" decoding="async" src="https://remkoweijnen.nl/blog/wp-content/uploads/2011/01/usersdefault-small.webp" alt="UsersDefault" width="430" height="165" /&gt;&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Modify Internet Explorer 8 MUI Pack to install a single language</title><link>https://remkoweijnen.nl/blog/2011/01/03/modify-internet-explorer-8-mui-pack-to-install-a-single-language/</link><pubDate>Mon, 03 Jan 2011 12:10:22 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2011/01/03/modify-internet-explorer-8-mui-pack-to-install-a-single-language/</guid><description>&lt;p&gt;Today I wanted to install the Dutch Language pack for Internet Explorer 8, the Dutch language comes as part of the &lt;a title="Windows Internet Explorer 8 MUI Pack for Windows Server 2003 SP2" href="http://www.microsoft.com/downloads/en/details.aspx?FamilyID=242bf57a-9dab-4ea9-ba46-33c0e32020a4&amp;amp;displaylang=en" target="_blank"&gt;Windows Internet Explorer 8 MUI Pack&lt;/a&gt; (in my case the version for Windows Server 2003 SP2).&lt;/p&gt;
&lt;p&gt;If you install the MUI Pack you will always end up with all 35 (!) languages installed. This behaviour is the same as the language pack for Internet Explorer 7 that I wrote about earlier (see &lt;a title="Modifying Microsoft Updates and/or hotfixes" href="https://remkoweijnen.nl/blog/2009/05/12/modifying-microsoft-updates-andor-hotfixes" target="_blank"&gt;Modifying Microsoft Updates and/or hotfixes&lt;/a&gt;)&lt;/p&gt;
&lt;p&gt;The solution is really the same as for the IE7 language pack: you modify the inf file (in my case update_srv03.inf) but if you run update.exe it will refuse to use your modified inf file:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2011/01/ie8muierror.webp" class="glightbox" data-type="image" data-gallery="post-1055"&gt;&lt;img loading="lazy" decoding="async" src="https://remkoweijnen.nl/blog/wp-content/uploads/2011/01/ie8muierror-small1.webp" alt="ie8muierror" width="430" height="76" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;So we need to patch update.exe to accept your modified version!&lt;/p&gt;</description></item><item><title>Cannot Access Files, But Need the Origin?</title><link>https://remkoweijnen.nl/blog/2011/01/03/cannot-access-files-but-need-the-origin/</link><pubDate>Mon, 03 Jan 2011 09:52:20 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2011/01/03/cannot-access-files-but-need-the-origin/</guid><description>&lt;p&gt;Have you developed an application that accesses files and may stop because a file cannot be accessed but you need to?&lt;/p&gt;
&lt;p&gt;Since Windows Vista it is possible to find out the name of the application which holds open a file.&lt;/p&gt;</description></item><item><title>Wordpress monthly archives broken</title><link>https://remkoweijnen.nl/blog/2011/01/01/wordpress-monthly-archives-broken/</link><pubDate>Sat, 01 Jan 2011 19:44:20 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2011/01/01/wordpress-monthly-archives-broken/</guid><description>&lt;p&gt;I noticed that the monthly archives on my blog were not working. I first thought it was a problem with the .htaccess file but it was correct.&lt;/p&gt;
&lt;p&gt;I also tried resetting the permalinks option in Wordpress to default an back but that did help as well.&lt;/p&gt;</description></item><item><title>Unattended Installation of IBM WebSphere MQ</title><link>https://remkoweijnen.nl/blog/2010/12/29/unattended-installation-of-ibm-websphere-mq/</link><pubDate>Wed, 29 Dec 2010 16:50:14 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2010/12/29/unattended-installation-of-ibm-websphere-mq/</guid><description>&lt;p&gt;Today I needed to create a silent install for IBM WebSphere MQ, in my case version 6.0.2.10.&lt;/p&gt;
&lt;p&gt;I started by reading IBM&amp;rsquo;s documentation: &lt;a title="WebSphere MQ Unattended (silent) installation" href="http://publib.boulder.ibm.com/infocenter/wmqv6/v6r0/index.jsp?topic=/com.ibm.mq.amqtac.doc/wq10630_.htm" target="_blank"&gt;WebSphere MQ Unattendend (silent) Installation&lt;/a&gt; which desribes that we can &lt;a title="IBM WebSphere MQ" href="http://publib.boulder.ibm.com/infocenter/wmqv6/v6r0/index.jsp?topic=/com.ibm.mq.amqtac.doc/wq10630_.htm" target="_blank"&gt;create a response file&lt;/a&gt; using the SAVEINI parameter.&lt;/p&gt;
&lt;p&gt;So I recorded a response file and tested the install using the &lt;a title="WebSphere MQ Using a response file with MsiExec" href="http://publib.boulder.ibm.com/infocenter/wmqv6/v6r0/index.jsp?topic=/com.ibm.mq.amqtac.doc/wq10630_.htm" target="_blank"&gt;USEINI parameter&lt;/a&gt; as indicated by the documentation.&lt;/p&gt;
&lt;p&gt;However the installation failed producing only this error message:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2010/12/websphereerror.webp" class="glightbox" data-type="image" data-gallery="post-1043"&gt;&lt;img loading="lazy" decoding="async" src="https://remkoweijnen.nl/blog/wp-content/uploads/2010/12/websphereerror-small.webp" alt="One or more problems occured. Review the trace and/or log file for details. (AMQ4739)" width="430" height="102" /&gt;&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Using the CorrectFilePaths Shim with Visual Basic Applications</title><link>https://remkoweijnen.nl/blog/2010/12/28/using-the-correctfilepaths-shim-with-visual-basic-applications/</link><pubDate>Tue, 28 Dec 2010 16:14:44 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2010/12/28/using-the-correctfilepaths-shim-with-visual-basic-applications/</guid><description>&lt;p&gt;Earlier today I wrote about &lt;a title="Using the CorrectFilePaths shim to redirect an ini file to a writable location" href="https://remkoweijnen.nl/blog/2010/12/28/using-the-correctfilepaths-shim-to-redirect-an-ini-file-to-a-writable-location/" target="_blank"&gt;Using the CorrectFilePaths shim to redirect an ini file to a writable location&lt;/a&gt; and believe it or not the next application I was working with today needed a nice shim as well.&lt;/p&gt;
&lt;p&gt;This one was a little more complicated and that&amp;rsquo;s why I am writing a second post about it.&lt;/p&gt;
&lt;p&gt;I am not sure if this is actuall documented somewhere but a Shim is not applied to Applications or DLL&amp;rsquo;s that reside in the system directory.&lt;/p&gt;
&lt;p&gt;The application in question here is a Visual Basic 6 application which uses the VB6 runtime, msvbvm60.dll which resides usually in %systemroot%\system32.&lt;/p&gt;
&lt;p&gt;We need to do two things if we want to apply the shim to msvbvm60.dll:&lt;/p&gt;</description></item><item><title>Using the CorrectFilePaths shim to redirect an ini file to a writable location</title><link>https://remkoweijnen.nl/blog/2010/12/28/using-the-correctfilepaths-shim-to-redirect-an-ini-file-to-a-writable-location/</link><pubDate>Tue, 28 Dec 2010 13:52:01 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2010/12/28/using-the-correctfilepaths-shim-to-redirect-an-ini-file-to-a-writable-location/</guid><description>&lt;p&gt;Today I needed to package an application called PlesirReality and I noticed that it wrote an ini file into the program directory (in my case D:\Apps\PlesirReality).&lt;/p&gt;
&lt;p&gt;I looked into this ini file (areastate.ini) and it writes user settings in there, like the last position of the window etc.&lt;/p&gt;
&lt;p&gt;We can see this easily with Process Monitor:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2010/12/usersrweijnenappdataroamingblogdeskuserdataimagesplesirmon11.webp" class="glightbox" data-type="image" data-gallery="post-1030"&gt;&lt;img loading="lazy" decoding="async" src="https://remkoweijnen.nl/blog/wp-content/uploads/2010/12/usersrweijnenappdataroamingblogdeskuserdataimagesplesirmon1-small7.webp" alt="PlesirMon1" width="430" height="193" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This presents us with several problems:&lt;/p&gt;
&lt;p&gt;The first problem is that the user does not have write permission in this directory so upon application exit we get an ugly error message:&lt;/p&gt;
&lt;img loading="lazy" decoding="async" src="https://remkoweijnen.nl/blog/wp-content/uploads/2010/12/usersrweijnenappdataroamingblogdeskuserdataimagesplesiruglyerror5.webp" alt="PlesirUglyError" width="428" height="119" /&gt;
&lt;p&gt;We could &amp;ldquo;fix&amp;rdquo; this by giving the user write permissions to this directory or even to this specific file but here comes the seconds problem:&lt;/p&gt;
&lt;p&gt;On a multi user environment like Citrix or Terminal Server/Remote Desktop Services it means that when one user exists he will he save his settings for all users.&lt;/p&gt;
&lt;p&gt;And then we have a third problem:&lt;/p&gt;
&lt;p&gt;When a users starts the application on another server he will not get the expected settings because each server will have it&amp;rsquo;s own copy of this ini file.&lt;/p&gt;</description></item><item><title>Unattended Installation of the Oracle Client</title><link>https://remkoweijnen.nl/blog/2010/12/27/unattended-installation-of-the-oracle-client/</link><pubDate>Mon, 27 Dec 2010 17:20:48 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2010/12/27/unattended-installation-of-the-oracle-client/</guid><description>&lt;p&gt;Last week I needed to an unattended installation of the Oracle Client, in my case version 10.2.0.1.0.&lt;/p&gt;
&lt;p&gt;Oracle has a record switch that allows you to record an installation and generate a response file using: setup -record -destinationFile response_file_name. This is documented &lt;a title="Installing Oracle Database Client Using Response Files" href="http://download.oracle.com/docs/cd/B19306_01/install.102/b14312/advance.htm#BBAEDBJG" target="_blank"&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;When you are finished you can use this response file to perform the unattended install, eg setup -silent -responseFile response_file_name.&lt;/p&gt;
&lt;p&gt;There is a problem though, the installer (setup.exe) launches a java based installer and immediately returns.&lt;/p&gt;
&lt;p&gt;This was a problem for me since I cannot deploy a dependant application if the Oracle install hasn&amp;rsquo;t finished yet.&lt;/p&gt;
&lt;p&gt;I did some googling and found a lot of questions about this subject and saw a common resolution where a script is watching a certain file that is creating when the installation has finished in a loop.&lt;/p&gt;
&lt;p&gt;I figured there should be a better wait so I to a closer look at the installer with &lt;a title="The IDA Pro Disassebler and Debugger" href="http://www.hex-rays.com/idapro/" target="_blank"&gt;Ida Pro&lt;/a&gt;. I noticed that setup.exe launches another exe. called oui.exe (Oracle Universal Installer) which in turn launches Java.&lt;/p&gt;</description></item><item><title>Terminal Server Remote Keyboard Layout</title><link>https://remkoweijnen.nl/blog/2010/12/27/terminal-server-remote-keyboard-layout/</link><pubDate>Mon, 27 Dec 2010 16:38:55 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2010/12/27/terminal-server-remote-keyboard-layout/</guid><description>&lt;p&gt;Today I shadowed a user&amp;rsquo;s session in Citrix and when I wanted to type something I noticed that the keyboard layout was incorrect.&lt;/p&gt;
&lt;p&gt;This is and old &amp;ldquo;friend&amp;rdquo; that I always tend to forget about. So hopefully this post will help me to remember it :D.&lt;/p&gt;
&lt;p&gt;You can prevent this by adding a value &amp;ldquo;IgnoreRemoteKeyboardLayout&amp;rdquo; to the registry key HKLM\System\CurrentControlSet\Keyboard Layout:&lt;/p&gt;
&lt;blockquote&gt;reg add "HKLM\SYSTEM\CurrentControlSet\Control\Keyboard Layout" /v IgnoreRemoteKeyboardLayout /t REG_DWORD /d 0x00000001 /f&lt;/blockquote&gt;
This option has been present since Windows 2000 but was broken in Windows 2003. For Windows 2003 there are two related hotfixes, see &lt;a title="The IgnoreRemoteKeyboardLayout registry entry has no effect in Windows Server 2003" href="http://support.microsoft.com/kb/842136" target="_blank"&gt;kb 842136&lt;/a&gt; and &lt;a title="The terminal server IME keyboard layout differs from the client computer when you remotely log on to a Windows Server 2003 SP1-based terminal server" href="http://support.microsoft.com/kb/917910" target="_blank"&gt;kb 917910&lt;/a&gt;.</description></item><item><title>Unattended Installation of IBM System i Access for Windows</title><link>https://remkoweijnen.nl/blog/2010/12/24/unattended-installation-of-ibm-system-i-access-for-windows/</link><pubDate>Fri, 24 Dec 2010 15:52:04 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2010/12/24/unattended-installation-of-ibm-system-i-access-for-windows/</guid><description>&lt;p&gt;Today I needed to script the installation of IBM System i Access for Windows (formerly called IBM Client Access).&lt;/p&gt;
&lt;p&gt;With older versions of this client (up to 5.4) you could use the -r (record) installer switch to record the install in a setup.iss file but version 6.1 uses an MSI based installer.&lt;/p&gt;
&lt;p&gt;IBM offers the client in a 2 DVD download but you probably only need the first dvd (dvd 1 has both the x86 and x64 installers, dvd 2 has the ia64 installer) which is a whopping 3,5 GB download.&lt;/p&gt;
&lt;p&gt;Inside the download (a zip) is an iso file of which you will only need the files in the root and the Image32 or Image64a folder.&lt;/p&gt;
&lt;p&gt;Inside the image folder are subfolders names MRI29xx where xx is a language identifier:&lt;/p&gt;
&lt;p&gt;The following Identifiers are used:&lt;/p&gt;</description></item><item><title>Master Return codes in Altiris</title><link>https://remkoweijnen.nl/blog/2010/12/24/master-return-codes-in-altiris/</link><pubDate>Fri, 24 Dec 2010 15:48:17 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2010/12/24/master-return-codes-in-altiris/</guid><description>&lt;p&gt;Altiris offers a Master Return code, a very usefull feature that is not used often I think. In this article I will explain why I find them usefull and we will implement a Master Return code for Installations that require a reboot.&lt;/p&gt;
&lt;p&gt;A Master Return code can be consired as a Global Action handler, whenever a job returns a specific error/return/result code this Global handler will be called (unless you override it in the job with another action).&lt;/p&gt;
&lt;p&gt;A perfect usage for a Global Action handler is installing MSI files that need I reboot. If you do nothing the system will be rebooted after the successfull installation and your job will return as failed with error 3010.&lt;/p&gt;
&lt;p&gt;Microsoft &lt;a title="Error Codes (Windows)" href="http://msdn.microsoft.com/en-us/library/aa368542(v=vs.85).aspx" target="_blank"&gt;documents&lt;/a&gt; that 3010 means ERROR_SUCCESS_REBOOT_REQUIRED: A restart is required to complete the install. This message is indicative of a success.&lt;/p&gt;
&lt;p&gt;To prevent the reboot we can pass REBOOT=ReallySurpress to the MSI but we still need to indicate to Altirs that 3010 actually means Success and that we need to reboot.&lt;/p&gt;</description></item><item><title>Citrix Online Plugin could not launch the requested published application</title><link>https://remkoweijnen.nl/blog/2010/12/22/citrix-online-plugin-could-not-launch-the-requested-published-application/</link><pubDate>Wed, 22 Dec 2010 14:10:31 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2010/12/22/citrix-online-plugin-could-not-launch-the-requested-published-application/</guid><description>&lt;p&gt;After doing an unattended installation of the Citrix Online Plugin it was not possible to launch a Published Application.&lt;/p&gt;
&lt;p&gt;It would just give the error mesage: "citrix online plugin could not launch the requested published application".&lt;/p&gt;
&lt;p&gt;Even though the installation finished without errors and the logfiles indicated no failure at all I was able to fix it by using 2 steps described in &lt;a title="Offline Plug-in 11.2 Unattended Installation Fails" href="http://support.citrix.com/article/CTX123761" target="_blank"&gt;CTX123761&lt;/a&gt;.&lt;/p&gt;</description></item><item><title>Packaging an ActiveX Component: Easy?</title><link>https://remkoweijnen.nl/blog/2010/12/20/packaging-an-activex-component/</link><pubDate>Mon, 20 Dec 2010 20:19:18 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2010/12/20/packaging-an-activex-component/</guid><description>&lt;p&gt;Today I needed to package an applications that I was told was very simple. If I hear something like that my first thought is always &amp;ldquo;hmmm&amp;rdquo;.&lt;/p&gt;
&lt;p&gt;So I prepared a machine to build the package and followed the instructions which were to go to a specific URL and download the package (probably an ActiveX control from there).&lt;/p&gt;
&lt;p&gt;I opened the URL and immediately got an error message:&lt;/p&gt;
&lt;img loading="lazy" decoding="async" src="https://remkoweijnen.nl/blog/wp-content/uploads/2010/12/lciderror.webp" alt="The specified LICD is not available" width="413" height="290" /&gt;
&lt;p&gt;The error message 0x80004005 is not very helpfull since it stands for E_FAIL (winerror.h).&lt;/p&gt;</description></item><item><title>Desktop Icons, hide, show, prevent rename or delete</title><link>https://remkoweijnen.nl/blog/2010/12/19/desktop-icons-hide-show-prevent-rename-or-delete/</link><pubDate>Sun, 19 Dec 2010 15:14:04 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2010/12/19/desktop-icons-hide-show-prevent-rename-or-delete/</guid><description>&lt;p&gt;I was cleaning up some old data on my Hard Drive when I found a program I wrote about a year ago.&lt;/p&gt;
&lt;p&gt;At that time I was doing a project where I was deploying a Windows 2008 based Citrix Environment.&lt;/p&gt;
&lt;p&gt;I wanted to get rid of the new Personal Folders or User&amp;rsquo;s files icon on the Desktop and replace it with the familiar My Documents icon.&lt;/p&gt;
&lt;img loading="lazy" decoding="async" src="https://remkoweijnen.nl/blog/wp-content/uploads/2010/12/personal.webp" alt="Personal" width="64" height="91" /&gt;
&lt;p&gt;These settings are stored in the Registry under HKEY_CLASSES_ROOT\CLSID{folder&amp;rsquo;s GUID}\ShellFolder.&lt;/p&gt;</description></item><item><title>Default Explorer View</title><link>https://remkoweijnen.nl/blog/2010/12/19/default-explorer-view/</link><pubDate>Sun, 19 Dec 2010 14:40:40 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2010/12/19/default-explorer-view/</guid><description>&lt;p&gt;As you probably know there are several different Folder Views in Windows Explorer:&lt;/p&gt;
&lt;img loading="lazy" decoding="async" src="https://remkoweijnen.nl/blog/wp-content/uploads/2010/12/explorerview.webp" alt="ExplorerView" width="183" height="276" /&gt;
&lt;p&gt;The Explorer keeps tracks of the last used View per Folder in the registry in the key HKEY_CURRENT_USER\Software\Microsoft\Windows\Shell\Bags. This &lt;a title="Changes to the size, view, icon or position of a folder are lost" href="http://support.microsoft.com/kb/813711" target="_blank"&gt;KB article&lt;/a&gt; sort of desribes this functionality.&lt;/p&gt;</description></item><item><title>Packaging an application – Auto Accept the EULA</title><link>https://remkoweijnen.nl/blog/2010/12/17/packaging-an-application-auto-accept-the-eula/</link><pubDate>Fri, 17 Dec 2010 17:10:03 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2010/12/17/packaging-an-application-auto-accept-the-eula/</guid><description>&lt;p&gt;Yesterday I was packaging an application called Kluwer Juridische Bibliotheek. When the user first starts this application a screen with the License Conditions pops up and it must be accepted:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2010/12/kluwereula.webp" class="glightbox" data-type="image" data-gallery="post-879"&gt;&lt;img loading="lazy" decoding="async" src="https://remkoweijnen.nl/blog/wp-content/uploads/2010/12/kluwereula-small.webp" alt="KluwerEULA" width="430" height="399" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I always try to remove such things as I don&amp;rsquo;t think it&amp;rsquo;s necessary for every user to accept it.&lt;/p&gt;</description></item><item><title>International Karate+</title><link>https://remkoweijnen.nl/blog/2010/12/15/international-karate/</link><pubDate>Wed, 15 Dec 2010 22:35:13 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2010/12/15/international-karate/</guid><description>&lt;p&gt;A few weeks ago I turned on my old &lt;a href="http://en.wikipedia.org/wiki/Amiga" target="_blank"&gt;Commodore Amiga&lt;/a&gt; A1200 which had been stored for 15 years or so.&lt;/p&gt;
&lt;p&gt;The idea was that my kids can use it as a game computer but tonight I couldn't resist and I played some of the old games.&lt;/p&gt;</description></item><item><title>My favorite KB Article</title><link>https://remkoweijnen.nl/blog/2010/12/15/my-favorite-kb-article/</link><pubDate>Wed, 15 Dec 2010 14:07:53 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2010/12/15/my-favorite-kb-article/</guid><description>&lt;p&gt;The previous post reminded me of my all time favourite knowledge base article from Compaq titled: "&lt;em&gt;Where do I find the "Any" key on my keyboard?&lt;/em&gt;"&lt;/p&gt;
&lt;p&gt;It's still in archive.org: &lt;a href="http://web.archive.org/web/20070627063024/http://www29.compaq.com/falco/detail.asp?FAQnum=FAQ2859"&gt;http://web.archive.org/web/20070627063024/http://www29.compaq.com/falco/detail.asp?FAQnum=FAQ2859&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Copying files larger than 2GB in an RDP Session</title><link>https://remkoweijnen.nl/blog/2010/12/15/copying-files-larger-than-2gb-in-an-rdp-session/</link><pubDate>Wed, 15 Dec 2010 14:00:50 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2010/12/15/copying-files-larger-than-2gb-in-an-rdp-session/</guid><description>&lt;p&gt;Just had a good laugh while reading Microsoft &lt;a title="Copying files larger than 2 GB over a Remote Desktop Services or Terminal Services session by using Clipboard Redirection (copy and paste) fails silently" href="http://support.microsoft.com/kb/2258090" target="_blank"&gt;KB article 2258090&lt;/a&gt;:&lt;/p&gt;
&lt;p&gt;When you try to copy a file that is larger than 2 GB over a Remote Desktop Services or a Terminal Services session through Clipboard Redirection (copy and paste) by using the RDP client 6.0 or a later version, the file is not copied. And, you do not receive an error message.&lt;/p&gt;</description></item><item><title>Packaging an Application that uses the BDE</title><link>https://remkoweijnen.nl/blog/2010/12/14/packaging-an-application-that-uses-the-bde/</link><pubDate>Tue, 14 Dec 2010 21:12:58 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2010/12/14/packaging-an-application-that-uses-the-bde/</guid><description>&lt;p&gt;Today I needed to package an application that uses the Borland Database Engine (BDE).&lt;/p&gt;
&lt;p&gt;The BDE is a database engine/connectivity component commonly used in Delphi and C++ Builder applications. It has been deprecated since 2000 when it was replaced by dbExpress.&lt;/p&gt;
&lt;p&gt;But it&amp;rsquo;s still widely used so you may still find applications that require the BDE.&lt;/p&gt;
&lt;p&gt;In my environment I already have a package for the BDE itsself. But the application I needed to package today, needs to have an Alias addded.&lt;/p&gt;
&lt;p&gt;This is usually done manually by going into the BDEADMIN control panel applet or by copying the file where BDE saves the aliases (IDAPI32.CFG).&lt;/p&gt;
&lt;p&gt;Here is a screenshot of the Alias my application needs (it uses an Interbase database):&lt;/p&gt;
&lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2010/12/bde.webp" class="glightbox" data-type="image" data-gallery="post-868"&gt;&lt;img loading="lazy" decoding="async" src="https://remkoweijnen.nl/blog/wp-content/uploads/2010/12/bde-small.webp" alt="BDE" width="430" height="302" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I didn&amp;rsquo;t like the copy approach and didn&amp;rsquo;t even consider the manual option so I wrote 2 little tools.&lt;/p&gt;</description></item><item><title>Writing Environment Variables to the Registry from a Script</title><link>https://remkoweijnen.nl/blog/2010/12/13/writing-environment-variables-to-the-registry-from-a-script/</link><pubDate>Mon, 13 Dec 2010 20:52:59 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2010/12/13/writing-environment-variables-to-the-registry-from-a-script/</guid><description>&lt;p&gt;I usually change the text below the &amp;ldquo;This Computer&amp;rdquo; icon to reflect the current username and servername:&lt;/p&gt;
&lt;img loading="lazy" decoding="async" src="https://remkoweijnen.nl/blog/wp-content/uploads/2010/12/useroncomputer.webp" alt="UserOnComputer" width="86" height="83" /&gt;
&lt;p&gt;This is an ancient trick, just set the the &lt;em&gt;LocalizedString&lt;/em&gt; Value of the following key:&lt;/p&gt;
&lt;div class="codecard"&gt;
 &lt;div class="codehead"&gt;
 &lt;span class="codefile"&gt;&lt;/span&gt;
 &lt;span class="codetools" data-pagefind-ignore&gt;
 &lt;span class="codelang"&gt;batch&lt;/span&gt;
 &lt;button class="codebtn" type="button" data-copy&gt;Copy&lt;/button&gt;
 &lt;a class="codebtn" download=".bat" href="data:text/plain;charset=utf-8;base64,SEtFWV9DTEFTU0VTX1JPT1RcQ0xTSURcezIwRDA0RkUwLTNBRUEtMTA2OS1BMkQ4LTA4MDAyQjMwMzA5RH0="&gt;Download&lt;/a&gt;
 &lt;/span&gt;
 &lt;/div&gt;
 &lt;div class="codebody"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-batch" data-lang="batch"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;HKEY_CLASSES_ROOT\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;to &amp;ldquo;%USERNAME% on %COMPUTERNAME%&amp;rdquo;.&lt;/p&gt;
&lt;p&gt;It get&amp;rsquo;s a little more complicated if you want to set this from a script, because the environment variables are replaced with the actual value BEFORE they are entered in the Registry.&lt;/p&gt;</description></item><item><title>Where is LSA_OBJECT_ATTRIBUTES defined?</title><link>https://remkoweijnen.nl/blog/2010/12/12/where-is-lsa_object_attributes-defined/</link><pubDate>Sun, 12 Dec 2010 23:06:20 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2010/12/12/where-is-lsa_object_attributes-defined/</guid><description>&lt;p&gt;If you read MSDN documentation for &lt;a title="LSA_OBJECT_ATTRIBUTES Structure" href="http://msdn.microsoft.com/en-us/library/ms721829(v=vs.85).aspx" target="_blank"&gt;LSA_OBJECT_ATTRIBUTES&lt;/a&gt; you will think it's defined in LsaLookup.h:&lt;/p&gt;
&lt;p align="center"&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2010/12/msdn.webp" class="glightbox" data-type="image" data-gallery="post-853"&gt;&lt;img loading="lazy" decoding="async" alt="MSDN" src="https://remkoweijnen.nl/blog/wp-content/uploads/2010/12/msdn-small.webp" width="430" height="121" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;And that it's supported since Windows 2000 but I couldn't find it in this header file.&lt;/p&gt;
&lt;p&gt;Instead I found it in NTSecAPI.h, so I decided to check the different SDK versions and starting from SDK v7 LsaLookup.h exists but in earlier SDK's (v5.0, v6.0a and v6.1) there is no LsaLookup.h.&lt;/p&gt;</description></item><item><title>SQL Query to get the Full Path of an Altiris Job #3</title><link>https://remkoweijnen.nl/blog/2010/12/12/sql-query-to-get-the-full-path-of-an-altiris-job-3/</link><pubDate>Sun, 12 Dec 2010 19:50:32 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2010/12/12/sql-query-to-get-the-full-path-of-an-altiris-job-3/</guid><description>&lt;p&gt;Last time I &lt;a title="SQL Query to get the Full Path of an Altiris Job #2" href="https://remkoweijnen.nl/blog/2010/12/09/sql-query-to-get-the-full-path-of-an-altiris-job-2/" target="_blank"&gt;showed&lt;/a&gt; a User Defined Function to the Full Path of an Altiris Job given it&amp;rsquo;s id (event_id). Note that Altiris calls a Job an Event so the terms Event and Jobs are interchangeable here.&lt;/p&gt;
&lt;p&gt;To complete it we first need to prepend the server and share name to the path.&lt;/p&gt;
&lt;p&gt;I looked into the Altiris database tables to find the best place to get the servername and it seems that the hostname column of the mmsettings table is a good way.&lt;/p&gt;
&lt;p&gt;In my database there was only one row in the table but I restrict the results by adding top 1:&lt;/p&gt;
&lt;div class="codecard"&gt;
 &lt;div class="codehead"&gt;
 &lt;span class="codefile"&gt;&lt;/span&gt;
 &lt;span class="codetools" data-pagefind-ignore&gt;
 &lt;span class="codelang"&gt;sql&lt;/span&gt;
 &lt;button class="codebtn" type="button" data-copy&gt;Copy&lt;/button&gt;
 &lt;a class="codebtn" download=".sql" href="data:text/plain;charset=utf-8;base64,U0VMRUNUIFRPUCAxIGhvc3RuYW1lIEZST00gbW1zZXR0aW5ncw=="&gt;Download&lt;/a&gt;
 &lt;/span&gt;
 &lt;/div&gt;
 &lt;div class="codebody"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-sql" data-lang="sql"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;SELECT&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;TOP&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;hostname&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;FROM&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;mmsettings&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Then I looked into the available tokens for one that returns a job id but we can only return a job name or a computer id. Since a job name is not unique I decided to use the computername and find the active job for this computer.&lt;/p&gt;
&lt;p&gt;When a Job is scheduled an entry is added to the event_schedule table. If you look into this table you will notice a column status_code which is NULL initially and when the job start it will get a value of -1 which indicates the job is active.&lt;/p&gt;
&lt;p&gt;When the job has finished the status will always be 0 or higher.&lt;/p&gt;</description></item><item><title>SQL Query to get the Full Path of an Altiris Job #2</title><link>https://remkoweijnen.nl/blog/2010/12/09/sql-query-to-get-the-full-path-of-an-altiris-job-2/</link><pubDate>Thu, 09 Dec 2010 10:00:43 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2010/12/09/sql-query-to-get-the-full-path-of-an-altiris-job-2/</guid><description>&lt;p&gt;Earlier I described a &lt;a href="https://remkoweijnen.nl/blog/2010/12/07/sql-query-to-get-the-full-path-of-an-altiris-job/"&gt;SQL Query to get the Full Path of an Altiris Job&lt;/a&gt;, today I will describe how we can make a &lt;a title="User Defined Functions" href="http://msdn.microsoft.com/en-us/library/ms189593.aspx" target="_blank"&gt;User Defined Function&lt;/a&gt; (UDF) in SQL so we can call it easier.&lt;/p&gt;
&lt;p&gt;I am using an UDF because it allows us to specify parameters, in this case a single parameter (the EventId (or job id).&lt;/p&gt;
&lt;p&gt;This is the SQL that creates the UDF:&lt;/p&gt;
&lt;div class="codecard"&gt;
 &lt;div class="codehead"&gt;
 &lt;span class="codefile"&gt;&lt;/span&gt;
 &lt;span class="codetools" data-pagefind-ignore&gt;
 &lt;span class="codelang"&gt;sql&lt;/span&gt;
 &lt;button class="codebtn" type="button" data-copy&gt;Copy&lt;/button&gt;
 &lt;a class="codebtn" download=".sql" href="data:text/plain;charset=utf-8;base64,Q1JFQVRFIEZVTkNUSU9OIEdldEZ1bGxQYXRoCiAgKCBARXZlbnRJZCBpbnQpClJFVFVSTlMgbnZhcmNoYXIoNDAwMCkKQVMKQkVHSU4KCURFQ0xBUkUgQHN0ciBudmFyY2hhcig0MDAwKTsKCVdJVEggdDEgKGZvbGRlcl9pZCwgbmFtZSwgcGFyZW50X2lkLCBsZXZlbCkKCUFTCgkoCgktLSBBbmNob3IgbWVtYmVyIGRlZmluaXRpb24KCQlTRUxFQ1QgZm9sZGVyX2lkLCBuYW1lLCBwYXJlbnRfaWQsIDAgQVMgTGV2ZWwKCQlGUk9NIGV2ZW50X2ZvbGRlcgoJCVdIRVJFIGZvbGRlcl9pZCBpbiAoCgkJCVNFTEVDVCBmb2xkZXJfaWQgRlJPTSBldmVudCBXSEVSRSBldmVudF9pZCA9IEBFdmVudElkKQoJCVVOSU9OIEFMTAoKCS0tIFJlY3Vyc2l2ZSBtZW1iZXIgZGVmaW5pdGlvbgoJCVNFTEVDVCB0Mi5mb2xkZXJfaWQsdDIubmFtZSwgdDIucGFyZW50X2lkLCBMZXZlbCsxCgkJRlJPTSBldmVudF9mb2xkZXIgQVMgdDIsIHQxCgkJV0hFUkUgdDIuZm9sZGVyX2lkID0gdDEucGFyZW50X2lkCgkpCgoJLS0gU3RhdGVtZW50IHRoYXQgZXhlY3V0ZXMgdGhlIENURQoJLS0gU1RVRkYgYW5kIEZPUiBYTUwgYXJlIHVzZWQgdG8gQ29uY2F0ZW5hdGUgdGhlIFZhbHVlcyBhbmQgc2VwZXJhdGUgdGhlbSBieSBcIGNoYXJhY3RlcgoKCVNFTEVDVCBAc3RyID0gU1RVRkYoKFNFTEVDVCAnXCcgKyBuYW1lIGZyb20gdDEgb3JkZXIgYnkgbGV2ZWwgZGVzYyBGT1IgWE1MIFBBVEgoJycpKSwxLDEsJycpCglSRVRVUk4gQHN0cgpFTkQKR08="&gt;Download&lt;/a&gt;
 &lt;/span&gt;
 &lt;/div&gt;
 &lt;div class="codebody"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-sql" data-lang="sql"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;CREATE&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;FUNCTION&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;GetFullPath&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;@&lt;/span&gt;&lt;span class="n"&gt;EventId&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;int&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;RETURNS&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;nvarchar&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;4000&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;AS&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;BEGIN&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt;	&lt;/span&gt;&lt;span class="k"&gt;DECLARE&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;@&lt;/span&gt;&lt;span class="n"&gt;str&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;nvarchar&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;4000&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt;	&lt;/span&gt;&lt;span class="k"&gt;WITH&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;t1&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;folder_id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;parent_id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;level&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt;	&lt;/span&gt;&lt;span class="k"&gt;AS&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt;	&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt;	&lt;/span&gt;&lt;span class="c1"&gt;-- Anchor member definition
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt;		&lt;/span&gt;&lt;span class="k"&gt;SELECT&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;folder_id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;parent_id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;AS&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;Level&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt;		&lt;/span&gt;&lt;span class="k"&gt;FROM&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;event_folder&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt;		&lt;/span&gt;&lt;span class="k"&gt;WHERE&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;folder_id&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;in&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt;			&lt;/span&gt;&lt;span class="k"&gt;SELECT&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;folder_id&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;FROM&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;event&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;WHERE&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;event_id&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;@&lt;/span&gt;&lt;span class="n"&gt;EventId&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt;		&lt;/span&gt;&lt;span class="k"&gt;UNION&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;ALL&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt;	&lt;/span&gt;&lt;span class="c1"&gt;-- Recursive member definition
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt;		&lt;/span&gt;&lt;span class="k"&gt;SELECT&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;t2&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;folder_id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;t2&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;t2&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;parent_id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;Level&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt;		&lt;/span&gt;&lt;span class="k"&gt;FROM&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;event_folder&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;AS&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;t2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;t1&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt;		&lt;/span&gt;&lt;span class="k"&gt;WHERE&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;t2&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;folder_id&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;t1&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;parent_id&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt;	&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt;	&lt;/span&gt;&lt;span class="c1"&gt;-- Statement that executes the CTE
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt;	&lt;/span&gt;&lt;span class="c1"&gt;-- STUFF and FOR XML are used to Concatenate the Values and seperate them by \ character
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt;	&lt;/span&gt;&lt;span class="k"&gt;SELECT&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;@&lt;/span&gt;&lt;span class="n"&gt;str&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;STUFF&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="k"&gt;SELECT&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;\&amp;#39;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;from&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;t1&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;order&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;by&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;level&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;desc&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;FOR&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;XML&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;PATH&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;)),&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt;	&lt;/span&gt;&lt;span class="k"&gt;RETURN&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;@&lt;/span&gt;&lt;span class="n"&gt;str&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;END&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;GO&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;/div&gt;</description></item><item><title>Cross-Site Scripting Vulnerability in Citrix Web Interface</title><link>https://remkoweijnen.nl/blog/2010/12/09/cross-site-scripting-vulnerability-in-citrix-web-interface/</link><pubDate>Thu, 09 Dec 2010 09:40:59 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2010/12/09/cross-site-scripting-vulnerability-in-citrix-web-interface/</guid><description>&lt;p&gt;from &lt;a title="Cross-Site Scripting Vulnerability in Citrix Web Interface" href="http://support.citrix.com/article/CTX127541" target="_blank"&gt;CTX127541&lt;/a&gt;:&lt;/p&gt;
&lt;p&gt;A cross-site scripting vulnerability has been identified in specific versions of Citrix Web Interface.&lt;/p&gt;
&lt;p&gt;This vulnerability could potentially be used to execute malicious client-side script in the same context as legitimate content from the web server; if this vulnerability is used to execute script in the browser of an authenticated user then the script may be able to gain access to the authenticated user’s session or other potentially sensitive information.&lt;/p&gt;</description></item><item><title>SQL Query to get the Full Path of an Altiris Job</title><link>https://remkoweijnen.nl/blog/2010/12/07/sql-query-to-get-the-full-path-of-an-altiris-job/</link><pubDate>Tue, 07 Dec 2010 22:22:56 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2010/12/07/sql-query-to-get-the-full-path-of-an-altiris-job/</guid><description>&lt;p&gt;I wanted to query the full path name of an Altiris Job, this sounds easier that it is though.&lt;/p&gt;
&lt;p&gt;Consider the following hierarchy:&lt;/p&gt;
&lt;img loading="lazy" decoding="async" src="https://remkoweijnen.nl/blog/wp-content/uploads/2010/12/tree1.webp" alt="Tree" width="302" height="360" /&gt;
&lt;p&gt;Now I want to assemble the full Path, in this case: RPA\Getronics\PKG_p007.Citrix_Components.&lt;/p&gt;</description></item><item><title>BSOD with STOP 0x0000008E when installing Window 7 Checked Build</title><link>https://remkoweijnen.nl/blog/2010/12/06/bsod-with-stop-0x0000008e-when-installing-window-7-checked-build/</link><pubDate>Mon, 06 Dec 2010 23:13:01 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2010/12/06/bsod-with-stop-0x0000008e-when-installing-window-7-checked-build/</guid><description>&lt;p&gt;I was trying to install a checked build of Windows 7 under VMWare Workstation but after the first reboot during the install (the completing installation step) the system came up with a BSOD.&lt;/p&gt;
&lt;p&gt;It can be fixed by adding a line to the VMX configuration file:&lt;/p&gt;</description></item><item><title>Citrix Web Interface starts very slowly</title><link>https://remkoweijnen.nl/blog/2010/11/26/citrix-web-interface-starts-very-slowly/</link><pubDate>Fri, 26 Nov 2010 15:07:45 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2010/11/26/citrix-web-interface-starts-very-slowly/</guid><description>&lt;p&gt;I remembered from a previous project that when the Citrix Web Interface this is caused by a setting called &lt;em&gt;generatePublisherEvidence&lt;/em&gt; in the Aspnet.config file.&lt;/p&gt;
&lt;p&gt;This behaviour has been documented by Citrix in &lt;a title="Web Interface 5.x Delay on First Page" href="http://support.citrix.com/article/ctx117273" target="_blank"&gt;CTX117273&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;If you read it carefully you will see the note that you need to fix it in 2 places for an x64 system.&lt;/p&gt;</description></item><item><title>Script to register ASP.NET in IIS</title><link>https://remkoweijnen.nl/blog/2010/11/26/script-to-register-asp-net-in-iis/</link><pubDate>Fri, 26 Nov 2010 12:37:01 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2010/11/26/script-to-register-asp-net-in-iis/</guid><description>&lt;p&gt;I did an unattended install of the Citrix WebInterface on a testmachine and it failed with error 258.&lt;/p&gt;
&lt;p&gt;The logfile clearly indicates the reason:&lt;/p&gt;
&lt;blockquote&gt;[ ERROR ] com.citrix.wi.install.SetupErrorReporter: Error 258 occurred: ASP.NET 2.0 must be registered and enabled in Microsoft Internet Information Services before the Web Interface can be installed.&lt;/blockquote&gt;
We can register ASP.NET in IIS with the &lt;a title="ASP.NET IIS Registration Tool (Aspnet_regiis.exe)" href="http://msdn.microsoft.com/en-us/library/k6h9cz8h(VS.80).aspx" target="_blank"&gt;Aspnet_regiis.exe&lt;/a&gt; tool that comes with the .NET framework.
&lt;p&gt;The commandline would be:&lt;/p&gt;</description></item><item><title>Unattended Visual J# Install returns error 4122</title><link>https://remkoweijnen.nl/blog/2010/11/26/unattended-visual-j-install-returns-error-4122/</link><pubDate>Fri, 26 Nov 2010 11:53:30 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2010/11/26/unattended-visual-j-install-returns-error-4122/</guid><description>&lt;p&gt;This means you are installing the wrong edition, eg x86 version on an x64 OS.&lt;/p&gt;
&lt;p&gt;All available version are listed on the MSDN &lt;a href="http://msdn.microsoft.com/en-us/vjsharp/bb188598" target="_blank"&gt;Visual J# Redistributable Packages&lt;/a&gt; page.&lt;/p&gt;
&lt;p&gt;Related: &lt;a title="The case of the VMware vSphere Client" href="https://remkoweijnen.nl/blog/2010/10/27/the-case-of-the-vmware-vsphere-client/"&gt;The case of the VMware vSphere Client&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Scripted creation of Server Manager Answer Files</title><link>https://remkoweijnen.nl/blog/2010/11/25/scripted-creation-of-server-manager-answer-files/</link><pubDate>Thu, 25 Nov 2010 16:14:42 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2010/11/25/scripted-creation-of-server-manager-answer-files/</guid><description>&lt;p&gt;A while ago I created a script that I can run as embedded script in Altiris that creates a Server Manager Answer File (for Server 2008).&lt;/p&gt;
&lt;p&gt;I could have simply done an echo &amp;gt;answer.xml but I wanted a well formed XML that could be read and displayed in an XML editor or Internet Explorer when needed.&lt;/p&gt;
&lt;p&gt;I use the Microsoft.XMLDom object in the script the create the XML and I think the code is easy to understand so I will just show it here:&lt;/p&gt;</description></item><item><title>Disabling Java Autoupdate</title><link>https://remkoweijnen.nl/blog/2010/11/24/disabling-java-autoupdate/</link><pubDate>Wed, 24 Nov 2010 16:07:28 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2010/11/24/disabling-java-autoupdate/</guid><description>&lt;p&gt;I did an unattended install of Java Jre1.6_0.22 using an mst file that puts all (auto)update properties to off.&lt;/p&gt;
&lt;p&gt;However it seems that Java simply ignores this, so usually a script runs after the install to the delete some registry keys and perform some extra configuration.&lt;/p&gt;</description></item><item><title>Altiris AxSched ignores the DSN parameter</title><link>https://remkoweijnen.nl/blog/2010/11/23/altiris-axsched-ignores-the-dsn-parameter/</link><pubDate>Tue, 23 Nov 2010 22:48:47 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2010/11/23/altiris-axsched-ignores-the-dsn-parameter/</guid><description>&lt;p&gt;I was playing around with the AxSched tool that comes with Altiris, in my case the version that comes with v6.9 build 453.&lt;/p&gt;
&lt;p&gt;I could not make it connect to the Deployment Server from my test machine, it seemed like the /dsn parameter I used was totally ignored.&lt;/p&gt;</description></item><item><title>Why is my scheduled job not executed in Altiris?</title><link>https://remkoweijnen.nl/blog/2010/11/23/why-is-my-scheduled-job-not-executed-in-altiris/</link><pubDate>Tue, 23 Nov 2010 20:34:15 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2010/11/23/why-is-my-scheduled-job-not-executed-in-altiris/</guid><description>&lt;p&gt;Earlier today I wrote about my &lt;a href="https://remkoweijnen.nl/blog/2010/11/23/altiris-job-builder/"&gt;Altiris Job Builder&lt;/a&gt; tool but when I tested the actual produced build job I noticed something weird: the job was scheduled but not executed.&lt;/p&gt;
&lt;p&gt;I then tried to manually push a job to this server and that one executed fine.&lt;/p&gt;
&lt;p&gt;When I clicked the Job I could see that it was scheduled:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2010/11/job1.webp" class="glightbox" data-type="image" data-gallery="post-799"&gt;&lt;img loading="lazy" decoding="async" src="https://remkoweijnen.nl/blog/wp-content/uploads/2010/11/job1-small.webp" alt="Job1" width="430" height="246" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;But when I clicked the Server it wasn&amp;rsquo;t there:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2010/11/job2.webp" class="glightbox" data-type="image" data-gallery="post-799"&gt;&lt;img loading="lazy" decoding="async" src="https://remkoweijnen.nl/blog/wp-content/uploads/2010/11/job2-small.webp" alt="Job2" width="430" height="313" /&gt;&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Altiris Job Builder</title><link>https://remkoweijnen.nl/blog/2010/11/23/altiris-job-builder/</link><pubDate>Tue, 23 Nov 2010 10:26:34 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2010/11/23/altiris-job-builder/</guid><description>&lt;p&gt;I have created a little tool for myself that I have call Altiris Job Builder, it retreives the Jobs from the Altiris database and shows them in a Treeview.&lt;/p&gt;
&lt;p&gt;Then I can assemble a Master Build Job by dragging the needed Jobs to another Treeview on the right. Since it&amp;rsquo;s just for me it doesn&amp;rsquo;t have a fancy gui:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2010/11/jobbuilder2.webp" class="glightbox" data-type="image" data-gallery="post-784"&gt;&lt;img loading="lazy" decoding="async" src="https://remkoweijnen.nl/blog/wp-content/uploads/2010/11/jobbuilder2-small.webp" alt="JobBuilder2" width="430" height="406" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;So why did I write it? Well I have divided my Jobs into Prerequisites and Packages, for instance IIS and Terminal Server and Java are prereqisuites for Citrix. But many prereqisuites are required for one or more other packages, eg Java is also used for certain applications.&lt;/p&gt;</description></item><item><title>Citrix and Java JRE Versions</title><link>https://remkoweijnen.nl/blog/2010/11/15/citrix-and-java-jre-versions/</link><pubDate>Mon, 15 Nov 2010 22:41:33 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2010/11/15/citrix-and-java-jre-versions/</guid><description>&lt;p&gt;If you have ever installed Citrix Presentation Server/XenApp or one of the management consoles then you have probably dealt with Java versions.&lt;/p&gt;
&lt;p&gt;Citrix is very picky about the Java version so it&amp;rsquo;s usually best to initially install the Jre version that is delivered with the product.&lt;/p&gt;
&lt;p&gt;In my case however I needed to install the CMC for Xenapp 5 on Windows 2003, it requires JRE 5.0 Update 9 but this version was undesirable.&lt;/p&gt;
&lt;p&gt;So I tried to install the CMC with the current JRE version (1.6.0_22 at this time) but it makes the Installer exit immediately:&lt;/p&gt;
&lt;img loading="lazy" decoding="async" src="https://remkoweijnen.nl/blog/wp-content/uploads/2010/11/cmcjreerror.webp" alt="CMCJreError" width="416" height="216" /&gt;</description></item><item><title>WMI query to Win32_Product returns error 0x80041010</title><link>https://remkoweijnen.nl/blog/2010/11/12/wmi-query-to-win32_product-returns-error-0x80041010/</link><pubDate>Fri, 12 Nov 2010 15:57:07 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2010/11/12/wmi-query-to-win32_product-returns-error-0x80041010/</guid><description>&lt;p&gt;I ran a VBScript that queries the Win32_Product WMI class on Windows 2003 but it returned error 0x80041010 instead of the expected results.&lt;/p&gt;
&lt;p&gt;I looked up that errorcode and it means WBEM_E_INVALID_CLASS. This happened because the &amp;ldquo;WMI Windows Installer Provider&amp;rdquo; was not installed.&lt;/p&gt;</description></item><item><title>Removing Single Sign on Node from the Delivery Services Console</title><link>https://remkoweijnen.nl/blog/2010/11/12/removing-single-sign-on-node-from-the-delivery-services-console/</link><pubDate>Fri, 12 Nov 2010 15:51:53 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2010/11/12/removing-single-sign-on-node-from-the-delivery-services-console/</guid><description>&lt;p&gt;When installing the Citrix Delivery Services Console with an unattended install (using CtxInstall.exe) the Citrix Password Manager gets automatically installed as well.&lt;/p&gt;
&lt;p&gt;You can see this in the Console where you will get an additional node called "Single Sign On".&lt;/p&gt;</description></item><item><title>The case of the missing XenApp Node in the Delivery Services Console</title><link>https://remkoweijnen.nl/blog/2010/11/12/the-case-of-the-missing-xenapp-node-in-the-delivery-services-console/</link><pubDate>Fri, 12 Nov 2010 12:37:44 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2010/11/12/the-case-of-the-missing-xenapp-node-in-the-delivery-services-console/</guid><description>&lt;p&gt;After having successfully tested the Unattended install jobs for my Citrix XenApp 5 environment I went on to testing the install.&lt;/p&gt;
&lt;p&gt;The install itsself and the msi logs that my jobs created all indicated that the install was successfull.&lt;/p&gt;
&lt;p&gt;So I went on and launched the install jop for the Delivery Services Console. This job succeeded nicely but when I opened the console the XenApp node was missing:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2010/11/xenapp.webp" class="glightbox" data-type="image" data-gallery="post-759"&gt;&lt;img loading="lazy" decoding="async" src="https://remkoweijnen.nl/blog/wp-content/uploads/2010/11/xenapp-small.webp" alt="XenApp" width="430" height="172" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The resolution is described in &lt;a title="Presentation Server or XenApp Nodes are Missing in the Access Management Console or Delivery Services Console" href="http://support.citrix.com/article/CTX125827" target="_blank"&gt;CTX125827&lt;/a&gt; but Resolution 2 is a lot of manual labour :-(&lt;/p&gt;
&lt;p&gt;So what do we do? We script it!&lt;/p&gt;</description></item><item><title>Programmatically Changing the Driver Signing options</title><link>https://remkoweijnen.nl/blog/2010/11/11/programmatically-changing-the-driver-signing-options/</link><pubDate>Thu, 11 Nov 2010 09:57:17 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2010/11/11/programmatically-changing-the-driver-signing-options/</guid><description>&lt;p&gt;Today I was tested my unattended Citrix installation (XenApp 5 on Windows 2003) and I noticed that the install was taking longer than expected.&lt;/p&gt;
&lt;p&gt;This was because of a popup:&lt;/p&gt;
&lt;img loading="lazy" decoding="async" src="https://remkoweijnen.nl/blog/wp-content/uploads/2010/11/driversigning-1.webp" alt="DriverSigning" width="411" height="335" /&gt;
&lt;p&gt;I am not sure if this popup is shown because I ran MsiExec with /Qb- (I usually do that when testing) but if the Popup is not shown it means that at least the installation of this driver (probably Citrix Universal Print driver) fails.&lt;/p&gt;
&lt;p&gt;So this means I needed to script turning off Driver Signature Warnings. A quick search led me to kb article &lt;a title="Driver signing registry values cannot be modified directly in Windows" href="http://support.microsoft.com/kb/298503" target="_blank"&gt;kb298503&lt;/a&gt; which is titled &amp;ldquo;&lt;em&gt;Driver signing registry values cannot be modified directly in Windows&lt;/em&gt;&amp;rdquo;. As you may guess that title drew my attention.&lt;/p&gt;</description></item><item><title>The case of the failing Exchange 2007 Install</title><link>https://remkoweijnen.nl/blog/2010/11/08/the-case-of-the-failing-exchange-2007-install/</link><pubDate>Mon, 08 Nov 2010 20:56:24 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2010/11/08/the-case-of-the-failing-exchange-2007-install/</guid><description>&lt;p&gt;I was creating an unattended Exchange 2007 install job today and while testing it, it failed with the following error:&lt;/p&gt;
&lt;blockquote&gt;Active Directory operation failed on nl-dc001.MYDOMAIN.LAN. The object 'CN=Default Global Address List,CN=All Global Address Lists,CN=Address Lists Container,CN=My Organisation,CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=MYDOMAIN,DC=LOCAL' already exists&lt;/blockquote&gt;
I opened the Exchange System Manager and expanded the Tree (Recipient | All Address Lists | All Global Address Lists) and I found 2 Global Address Lists but not the Default Global Address List:
&lt;img loading="lazy" decoding="async" src="https://remkoweijnen.nl/blog/wp-content/uploads/2010/11/gal2.webp" alt="GAL2" width="268" height="308" /&gt;</description></item><item><title>Performance Best Practices for VMware vSphere 4.1</title><link>https://remkoweijnen.nl/blog/2010/11/04/performance-best-practices-for-vmware-vsphere-4-1/</link><pubDate>Thu, 04 Nov 2010 22:33:10 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2010/11/04/performance-best-practices-for-vmware-vsphere-4-1/</guid><description>&lt;p&gt;VMware has released an updated Performance Best Practices for VMware vSphere document for 4.1.&lt;/p&gt;
&lt;p&gt;The document provides tips that help administrators maximize the performance of VMware vSphere 4.1.&lt;/p&gt;
&lt;p&gt;Chapter 1 - “Hardware for Use with VMware vSphere,” provides guidance on selecting hardware for use with vSphere.&lt;/p&gt;</description></item><item><title>Programmatically Create Aligned Partitions</title><link>https://remkoweijnen.nl/blog/2010/11/04/programmatically-create-aligned-partitions/</link><pubDate>Thu, 04 Nov 2010 18:14:56 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2010/11/04/programmatically-create-aligned-partitions/</guid><description>&lt;p&gt;After deploying Virtual Machines from a template and adding disks the next Task was to create and format the partitions.&lt;/p&gt;
&lt;p&gt;In a VMWare environment it is very important to assure that the partitions are aligned. VMWare has a nice document that explains the details called &lt;a title="Performance Best Practices for VMware vSphere 4.0" href="http://www.vmware.com/pdf/Perf_Best_Practices_vSphere4.0.pdf" target="_blank"&gt;Performance Best Practices for VMware vSphere 4.0&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Basically the recommendation is to align partition on a 64 KB boundary, not only for VMWare itsself but also for the guests.&lt;/p&gt;
&lt;p&gt;Of course we could do this manually but I wanted to run this task of from my Deployment Server to automate the following:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;
&lt;div&gt;Create aligned partitions on all extra disks of the maximum size&lt;/div&gt;&lt;/li&gt;
	&lt;li&gt;
&lt;div&gt;Format, assign drive letter and assign a label&lt;/div&gt;&lt;/li&gt;
	&lt;li&gt;
&lt;div&gt;A safeguard to prevent overwriting existing Data&lt;/div&gt;&lt;/li&gt;
&lt;/ul&gt;
Well enough talk let's go the scripts! They are written as bat files that can be executed directly in Altiris as an embedded script but of course you don't need Altiris to use them.</description></item><item><title>Activate Multiple Altiris Licenses at Once</title><link>https://remkoweijnen.nl/blog/2010/11/04/activate-multiple-altiris-licenses-at-once/</link><pubDate>Thu, 04 Nov 2010 10:26:39 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2010/11/04/activate-multiple-altiris-licenses-at-once/</guid><description>&lt;p&gt;I have had to activate Altiris Licenses a lot in the past and this is a task that could be done in a few minutes however in the case of using the HP branded version (HP Insight Server control, previously named HP Rapid Deployment Pack) it&amp;rsquo;s not.&lt;/p&gt;
&lt;p&gt;This is because HP delivers a seperate license for each server which you have to load manually. An annoying thing if you have a lot of them.&lt;/p&gt;
&lt;p&gt;I was already looking if I could automate this with some kind of script since I know from the past that the Product Licensing Utility embeds the license into the Express.exe file.&lt;/p&gt;</description></item><item><title>VM not joined to Domain after Deploying from Template</title><link>https://remkoweijnen.nl/blog/2010/11/03/vm-not-joined-to-domain-after-deploying-from-template/</link><pubDate>Wed, 03 Nov 2010 16:50:01 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2010/11/03/vm-not-joined-to-domain-after-deploying-from-template/</guid><description>&lt;p&gt;As I wrote earlier today I am provisioning Virtual Machines with PowerCLI. I don&amp;rsquo;t know if this is intentional behaviour but after Deploying (Cloning) a Virtual Machine from a template the Network Adapter is not automatically connected at power on.&lt;/p&gt;</description></item><item><title>Cannot complete customization when cloning from Template</title><link>https://remkoweijnen.nl/blog/2010/11/03/cannot-complete-customization-when-cloning-from-template/</link><pubDate>Wed, 03 Nov 2010 11:24:32 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2010/11/03/cannot-complete-customization-when-cloning-from-template/</guid><description>&lt;p&gt;I am currently provisioning a lot of Virtual Machines in VMWare vSphere 4.1. Because I had already sized the Virtual Machines I am doing this from &lt;a title="VMWare vSphere PowerCLI" href="http://communities.vmware.com/community/vmtn/vsphere/automationtools/powercli" target="_blank"&gt;PowerCLI&lt;/a&gt; based on my Excel Sheet.&lt;/p&gt;
&lt;p&gt;I will probably blog later about the details of how I am doing this in PowerCLI (would you be interested in that?) but after successfully deploying some Windows 2008 VM&amp;rsquo;s I got this error in PowerShell:&lt;/p&gt;
&lt;blockquote&gt;New-VM : 3-11-2010 10:00:50 New-VM The operation for the entity VirtualMachine-vm-150 failed with the following message: "Cannot complete customization."
&lt;p&gt;At C:\Users\Administrator\Documents\NewVm.ps1:64 char:14&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;$VM = New-VM &amp;lt;&amp;lt;&amp;lt;&amp;lt; -Name $Name -VMHost $VMHost -Template $Template -OSCustomizationSpec $Spec -DiskStorageFormat $DiskFormat -Datastore $LargestDataStore&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;CategoryInfo : NotSpecified: (:) [New-VM], CustomizationFault&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;FullyQualifiedErrorId : Client20_TaskServiceImpl_CheckServerSideTaskUpdates_OperationFailed,VMware.VimAutomation.ViCore.Cmdlets.Commands.NewVM&lt;/blockquote&gt;&lt;br&gt;
In the vCenter console the following error was logged:&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;blockquote&gt;Cannot deploy template: Cannot complete customization.&lt;/blockquote&gt;</description></item><item><title>The case of the VMware vSphere Client</title><link>https://remkoweijnen.nl/blog/2010/10/27/the-case-of-the-vmware-vsphere-client/</link><pubDate>Wed, 27 Oct 2010 21:59:32 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2010/10/27/the-case-of-the-vmware-vsphere-client/</guid><description>&lt;p&gt;Today I connected with my laptop to VMWare Virtual Center using vSphere client. Because I had an older version of the client I needed to update and the installer failed with this message:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2010/10/visualjinstall.webp" class="glightbox" data-type="image" data-gallery="post-711"&gt;&lt;img loading="lazy" decoding="async" src="https://remkoweijnen.nl/blog/wp-content/uploads/2010/10/visualjinstall-small5.webp" alt="The Microsoft Visual J# 2.0 Second Edition installer returned the error code '4113'" width="430" height="157" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I remembered this error from the last install of this client (about a year ago), it happens because Microsoft Visual J# was already installed (in my case it was previously installed by Embarcadero&amp;rsquo;s Rad Studio).&lt;/p&gt;
&lt;p&gt;Last year I &amp;ldquo;fixed&amp;rdquo; it by modifying the msi file but I remembered that Assarbad posted an easier solution on his &lt;a title="VMware vSphere client 4.1 installation woes" href="http://blog.assarbad.net/20100808/vmware-vsphere-client-4-1-installation-woes/" target="_blank"&gt;Blog&lt;/a&gt; a while ago.&lt;/p&gt;
&lt;p&gt;His solution was to set a public property in the MSI (USING_VIM_INSTALLER) but it means we need to unpack the installer exe first to obtain the MSI file.&lt;/p&gt;</description></item><item><title>The case of the failing Deployment Server Install</title><link>https://remkoweijnen.nl/blog/2010/10/26/694/</link><pubDate>Tue, 26 Oct 2010 16:47:15 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2010/10/26/694/</guid><description>&lt;p&gt;I was trying to install HP Insight Control server deployment (&lt;a href="https://remkoweijnen.nl/blog/2010/10/14/where-to-download-hp-rapid-deployment-pack/" target="_blank"&gt;previously called HP Rapid Deployment Pack&lt;/a&gt;) on Sql Server 2008 Express. I will just call it Deployment Server or DS from here.&lt;/p&gt;
&lt;p&gt;I first installed SQL 2008 Express with Advanced Services and configured it to listen op Port 1433 as required by DS.&lt;/p&gt;
&lt;p&gt;The installation of the first part (Deployment Server version 6.9.4) indicated a successfull install but the prereqisuites check of the Hotfix version 2.0 installer failed on the last step:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2010/10/NoAttachedConsoles.webp" class="glightbox" data-type="image" data-gallery="post-694"&gt;&lt;img loading="lazy" decoding="async" src="https://remkoweijnen.nl/blog/wp-content/uploads/2010/10/NoAttachedConsoles-small.webp" alt="No Attached Consoles HP Deployment Server" width="430" height="300" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This was strange because I didn&amp;rsquo;t yet startup the console, so I decided to start it and close it as this would perhaps allow me to continue.&lt;/p&gt;
&lt;p&gt;The next screen was a clear indication something went wrong:&lt;/p&gt;
&lt;img loading="lazy" decoding="async" src="https://remkoweijnen.nl/blog/wp-content/uploads/2010/10/ConsoleUnableToConnect.webp" alt="Altiris Deploymeny Server Unable to Connect" width="405" height="238" /&gt;
&lt;p&gt;I presumed that the ODBC connection was missing so I went to Adminstrative Tools | Data Sources (ODBC). But the ODBC connection was present. I then fired up SQL Server Management Studio which showed me the eXpress database was missing.&lt;/p&gt;</description></item><item><title>Automatically Accept Shadow Request</title><link>https://remkoweijnen.nl/blog/2010/10/22/automatically-accept-shadow-request/</link><pubDate>Fri, 22 Oct 2010 17:04:00 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2010/10/22/automatically-accept-shadow-request/</guid><description>&lt;p&gt;When you request Shadow (Remote Control) of a Remote Desktop (Terminal Server) or Citrix session the user gets a Dialog where he can Accept or Deny the Shadow Request.&lt;/p&gt;
&lt;p&gt;It looks something like this:&lt;/p&gt;
&lt;img loading="lazy" decoding="async" src="https://remkoweijnen.nl/blog/wp-content/uploads/2010/10/shadowrequest.webp" alt="ShadowRequest" width="396" height="152" /&gt;
&lt;p&gt;It&amp;rsquo;s possible to change the default settings and remove the need for this permission but I think this is a bad idea since it violates the user&amp;rsquo;s privacy.&lt;/p&gt;
&lt;p&gt;But sometimes it would be convenient to automatically accept, for instance for when a user is away or when you want to shadow a session that is &amp;ldquo;yours&amp;rdquo; but runs under another account.&lt;/p&gt;
&lt;p&gt;I wrote a tool to do just that :D&lt;/p&gt;</description></item><item><title>Change Driveletter Commandline Tool</title><link>https://remkoweijnen.nl/blog/2010/10/20/change-driveletter-commandline-tool/</link><pubDate>Wed, 20 Oct 2010 14:04:35 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2010/10/20/change-driveletter-commandline-tool/</guid><description>&lt;p&gt;Some time ago (2008 actually) I wrote a &lt;a href="https://remkoweijnen.nl/blog/2008/12/09/commandline-tool-to-change-drive-letter-assignment/" target="_blank"&gt;tool that can assign driveletters&lt;/a&gt; given a volumename. I use it myself after SysPrep operations to assign the desired drive letters. For instance after cloning a Virtual Machine from a template.&lt;/p&gt;
&lt;p&gt;I noticed that I updated this tool sometime after the original post but never uploaded it here. The most important changes are:&lt;/p&gt;</description></item><item><title>Error while creating large Datastore on VMWare vSphere 4.1</title><link>https://remkoweijnen.nl/blog/2010/10/18/error-while-creating-large-datastore-on-vmware-vsphere-4-1/</link><pubDate>Mon, 18 Oct 2010 16:12:43 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2010/10/18/error-while-creating-large-datastore-on-vmware-vsphere-4-1/</guid><description>&lt;p&gt;I was trying to create a (very) large Datastore on VMWare vSphere 4.1 but although VMWare correctly identifies the LUN on my SAN it refuses to create the Datastore and gives me this error:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2010/10/createdatastoreerror1.webp" class="glightbox" data-type="image" data-gallery="post-669"&gt;&lt;img loading="lazy" decoding="async" src="https://remkoweijnen.nl/blog/wp-content/uploads/2010/10/createdatastoreerror1-small.webp" alt="Call HostDatastoreSystem.QueryVmfsDatastoreCreateOptions for object ha-datastoresystem on ESX failed." width="430" height="227" /&gt;&lt;/a&gt;&lt;br&gt;
The complete error text is&lt;/p&gt;
&lt;blockquote&gt;Call "HostDatastoreSystem.QueryVmfsDatastoreCreateOptions" for object "ha-datastoresystem" on ESX "&amp;lt;IP of ESX&amp;gt;" failed.&lt;/blockquote&gt;</description></item><item><title>Default username password HP 8/20q FC San Switch</title><link>https://remkoweijnen.nl/blog/2010/10/18/default-username-password-hp-820q-fc-san-switch/</link><pubDate>Mon, 18 Oct 2010 10:18:08 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2010/10/18/default-username-password-hp-820q-fc-san-switch/</guid><description>&lt;p&gt;Again a note that is mainly for myself since I tend to forget these kind of things and always spend much time to look it up...&lt;/p&gt;
&lt;p&gt;Default settings for the HP 8/20q FC SAN Switch are:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;username: admin&lt;br /&gt;
password: password&lt;br /&gt;
default ip: 10.0.0.1&lt;/p&gt;</description></item><item><title>Slow power on and storage operations with HP Smart Array P410i controller on VMWare vSphere 4.0</title><link>https://remkoweijnen.nl/blog/2010/10/16/slow-power-on-and-storage-operations-with-hp-smart-array-p410i-controller-on-vmware-vsphere-4-0/</link><pubDate>Sat, 16 Oct 2010 11:00:00 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2010/10/16/slow-power-on-and-storage-operations-with-hp-smart-array-p410i-controller-on-vmware-vsphere-4-0/</guid><description>&lt;p&gt;As you may have read I am currently implementing VMWare vSphere 4 on several HP Proliant DL380 G7 machines.&lt;/p&gt;
&lt;p&gt;I ran across an interesting &lt;a href="http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&amp;amp;cmd=displayKC&amp;amp;externalId=1018794" target="_blank"&gt;knowledge base article&lt;/a&gt; from VMWare that describes a possible issue that is summarized as "&lt;em&gt;Power on and storage operations are slow with the HP Smart Array P410i controller&lt;/em&gt;".&lt;/p&gt;</description></item><item><title>HP Simple SAN Connection Manager (SSCM)</title><link>https://remkoweijnen.nl/blog/2010/10/14/hp-simple-san-connection-manager-sccm/</link><pubDate>Thu, 14 Oct 2010 14:42:50 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2010/10/14/hp-simple-san-connection-manager-sccm/</guid><description>&lt;p&gt;If you are looking for the HP Simple SAN Connection Manager Software (aka HP SSCM) then you&amp;rsquo;ve come to the right place. HP seems to be really good at hiding their software on the web but I found it.&lt;/p&gt;
&lt;p&gt;Go to &lt;a href="http://www.software.hp.com/kiosk" target="_blank"&gt;&lt;a href="http://www.software.hp.com/kiosk"&gt;http://www.software.hp.com/kiosk&lt;/a&gt;&lt;/a&gt; and user the following credentials to access:&lt;/p&gt;</description></item><item><title>Default username password HP Storageworks P2000</title><link>https://remkoweijnen.nl/blog/2010/10/14/default-username-password-hp-storageworks-p2000/</link><pubDate>Thu, 14 Oct 2010 14:38:02 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2010/10/14/default-username-password-hp-storageworks-p2000/</guid><description>&lt;p&gt;Just a reminder to Self for future reference, the default credentials for HP Storageworks P2000 (G3) are:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;blockquote&gt;username: manage&lt;br /&gt;
password: !manage&lt;/blockquote&gt;
&lt;section class="comments"&gt;
&lt;h2&gt;14 Comments&lt;/h2&gt;
&lt;ol class="comment-list"&gt;
&lt;li class="comment depth-0"&gt;&lt;div class="comment-meta"&gt;&lt;span class="comment-author"&gt;Thx&lt;/span&gt; &lt;time datetime="2010-11-05"&gt;Nov 5, 2010&lt;/time&gt;&lt;/div&gt;&lt;div class="comment-body"&gt;&lt;p&gt;100% THX!&lt;/p&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class="comment depth-0"&gt;&lt;div class="comment-meta"&gt;&lt;span class="comment-author"&gt;&lt;a href="https://remkoweijnen.nl/blog/" rel="nofollow ugc"&gt;Remko&lt;/a&gt;&lt;/span&gt; &lt;time datetime="2010-11-05"&gt;Nov 5, 2010&lt;/time&gt;&lt;/div&gt;&lt;div class="comment-body"&gt;&lt;p&gt;You're welcome and thanks for your comment!&lt;/p&gt;</description></item><item><title>Where to download HP Rapid Deployment Pack</title><link>https://remkoweijnen.nl/blog/2010/10/14/where-to-download-hp-rapid-deployment-pack/</link><pubDate>Thu, 14 Oct 2010 11:11:24 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2010/10/14/where-to-download-hp-rapid-deployment-pack/</guid><description>&lt;p&gt;I have started the implementation of a VMWare vShphere environment in which we are going to use an Altiris server for Deployment. Since we are using HP Hardware I needed the HP Branded version of Altiris (it&amp;rsquo;s called HP Rapid Deployment Pack aka HP RDP).&lt;/p&gt;
&lt;p&gt;I had some troubles finding the download spot for it, that&amp;rsquo;s why I am sharing it here. Hopefully it will save others from a long search!&lt;/p&gt;
&lt;p&gt;Last time I needed HP RDP I just went to the HP website, clicked Support &amp;amp; Drivers then selected Download drivers and software and in the Editbox entered &amp;ldquo;HP Rapid Deployment Pack&amp;rdquo; which leads to this page:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2010/10/hprdp1.webp" class="glightbox" data-type="image" data-gallery="post-655"&gt;&lt;img loading="lazy" decoding="async" src="https://remkoweijnen.nl/blog/wp-content/uploads/2010/10/hprdp1-small.webp" alt="HPRDP1" width="430" height="233" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;So where do we download it then?&lt;/p&gt;</description></item><item><title>silly issue with DHCP reservation on Netgear WNDR3700 router</title><link>https://remkoweijnen.nl/blog/2010/09/23/silly-issue-with-dhcp-reservation-on-netgear-wndr3700-router/</link><pubDate>Thu, 23 Sep 2010 16:32:44 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2010/09/23/silly-issue-with-dhcp-reservation-on-netgear-wndr3700-router/</guid><description>&lt;p&gt;I recently bought a new router, a Netgear WNDR3700 and I noticed a silly bug. When you make a DHCP reservation in the webinterface it will present a list of existing clients which makes it easy to add them to the reservation list.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2010/09/netgearaddaddress.webp" class="glightbox" data-type="image" data-gallery="post-642"&gt;&lt;img loading="lazy" decoding="async" src="https://remkoweijnen.nl/blog/wp-content/uploads/2010/09/netgearaddaddress-small.webp" alt="NetGearAddAddress" width="430" height="285" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This seems to work fine at first but when I checked my IP with IPConfig I noticed that I received a different address. I checked the router&amp;rsquo;s log and saw this:&lt;/p&gt;
&lt;blockquote&gt;[DHCP IP: 192.168.2.29] to MAC address 00:21:5c:9a:a0:99, Thursday, September 23,2010 14:03:59&lt;/blockquote&gt;
I noticed that the MAC address was lowercase here and not uppercase as in the webinterface. I changed the case in the webinterface and then it worked fine!</description></item><item><title>SasLibEx 2.0 Release Announcement</title><link>https://remkoweijnen.nl/blog/2010/09/15/saslibex-2-0-release-announcement/</link><pubDate>Wed, 15 Sep 2010 14:34:08 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2010/09/15/saslibex-2-0-release-announcement/</guid><description>&lt;p&gt;Today I can proudly announce the official release of SasLibEx 2.0 which will bring support for new compilers, a native x64 version and some exciting new features!&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;span style="text-decoration: underline;"&gt;New Compilers:&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;SasLibEx 2.0 introduces support for Visual Studio 2010 (C++), RAD Studio 2010 (Delphi and C++ personalities) and the new RAD Studio XE (Delphi and C++).&lt;/p&gt;</description></item><item><title>Certified</title><link>https://remkoweijnen.nl/blog/2010/09/13/certified/</link><pubDate>Mon, 13 Sep 2010 18:56:53 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2010/09/13/certified/</guid><description>&lt;p&gt;Just a quicky, I am little excited because my certifications are going well.&lt;/p&gt;
&lt;p&gt;Last month I passed the final exam for &lt;a href="http://www.microsoft.com/learning/en/us/certification/mcitp.aspx#tab2"&gt;MCITP Enterprise Administrator&lt;/a&gt; and a few minutes agoI got a mail from Citrix confirming that I passed the beta exam for XenApp 6 which means I am certified (&lt;a href="http://www.citrixtraining.com/courses/course_view.cfm/course_id:295/cgroup_id:26"&gt;CCA for XenApp 6&lt;/a&gt;).&lt;/p&gt;</description></item><item><title>Active Directory Properties Commandline Tool</title><link>https://remkoweijnen.nl/blog/2010/09/12/active-directory-properties-commandline-tool/</link><pubDate>Sun, 12 Sep 2010 21:56:01 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2010/09/12/active-directory-properties-commandline-tool/</guid><description>&lt;p&gt;I have written a small commandline tool that shows the Active Directory Property Sheet for a given account.&lt;/p&gt;
&lt;p&gt;The Property sheet is what you get when you doubleclick an object in Active Directory &amp;amp; Computers. Basically this tool is meant to make it easy to quickly view or change properties without needing to start a GUI tool and looking up the account in the AD Tree.&lt;/p&gt;</description></item><item><title>Compatibility Issue with RAD Studio XE</title><link>https://remkoweijnen.nl/blog/2010/09/02/compatibility-issue-with-rad-studio-xe/</link><pubDate>Thu, 02 Sep 2010 19:50:42 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2010/09/02/compatibility-issue-with-rad-studio-xe/</guid><description>&lt;p&gt;After launching the newly installed RAD Studio XE for the first time it tried to install something. This failed because I didn't run it elevated which makes Windows 7 fire the Program Compatibility Assistant:&lt;/p&gt;
&lt;p&gt;&lt;img loading="lazy" decoding="async" alt="RadStudioXECompat" src="https://remkoweijnen.nl/blog/wp-content/uploads/2010/09/radstudioxecompat.webp" width="409" height="342" /&gt;&lt;/p&gt;
&lt;p&gt;It would be better for Embarcadero to detect if we run elevated and only run the installer when we are (or request elevation).&lt;/p&gt;</description></item><item><title>RAD Studio XE destroys RAD Studio 2010?</title><link>https://remkoweijnen.nl/blog/2010/09/02/rad-studio-xe-destroys-rad-studio-2010/</link><pubDate>Thu, 02 Sep 2010 19:46:08 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2010/09/02/rad-studio-xe-destroys-rad-studio-2010/</guid><description>&lt;p&gt;Just noticed this is my Start Menu after installing RAD Studio XE:&lt;/p&gt;
&lt;p align="center"&gt;&lt;img loading="lazy" decoding="async" alt="DelphiXEStartMenu" src="https://remkoweijnen.nl/blog/wp-content/uploads/2010/09/delphixestartmenu.webp" width="425" height="474" /&gt;&lt;/p&gt;
&lt;p&gt;Luckily Clicking Delphi XE launches 2010...&lt;/p&gt;
&lt;section class="comments"&gt;
&lt;h2&gt;2 Comments&lt;/h2&gt;
&lt;ol class="comment-list"&gt;
&lt;li class="comment depth-0"&gt;&lt;div class="comment-meta"&gt;&lt;span class="comment-author"&gt;Chris&lt;/span&gt; &lt;time datetime="2010-09-10"&gt;Sep 10, 2010&lt;/time&gt;&lt;/div&gt;&lt;div class="comment-body"&gt;&lt;p&gt;It seems harsh to state it 'destroys" RAD Studio 2010 when a shortcut label changes, but points to the right place.&lt;/p&gt;</description></item><item><title>Rad Studio XE has been released</title><link>https://remkoweijnen.nl/blog/2010/08/30/rad-studio-xe-has-been-released/</link><pubDate>Mon, 30 Aug 2010 22:15:04 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2010/08/30/rad-studio-xe-has-been-released/</guid><description>&lt;p&gt;RAD Studio XE has (just?) been released, see &lt;a href="http://www.embarcadero.com/rad-studio-xe-preview"&gt;http://www.embarcadero.com/rad-studio-xe-preview&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Detecting a Citrix Published Application</title><link>https://remkoweijnen.nl/blog/2010/07/05/detecting-a-citrix-published-application/</link><pubDate>Mon, 05 Jul 2010 21:48:28 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2010/07/05/detecting-a-citrix-published-application/</guid><description>&lt;p&gt;While browsing through my old projects folder I found a little commandline tool that I wrote about a year ago. I needed to detect a certain published application on a Citrix environment in the loginscript.&lt;/p&gt;
&lt;p&gt;The tool detect the current Citrix published applicationname or if you are running Terminal Server aka Remote Desktop Services the Initial Program name and stores this in an environment variable (APPNAME).&lt;/p&gt;</description></item><item><title>Rating and contact options</title><link>https://remkoweijnen.nl/blog/2010/06/29/rating-and-contact-options/</link><pubDate>Tue, 29 Jun 2010 13:49:09 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2010/06/29/rating-and-contact-options/</guid><description>&lt;p&gt;I have installed a new rating plugin that gives you, my readers, a convenient and fast method to give feedback. So please do so, let me know what posts you find interesting!&lt;/p&gt;
&lt;p&gt;I have also added a &lt;a href="https://remkoweijnen.nl/blog/contact/"&gt;Contact&lt;/a&gt; form in case you have any questions, article suggestions or maybe even consultation requests. The contact page is an attempt to streamline the e-mails I get from this blog so I hope this will work :-)&lt;/p&gt;</description></item><item><title>Fun with asm</title><link>https://remkoweijnen.nl/blog/2010/06/18/fun-with-asm/</link><pubDate>Fri, 18 Jun 2010 12:02:00 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2010/06/18/fun-with-asm/</guid><description>&lt;p&gt;Today just some fun stuff with ASM, probably not the most recommended way to do things but for sure the most geeky way :P&lt;/p&gt;
&lt;p&gt;Get the Current Session Id:&lt;/p&gt;
&lt;div class="codecard"&gt;
 &lt;div class="codehead"&gt;
 &lt;span class="codefile"&gt;&lt;/span&gt;
 &lt;span class="codetools" data-pagefind-ignore&gt;
 &lt;span class="codelang"&gt;objectpascal&lt;/span&gt;
 &lt;button class="codebtn" type="button" data-copy&gt;Copy&lt;/button&gt;
 &lt;a class="codebtn" download=".pas" href="data:text/plain;charset=utf-8;base64,ZnVuY3Rpb24gR2V0Q3VycmVudFNlc3Npb25JZDogRFdPUkQ7CmFzbQogIG1vdiAgICAgZWF4LGZzOlskMDAwMDAwMThdOyAgIC8vIEdldCBURUIKICBtb3YgICAgIGVheCxbZWF4KyQzMF07ICAgICAgICAvLyBQUEVCCiAgbW92ICAgICBlYXgsW2VheCskMWQ0XTsgICAgICAgLy8gUEVCLlNlc3Npb25JZAplbmQ7"&gt;Download&lt;/a&gt;
 &lt;/span&gt;
 &lt;/div&gt;
 &lt;div class="codebody"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-objectpascal" data-lang="objectpascal"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="kr"&gt;function&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;GetCurrentSessionId&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;DWORD&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="kr"&gt;asm&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;mov&lt;span class="w"&gt; &lt;/span&gt;eax&lt;span class="p"&gt;,&lt;/span&gt;fs&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mh"&gt;$00000018&lt;/span&gt;&lt;span class="p"&gt;];&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="c1"&gt;// Get TEB&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;mov&lt;span class="w"&gt; &lt;/span&gt;eax&lt;span class="p"&gt;,[&lt;/span&gt;eax&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="mh"&gt;$30&lt;/span&gt;&lt;span class="p"&gt;];&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="c1"&gt;// PPEB&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;mov&lt;span class="w"&gt; &lt;/span&gt;eax&lt;span class="p"&gt;,[&lt;/span&gt;eax&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="mh"&gt;$1d4&lt;/span&gt;&lt;span class="p"&gt;];&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="c1"&gt;// PEB.SessionId&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="kr"&gt;end&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Get the Current Console Session Id:&lt;/p&gt;</description></item><item><title>Obtain Fully Qualified Domain Name from Netbios Domain Name</title><link>https://remkoweijnen.nl/blog/2010/06/17/obtain-fully-qualified-domain-name-from-netbios-domain-name/</link><pubDate>Thu, 17 Jun 2010 14:34:42 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2010/06/17/obtain-fully-qualified-domain-name-from-netbios-domain-name/</guid><description>&lt;p&gt;I needed to obtain the Fully Qualified Domain Name (FQDN) for a given NetBios domain name. Eg from MYDOMAIN to dc=mydomain,dc=local.&lt;/p&gt;
&lt;p&gt;I did some tests with the &lt;a href="http://msdn.microsoft.com/en-us/library/ms725484%28VS.85%29.aspx" target="_blank"&gt;TranslateName&lt;/a&gt; API and if you append a \ to the domain name it returns the FQDN.&lt;/p&gt;
&lt;p&gt;Here is a short example:&lt;/p&gt;</description></item><item><title>Having fun with Windows Licensing</title><link>https://remkoweijnen.nl/blog/2010/06/15/having-fun-with-windows-licensing/</link><pubDate>Tue, 15 Jun 2010 15:09:14 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2010/06/15/having-fun-with-windows-licensing/</guid><description>&lt;p&gt;If you look into the registry in the key HKLM\System\CurrentControlSet\ProductOptions you will find several licensing related Values.&lt;/p&gt;
&lt;p&gt;The ProductType and ProductSuite keys contain the OS Suite and Edition, but the ProductPolicy key is much more interesting. So let&amp;rsquo;s have a closer look at it, open RegEdit and DoubleClick the key, you will something like the screenshot below, a Binary Value:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2010/06/productpolicy1-1.webp" class="glightbox" data-type="image" data-gallery="post-588"&gt;&lt;img loading="lazy" decoding="async" src="https://remkoweijnen.nl/blog/wp-content/uploads/2010/06/productpolicy1-1-small.webp" alt="ProductPolicy1" width="215" height="188" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;As you can see the license names are there as a Unicode string and later on I will show you how we can read the values. But because I didn&amp;rsquo;t want to extract all the names manually I decided to see if I could reverse the used structure because it didn&amp;rsquo;t look very complicated. Using a Hex Editor I could determine the important part of the structure.&lt;/p&gt;</description></item><item><title>Memory Leaks when using the Virtual TreeView Component</title><link>https://remkoweijnen.nl/blog/2010/06/09/memory-leaks-when-using-virtual-treeview-component/</link><pubDate>Wed, 09 Jun 2010 09:50:49 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2010/06/09/memory-leaks-when-using-virtual-treeview-component/</guid><description>&lt;p&gt;Again a about post about using the &lt;a href="http://www.soft-gems.net/index.php?option=com_content&amp;amp;task=view&amp;amp;id=12&amp;amp;Itemid=33" target="_blank"&gt;Virtual TreeView component&lt;/a&gt; (did I mention it&amp;rsquo;s brilliant?), this time I will talk about memory leaks.&lt;/p&gt;
&lt;p&gt;I often use Records to hold the treedata, and usually the record holds some string data (eg a caption) and an (a reference to) an Interface or Object(List) that holds more data.&lt;/p&gt;
&lt;p&gt;If you are familiar with Virtual Tree then you know that you must can the NodeData in the OnFreeNode event.&lt;/p&gt;</description></item><item><title>Setting ChildCount in a Virtual Tree</title><link>https://remkoweijnen.nl/blog/2010/06/08/setting-childcount-in-a-virtual-tree/</link><pubDate>Tue, 08 Jun 2010 17:39:57 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2010/06/08/setting-childcount-in-a-virtual-tree/</guid><description>&lt;p&gt;When working with the &lt;a href="http://www.soft-gems.net/index.php?option=com_content&amp;amp;task=view&amp;amp;id=12&amp;amp;Itemid=33" target="_blank"&gt;Virtual TreeView component&lt;/a&gt; the most optimized way of adding (or removing child nodes is by changing the ChildCount.&lt;/p&gt;
&lt;p&gt;I often make the mistake of change the ChildCount of a Node using:&lt;/p&gt;
&lt;div class="codecard"&gt;
 &lt;div class="codehead"&gt;
 &lt;span class="codefile"&gt;&lt;/span&gt;
 &lt;span class="codetools" data-pagefind-ignore&gt;
 &lt;span class="codelang"&gt;objectpascal&lt;/span&gt;
 &lt;button class="codebtn" type="button" data-copy&gt;Copy&lt;/button&gt;
 &lt;a class="codebtn" download=".pas" href="data:text/plain;charset=utf-8;base64,Tm9kZV4uQ2hpbGRDb3VudCA6PSBDb3VudDs="&gt;Download&lt;/a&gt;
 &lt;/span&gt;
 &lt;/div&gt;
 &lt;div class="codebody"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-objectpascal" data-lang="objectpascal"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;Node&lt;span class="o"&gt;^&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;ChildCount&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;:=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;Count&lt;span class="p"&gt;;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;If you look into the source you will see why this will not work, the proper way is:&lt;/p&gt;</description></item><item><title>Random Active Directory Notes #4</title><link>https://remkoweijnen.nl/blog/2010/03/30/random-active-directory-notes-4/</link><pubDate>Tue, 30 Mar 2010 15:04:51 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2010/03/30/random-active-directory-notes-4/</guid><description>&lt;p&gt;Previously I discussed IDirectoryObject, today I will show how to change a user&amp;rsquo;s password with IDirectoryObject.&lt;/p&gt;
&lt;p&gt;I didn&amp;rsquo;t find any documentation except a &lt;a href="http://support.microsoft.com/kb/269190" target="_self"&gt;kb article&lt;/a&gt; describing how to use pure ldap to do it. Of course I could have used IADsUser::SetPassword but I decided not to because of the following reasons:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;IADs interfaces are terribly slow (although for one use you probably wouldn't really notice).&lt;/li&gt;
	&lt;li&gt;IADsUser::SetPassword tries 3 different methods to set the password (ldap over ssl, kerberos and finally NetUserSetInfo) which makes it even slower (most domain controllers do not have an ssl certificate) and unpredictable.&lt;/li&gt;
&lt;/ul&gt;
All example code I found was .NET based using the .NET wrappers for Active Directory and seemed to be meant for use in Adam rather than full Active Directory (it set port number to 389 and password mode to cleartext).
&lt;p&gt;In the end it&amp;rsquo;s not very difficult but nonetheless it took me a while before I got it right.&lt;/p&gt;
&lt;p&gt;We can write to the unicodePwd attribute which wants the password as a double quoted unicode string. If you look at this attribute with AdsiEdit you&amp;rsquo;ll see that the type is Octet String and that it can be written only.&lt;/p&gt;
&lt;p&gt;I was tricked with Delphi&amp;rsquo;s QuotedStr function for a while because it doesn&amp;rsquo;t return a double but single quoted string ;-)&lt;/p&gt;
&lt;p&gt;Below a small snippet from the upcoming JwsclActiveDirectory that shows how to use it:&lt;/p&gt;</description></item><item><title>Using Windows Resource Strings</title><link>https://remkoweijnen.nl/blog/2010/03/28/using-windows-resource-strings/</link><pubDate>Sun, 28 Mar 2010 10:45:05 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2010/03/28/using-windows-resource-strings/</guid><description>&lt;p&gt;A few days ago I wrote about Using &lt;a href="https://remkoweijnen.nl/blog/2010/03/24/using-windows-dialogs-from-delphi/" target="_blank"&gt;Windows Dialogs&lt;/a&gt; in your own programs, wouldn&amp;rsquo;t it be nice to be able to use Windows Resource Strings for the same reasons?&lt;/p&gt;
&lt;p&gt;Loading a resource string is not difficult, let&amp;rsquo;s look at some examples:&lt;/p&gt;</description></item><item><title>Using Windows Dialogs from Delphi</title><link>https://remkoweijnen.nl/blog/2010/03/24/using-windows-dialogs-from-delphi/</link><pubDate>Wed, 24 Mar 2010 11:48:41 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2010/03/24/using-windows-dialogs-from-delphi/</guid><description>&lt;p&gt;Today I reused a unit I wrote a long time ago for TSAdminEx that shows Resource Dialogs from DLL&amp;rsquo;s or Executables. I wrote it for a couple of reasons:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Reusing existing dialogs is conventient since the user already knows it.&lt;/li&gt;
	&lt;li&gt;Windows takes care of translating it into the user's language.&lt;/li&gt;
	&lt;li&gt;I am too lazy to recreate them ;-)&lt;/li&gt;
&lt;/ul&gt;
The code is hardly rocket science and could probably be improved and made more sophisticated but it works for me. I decided to share it since you may find it usefull.
&lt;p&gt;Here is a small usage example that shows the Reset Password dialog from Active Directory Users &amp;amp; Computers. This dialog is in dsadmin.dll (on Windows Vista/7 you will find it in ds.admin.dll.mui in the language subfolder eg %systemroot%\system32\en-US but you can load it using just the dll name).&lt;/p&gt;
&lt;p&gt;It looks like this:&lt;/p&gt;
&lt;div class="codecard"&gt;
 &lt;div class="codehead"&gt;
 &lt;span class="codefile"&gt;&lt;/span&gt;
 &lt;span class="codetools" data-pagefind-ignore&gt;
 &lt;span class="codelang"&gt;c&lt;/span&gt;
 &lt;button class="codebtn" type="button" data-copy&gt;Copy&lt;/button&gt;
 &lt;a class="codebtn" download=".c" href="data:text/plain;charset=utf-8;base64,MjE1IERJQUxPR0VYIDAsIDAsIDI1MiwgMTM5ClNUWUxFIERTX01PREFMRlJBTUUgfCBEU19DT05URVhUSEVMUCB8IFdTX1BPUFVQIHwgV1NfQ0FQVElPTiB8IFdTX1NZU01FTlUKRVhTVFlMRSBXU19FWF9DT05URVhUSEVMUApDQVBUSU9OICJSZXNldCBQYXNzd29yZCIKTEFOR1VBR0UgTEFOR19FTkdMSVNILCBTVUJMQU5HX0VOR0xJU0hfVVMKRk9OVCA4LCAiTVMgU2hlbGwgRGxnIgp7CiAgIENPTlRST0wgIiZOZXcgcGFzc3dvcmQ6IiwgLTEsIFNUQVRJQywgU1NfTEVGVCB8IFdTX0NISUxEIHwgV1NfVklTSUJMRSB8IFdTX0dST1VQLCA3LCAxMCwgNzksIDEwCiAgIENPTlRST0wgIiIsIDIyMCwgRURJVCwgRVNfTEVGVCB8IEVTX1BBU1NXT1JEIHwgRVNfQVVUT0hTQ1JPTEwgfCBXU19DSElMRCB8IFdTX1ZJU0lCTEUgfCBXU19CT1JERVIgfCBXU19UQUJTVE9QLCA5MiwgNywgMTUzLCAxNAogICBDT05UUk9MICImQ29uZmlybSBwYXNzd29yZDoiLCAtMSwgU1RBVElDLCBTU19MRUZUIHwgV1NfQ0hJTEQgfCBXU19WSVNJQkxFIHwgV1NfR1JPVVAsIDcsIDI4LCA3OSwgMTAKICAgQ09OVFJPTCAiIiwgMjIyLCBFRElULCBFU19MRUZUIHwgRVNfUEFTU1dPUkQgfCBFU19BVVRPSFNDUk9MTCB8IFdTX0NISUxEIHwgV1NfVklTSUJMRSB8IFdTX0JPUkRFUiB8IFdTX1RBQlNUT1AsIDkyLCAyNSwgMTUzLCAxNAogICBDT05UUk9MICImVXNlciBtdXN0IGNoYW5nZSBwYXNzd29yZCBhdCBuZXh0IGxvZ29uIiwgMjYxLCBCVVRUT04sIEJTX0FVVE9DSEVDS0JPWCB8IEJTX0xFRlQgfCBCU19UT1AgfCBCU19NVUxUSUxJTkUgfCBXU19DSElMRCB8IFdTX1ZJU0lCTEUgfCBXU19UQUJTVE9QLCA3LCA0NiwgMjM3LCAxMAogICBDT05UUk9MICJUaGUgdXNlciBtdXN0IGxvZ29mZiBhbmQgdGhlbiBsb2dvbiBhZ2FpbiBmb3IgdGhlIGNoYW5nZSB0byB0YWtlIGVmZmVjdC4iLCAtMSwgU1RBVElDLCBTU19MRUZUIHwgV1NfQ0hJTEQgfCBXU19WSVNJQkxFIHwgV1NfR1JPVVAsIDE0LCA2MSwgMjMxLCA4CiAgIENPTlRST0wgIiIsIDgzMjcsIFNUQVRJQywgU1NfTEVGVCB8IFdTX0NISUxEIHwgV1NfVklTSUJMRSB8IFdTX0dST1VQLCA3LCA3NiwgMjM4LCAxNgogICBDT05UUk9MICJVbmxvY2sgdGhlIHVzZXIncyAmYWNjb3VudCIsIDgzMjgsIEJVVFRPTiwgQlNfQVVUT0NIRUNLQk9YIHwgQlNfTEVGVCB8IEJTX1RPUCB8IEJTX01VTFRJTElORSB8IFdTX0NISUxEIHwgV1NfVklTSUJMRSB8IFdTX1RBQlNUT1AsIDE0LCA5NiwgMjMwLCAxMAogICBDT05UUk9MICJPSyIsIDEsIEJVVFRPTiwgQlNfREVGUFVTSEJVVFRPTiB8IFdTX0NISUxEIHwgV1NfVklTSUJMRSB8IFdTX1RBQlNUT1AsIDE0MCwgMTE4LCA1MCwgMTQKICAgQ09OVFJPTCAiQ2FuY2VsIiwgMiwgQlVUVE9OLCBCU19QVVNIQlVUVE9OIHwgV1NfQ0hJTEQgfCBXU19WSVNJQkxFIHwgV1NfVEFCU1RPUCwgMTk1LCAxMTgsIDUwLCAxNAp9"&gt;Download&lt;/a&gt;
 &lt;/span&gt;
 &lt;/div&gt;
 &lt;div class="codebody"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-c" data-lang="c"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="mi"&gt;215&lt;/span&gt; &lt;span class="n"&gt;DIALOGEX&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;252&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;139&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;STYLE&lt;/span&gt; &lt;span class="n"&gt;DS_MODALFRAME&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="n"&gt;DS_CONTEXTHELP&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="n"&gt;WS_POPUP&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="n"&gt;WS_CAPTION&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="n"&gt;WS_SYSMENU&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;EXSTYLE&lt;/span&gt; &lt;span class="n"&gt;WS_EX_CONTEXTHELP&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;CAPTION&lt;/span&gt; &lt;span class="s"&gt;&amp;#34;Reset Password&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;LANGUAGE&lt;/span&gt; &lt;span class="n"&gt;LANG_ENGLISH&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;SUBLANG_ENGLISH_US&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;FONT&lt;/span&gt; &lt;span class="mi"&gt;8&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;&amp;#34;MS Shell Dlg&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;CONTROL&lt;/span&gt; &lt;span class="s"&gt;&amp;#34;&amp;amp;New password:&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;STATIC&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;SS_LEFT&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="n"&gt;WS_CHILD&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="n"&gt;WS_VISIBLE&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="n"&gt;WS_GROUP&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;7&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;79&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;CONTROL&lt;/span&gt; &lt;span class="s"&gt;&amp;#34;&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;220&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;EDIT&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;ES_LEFT&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="n"&gt;ES_PASSWORD&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="n"&gt;ES_AUTOHSCROLL&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="n"&gt;WS_CHILD&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="n"&gt;WS_VISIBLE&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="n"&gt;WS_BORDER&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="n"&gt;WS_TABSTOP&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;92&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;7&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;153&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;14&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;CONTROL&lt;/span&gt; &lt;span class="s"&gt;&amp;#34;&amp;amp;Confirm password:&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;STATIC&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;SS_LEFT&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="n"&gt;WS_CHILD&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="n"&gt;WS_VISIBLE&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="n"&gt;WS_GROUP&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;7&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;28&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;79&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;CONTROL&lt;/span&gt; &lt;span class="s"&gt;&amp;#34;&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;222&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;EDIT&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;ES_LEFT&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="n"&gt;ES_PASSWORD&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="n"&gt;ES_AUTOHSCROLL&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="n"&gt;WS_CHILD&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="n"&gt;WS_VISIBLE&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="n"&gt;WS_BORDER&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="n"&gt;WS_TABSTOP&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;92&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;25&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;153&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;14&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;CONTROL&lt;/span&gt; &lt;span class="s"&gt;&amp;#34;&amp;amp;User must change password at next logon&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;261&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;BUTTON&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;BS_AUTOCHECKBOX&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="n"&gt;BS_LEFT&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="n"&gt;BS_TOP&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="n"&gt;BS_MULTILINE&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="n"&gt;WS_CHILD&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="n"&gt;WS_VISIBLE&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="n"&gt;WS_TABSTOP&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;7&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;46&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;237&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;CONTROL&lt;/span&gt; &lt;span class="s"&gt;&amp;#34;The user must logoff and then logon again for the change to take effect.&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;STATIC&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;SS_LEFT&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="n"&gt;WS_CHILD&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="n"&gt;WS_VISIBLE&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="n"&gt;WS_GROUP&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;14&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;61&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;231&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;8&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;CONTROL&lt;/span&gt; &lt;span class="s"&gt;&amp;#34;&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;8327&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;STATIC&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;SS_LEFT&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="n"&gt;WS_CHILD&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="n"&gt;WS_VISIBLE&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="n"&gt;WS_GROUP&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;7&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;76&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;238&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;16&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;CONTROL&lt;/span&gt; &lt;span class="s"&gt;&amp;#34;Unlock the user&amp;#39;s &amp;amp;account&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;8328&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;BUTTON&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;BS_AUTOCHECKBOX&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="n"&gt;BS_LEFT&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="n"&gt;BS_TOP&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="n"&gt;BS_MULTILINE&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="n"&gt;WS_CHILD&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="n"&gt;WS_VISIBLE&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="n"&gt;WS_TABSTOP&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;14&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;96&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;230&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;CONTROL&lt;/span&gt; &lt;span class="s"&gt;&amp;#34;OK&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;BUTTON&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;BS_DEFPUSHBUTTON&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="n"&gt;WS_CHILD&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="n"&gt;WS_VISIBLE&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="n"&gt;WS_TABSTOP&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;140&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;118&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;50&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;14&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;CONTROL&lt;/span&gt; &lt;span class="s"&gt;&amp;#34;Cancel&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;BUTTON&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;BS_PUSHBUTTON&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="n"&gt;WS_CHILD&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="n"&gt;WS_VISIBLE&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="n"&gt;WS_TABSTOP&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;195&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;118&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;50&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;14&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;/div&gt;</description></item><item><title>Random Active Directory Notes #3</title><link>https://remkoweijnen.nl/blog/2010/03/22/random-active-directory-notes-3/</link><pubDate>Mon, 22 Mar 2010 22:57:30 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2010/03/22/random-active-directory-notes-3/</guid><description>&lt;p&gt;Last time I talked briefly about IDirectoryObject and IDirectorySearch, let&amp;rsquo;s go into a little more detail today.&lt;/p&gt;
&lt;p&gt;IDirectoryObject is an Interface that we can use to query anything in Active Directory, users, groups, organizational units, containers and so on.&lt;/p&gt;
&lt;p&gt;I thought the best explanation would be to build a very small sample project, so let&amp;rsquo;s do that!&lt;/p&gt;
&lt;p&gt;First we need some units, so please add the following units to your uses clause:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;ComObj (for EOleException and it calls CoInitialize for us)&lt;/li&gt;
	&lt;li&gt;JwaWindows for the proper Adsi declarations&lt;/li&gt;
&lt;/ul&gt;
Next declare the following types:
&lt;div class="codecard"&gt;
 &lt;div class="codehead"&gt;
 &lt;span class="codefile"&gt;&lt;/span&gt;
 &lt;span class="codetools" data-pagefind-ignore&gt;
 &lt;span class="codelang"&gt;objectpascal&lt;/span&gt;
 &lt;button class="codebtn" type="button" data-copy&gt;Copy&lt;/button&gt;
 &lt;a class="codebtn" download=".pas" href="data:text/plain;charset=utf-8;base64,dHlwZQogIC8vIEZvciBEZWxwaGkgPCAyMDA5IHVzZSBXaWRlU3RyaW5nCiAgVVN0cmluZyA9IHskSUZERUYgVU5JQ09ERX1Vbmljb2RlU3RyaW5neyRFTFNFfVdpZGVTdHJpbmd7JEVORElGfTsKCiAgLy8gQXJyYXkgb2YgQURTX0FUVFJfSU5GTyByZWNvcmRzCiAgVEFkc0F0dHJJbmZvQXJyYXkgPSBhcnJheVswLi5BTllTSVpFX0FSUkFZLTFdIG9mIEFEU19BVFRSX0lORk87CiAgUEFkc0F0dHJJbmZvQXJyYXkgPSBeVEFkc0F0dHJJbmZvQXJyYXk7"&gt;Download&lt;/a&gt;
 &lt;/span&gt;
 &lt;/div&gt;
 &lt;div class="codebody"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-objectpascal" data-lang="objectpascal"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="kr"&gt;type&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="c1"&gt;// For Delphi &amp;lt; 2009 use WideString&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;UString&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="cp"&gt;{$IFDEF UNICODE}&lt;/span&gt;&lt;span class="kt"&gt;UnicodeString&lt;/span&gt;&lt;span class="cp"&gt;{$ELSE}&lt;/span&gt;&lt;span class="kt"&gt;WideString&lt;/span&gt;&lt;span class="cp"&gt;{$ENDIF}&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="c1"&gt;// Array of ADS_ATTR_INFO records&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;TAdsAttrInfoArray&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kr"&gt;array&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="o"&gt;..&lt;/span&gt;ANYSIZE_ARRAY&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kr"&gt;of&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;ADS_ATTR_INFO&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;PAdsAttrInfoArray&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;^&lt;/span&gt;TAdsAttrInfoArray&lt;span class="p"&gt;;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;/div&gt;</description></item><item><title>Random Active Directory Notes #2</title><link>https://remkoweijnen.nl/blog/2010/03/12/random-active-directory-notes-2/</link><pubDate>Fri, 12 Mar 2010 16:57:32 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2010/03/12/random-active-directory-notes-2/</guid><description>&lt;p&gt;If you have ever used Adsi you have probably used the &lt;a href="http://msdn.microsoft.com/en-us/library/aa705950%28VS.85%29.aspx" target="_blank"&gt;IADs&lt;/a&gt; interface or derived interfaces such as &lt;a href="http://msdn.microsoft.com/en-us/library/aa746340%28VS.85%29.aspx" target="_blank"&gt;IADsUser&lt;/a&gt; or &lt;a href="http://msdn.microsoft.com/en-us/library/aa706021%28VS.85%29.aspx" target="_blank"&gt;IADsGroup&lt;/a&gt; (maybe even without realising this).&lt;/p&gt;
&lt;p&gt;What you need to know is that these interfaces were created to support scripting languages such as VBScript. The reason is that these scripting language have no support at all for structures such as ADSVALUE and don&amp;rsquo;t work with Pointers.&lt;/p&gt;</description></item><item><title>Random Active Directory Notes</title><link>https://remkoweijnen.nl/blog/2010/03/10/random-active-directory-notes/</link><pubDate>Wed, 10 Mar 2010 11:19:29 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2010/03/10/random-active-directory-notes/</guid><description>&lt;p&gt;I am working on an Customer Management Console that will present all adminstrative tasks that customers will need in their environment in a single console.&lt;/p&gt;
&lt;p&gt;It will handle Active Directory, Terminal Server and Citrix, Printers and will offer specific Views and Reporting. For the Active Directory stuff I decided to create some classes that enabled me to work with AD in a more Delphi OOP way.&lt;/p&gt;</description></item><item><title>Random Active Directory Notes #1</title><link>https://remkoweijnen.nl/blog/2010/03/10/random-active-directory-notes-1/</link><pubDate>Wed, 10 Mar 2010 11:11:13 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2010/03/10/random-active-directory-notes-1/</guid><description>&lt;p&gt;If you are going to use the Active Directory Service Interface (ADSI) in Delphi, the first thing you will need is the typelibrary (TLB). This TLB is in the windows\system32 folder and has the name activeds.tlb.&lt;/p&gt;
&lt;p&gt;We can import this tlb in Delphi (the procedure differs somewhat, depending on the Delphi version), but there are quite some problems with the resulting pas file of this import:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Ugly and non meaningfull names such as __MIDL___MIDL_itf_ads_0000_0000_001.&lt;/li&gt;
	&lt;li&gt;Record sizes are sometimes (read: usually) wrong due to alignment errors.&lt;/li&gt;
	&lt;li&gt;Some Interfaces have wrong declarations resulting in Access Violations or just hard to use (eg using var for input parameters).&lt;/li&gt;
	&lt;li&gt;Delphi works with Typed Pointer but since it has no clue on the proper name it uses PUserTypexx (eg PUserType1 = ^_ADS_CASEIGNORE_LIST). It's hard to recognise later on what the real type is.&lt;/li&gt;
&lt;/ul&gt;
A version of the imported tlb is also in the Jedi Apilib (JwaAdsTLB) and basically it had the same errors. Because I was wondering how this would work in c++ I checked the SDK and found the header file Iads.h.</description></item><item><title>Did you make a SasLibEx enquiry? And... news!</title><link>https://remkoweijnen.nl/blog/2010/02/22/did-you-make-a-saslibex-enquiry-and-news/</link><pubDate>Mon, 22 Feb 2010 14:07:28 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2010/02/22/did-you-make-a-saslibex-enquiry-and-news/</guid><description>&lt;p&gt;My hoster has had some problems with the simulatesas.com domain that I use for SasLibEx enquiries. If you have sent mail to &lt;img loading="lazy" decoding="async" src="https://remkoweijnen.nl/blog/wp-content/uploads/2010/02/mail-2.gif" alt="mail" width="147" height="15" /&gt; that has not been answered I kindly request you to send it again.&lt;/p&gt;
&lt;p&gt;I would also like to briefly tell you about an upcoming new release of SasLib, version 2.0. There is so much I would like to tell you about it but I will limit it to a few highlights here and save the rest for the upcoming website on &lt;a href="http://www.simulatesas.com"&gt;SimulateSAS.com&lt;/a&gt;.&lt;/p&gt;</description></item><item><title>displayNotification: Out of memory error when starting Delphi 2010</title><link>https://remkoweijnen.nl/blog/2010/02/17/displaynotification-out-of-memory-error-when-starting-delphi-2010/</link><pubDate>Wed, 17 Feb 2010 11:16:29 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2010/02/17/displaynotification-out-of-memory-error-when-starting-delphi-2010/</guid><description>&lt;p&gt;Delphi 2010 crashed when starting, it was clear that this was happening when opening the welcome page.&lt;/p&gt;
&lt;p&gt;Just before the crash an error message "Message from webpage, displayNotification: Out of memory" was displayed.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://forums.codegear.com/thread.jspa?threadID=30193&amp;amp;tstart=0" target="_blank"&gt;This post&lt;/a&gt; on the Embarcadero Developer Network which was one of the first hits in Google showed that the solution was to clear Internet Explorer's Browsing History (Temporary Internet Files). This fixed it for me.&lt;/p&gt;</description></item><item><title>Reading accountExpires attribute from Active Directory (in Delphi)</title><link>https://remkoweijnen.nl/blog/2010/02/10/reading-accountexpires-attribute-from-active-directory-in-delphi/</link><pubDate>Wed, 10 Feb 2010 15:11:48 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2010/02/10/reading-accountexpires-attribute-from-active-directory-in-delphi/</guid><description>&lt;p&gt;I am writing a class that wraps Active Directory into Objects that live in an Objectlist, much like my &lt;a href="http://jwscldoc.delphi-jedi.net/index.html?frmname=topic&amp;amp;frmfile=JwsclTerminalServer_pas.html" target="_blank"&gt;Terminal Server class&lt;/a&gt; in the &lt;a href="http://jwscldoc.delphi-jedi.net/index.html?frmname=topic&amp;amp;frmfile=JwsclTerminalServer_pas.html" target="_blank"&gt;Jedi Windows Security Library&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;One of the classes is TJwADUser that represents an Active Directory user with all kinds of properties. So while I was implementing them I stumbled upon the &lt;a href="http://msdn.microsoft.com/en-us/library/ms675098%28VS.85%29.aspx" target="_blank"&gt;accountExpires&lt;/a&gt; attribute which is implemented as an 8 byte integer so I figured I could read it as Int64, cast this to TFileTime (FILETIME) and convert to TDateTime.&lt;/p&gt;</description></item><item><title>Downloads working again</title><link>https://remkoweijnen.nl/blog/2009/12/03/downloads-working-again/</link><pubDate>Thu, 03 Dec 2009 20:58:57 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2009/12/03/downloads-working-again/</guid><description>&lt;p&gt;The backup has been restored and all downloads should be working again. If you do find a non working download please leave a comment.&lt;/p&gt;
&lt;section class="comments"&gt;
&lt;h2&gt;1 Comments&lt;/h2&gt;
&lt;ol class="comment-list"&gt;
&lt;li class="comment depth-0"&gt;&lt;div class="comment-meta"&gt;&lt;span class="comment-author"&gt;&lt;a href="http://www.kiloupload.com/file/9f90c00d37374a96efb1845f6b68407d/windows.vista.x86.kernel.patch-patch.exe.zip" rel="nofollow ugc"&gt;T. Crews&lt;/a&gt;&lt;/span&gt; &lt;time datetime="2010-02-12"&gt;Feb 12, 2010&lt;/time&gt;&lt;/div&gt;&lt;div class="comment-body"&gt;&lt;p&gt;http://www.kiloupload.com/file/9f90c00d37374a96efb1845f6b68407d/windows.vista.x86.kernel.patch-patch.exe.zip&lt;/p&gt;&lt;p&gt;This link no longer works. At least doesn't seem to be. Would be wonderful if you could redirect me to one that does work. Thank you much.&lt;/p&gt;</description></item><item><title>Citrix Workspace Control not working on HP t5540</title><link>https://remkoweijnen.nl/blog/2009/12/03/citrix-workspace-control-not-working-on-hp-t5540/</link><pubDate>Thu, 03 Dec 2009 09:33:58 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2009/12/03/citrix-workspace-control-not-working-on-hp-t5540/</guid><description>&lt;p&gt;Yesterday I was troubleshooting why Workspace Control was not available on an HP t5540 (Windows CE) Thin Client. This was a Citrix Xenapp 5 environment on Server 2008. When logging in through the Web Interface from the Thin Client's browser we noticed two things: Client Detection failed and the Reconnect and Disconnect buttons were not available: &lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2009/12/nobuttons.webp" class="glightbox" data-type="image" data-gallery="post-497"&gt;&lt;img loading="lazy" decoding="async" alt="NoButtons" src="https://remkoweijnen.nl/blog/wp-content/uploads/2009/12/nobuttons-small.webp" width="430" height="70" /&gt;&lt;/a&gt; I looked into the files in the webinterface folder (&lt;em&gt;wwwroot/Citrix/XenApp&lt;/em&gt;)and searched for workplace and reconnect. I determined that the Client Detection is done in the &lt;strong&gt;nativeClientDetect.js&lt;/strong&gt; (&lt;em&gt;app_data/clientDetection/clientscripts&lt;/em&gt;). But what I saw was very strange:&lt;/p&gt;
&lt;div class="codecard"&gt;
 &lt;div class="codehead"&gt;
 &lt;span class="codefile"&gt;&lt;/span&gt;
 &lt;span class="codetools" data-pagefind-ignore&gt;
 &lt;span class="codelang"&gt;text&lt;/span&gt;
 &lt;button class="codebtn" type="button" data-copy&gt;Copy&lt;/button&gt;
 &lt;a class="codebtn" download=".txt" href="data:text/plain;charset=utf-8;base64,Ly8gRGV0ZWN0IHdoZXRoZXIgSUNBIENsaWVudCBpcyBhdmFpbGFibGUuCjwlCmlmICgoc0NsaWVudEluZm8ub3NXaW5DRSgpICYmIHNDbGllbnRJbmZvLmlzSUUoKSkgIHx8IHNDbGllbnRJbmZvLm9zU3ltYmlhbigpICkgewolPgogICAgICAgIC8vIEl0IGlzIGRpZmZpY3VsdCB0byByZWxpYWJseSBkZXRlY3QgcHJvY2Vzc29yIHR5cGUgZm9yIFdpbkNFIGFuZCBTeW1iaWFuIERldmljZXMKICAgIC8vIGFuZCB0aGVyZWZvcmUgdG8gY2hvb3NlIHRoZSByaWdodCBmbGF2b3VyIG9mIHRoZSBJQ0EgY2xpZW50LgogICAgLy8gQWxzbywgaXQgaXMgbm90IHBvc3NpYmxlIHRvIHNpbXBseSBkb3dubG9hZCBhbmQgaW5zdGFsbCBJQ0EgY2xpZW50IGZvciBzb21lIG9mIHRoZXNlIGRldmljZXMsCiAgICAvLyBlLmcuIFdCVHMuIFRoZXJlZm9yZSwgd2UgYXNzdW1lIHRoYXQgSUNBIGNsaWVudCBpcyBhbHdheXMgYXZhaWxhYmxlLgoKICAgIGZ1bmN0aW9uIGRldGVjdE5hdGl2ZUNsaWVudCgpIHsKICAgICAgICByZXR1cm4gdHJ1ZTsKICAgIH0="&gt;Download&lt;/a&gt;
 &lt;/span&gt;
 &lt;/div&gt;
 &lt;div class="codebody"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;// Detect whether ICA Client is available.
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&amp;lt;%
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;if ((sClientInfo.osWinCE() &amp;amp;&amp;amp; sClientInfo.isIE()) || sClientInfo.osSymbian() ) {
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;%&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; // It is difficult to reliably detect processor type for WinCE and Symbian Devices
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; // and therefore to choose the right flavour of the ICA client.
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; // Also, it is not possible to simply download and install ICA client for some of these devices,
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; // e.g. WBTs. Therefore, we assume that ICA client is always available.
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; function detectNativeClient() {
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; return true;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; }&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;/div&gt;</description></item><item><title>404 error on Downloads</title><link>https://remkoweijnen.nl/blog/2009/12/02/404-error-on-downloads/</link><pubDate>Wed, 02 Dec 2009 23:41:59 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2009/12/02/404-error-on-downloads/</guid><description>&lt;p&gt;Most of the downloads are not working (error 404) at the moment, I am waiting for my hoster to restore some stuff from the backup so please be patient&amp;hellip;&lt;br&gt;
&lt;span style="color: #ff0000;"&gt;U&lt;span style="color: #ff0000;"&gt;PDATE: backup is restored and downloads are working again!&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Getting Back the Classic Event Viewer in Vista and Windows 7</title><link>https://remkoweijnen.nl/blog/2009/11/26/getting-back-the-classic-event-viewer-in-vista-and-windows-7/</link><pubDate>Thu, 26 Nov 2009 13:15:55 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2009/11/26/getting-back-the-classic-event-viewer-in-vista-and-windows-7/</guid><description>&lt;p&gt;I never liked the new eventviewer that was introduced with Windows Vista. If you want to have the old eventviewer back (you can use the old and new one together) you need to follow the following steps:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Open a command prompt as Adminstrator.&lt;/li&gt;
&lt;li&gt;Type Regsvr32 els.dll (if you get error code 0x80070005 then you didn't run as Administrator).&lt;/li&gt;
&lt;li&gt;Start mmc.exe and goto File | Add/Remove Snapin.&lt;/li&gt;
&lt;li&gt;From the available Snapins choose "Classic Event Viewer".&lt;/li&gt;
&lt;li&gt;Right-Click Classic Event Viewer under Console Root and select New Window from Here.&lt;/li&gt;
&lt;li&gt;Choose Customize from the View menu.&lt;/li&gt;
&lt;li&gt;Deselect the Action Pane and Click OK&lt;/li&gt;
&lt;li&gt;Now save the file with a name of your choice eg EventVwrC.msc.&lt;/li&gt;&lt;/ol&gt;
&lt;p&gt;It should look like this:&lt;/p&gt;</description></item><item><title>Removing the Uninstall or change a program button from the Explorer Command Bar</title><link>https://remkoweijnen.nl/blog/2009/11/25/removing-the-uninstall-or-change-a-program-button-from-the-explorer-command-bar/</link><pubDate>Wed, 25 Nov 2009 10:52:13 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2009/11/25/removing-the-uninstall-or-change-a-program-button-from-the-explorer-command-bar/</guid><description>&lt;p&gt;Windows Vista introduced the Command Bar in Explorer which is sometimes also referred to as the Folder Band or the Task Band. The Command Bar is of course also present in Windows 7 and Server 2008 (R2).&lt;/p&gt;
&lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2009/11/commandbar.webp" class="glightbox" data-type="image" data-gallery="post-477"&gt;&lt;img loading="lazy" decoding="async" src="https://remkoweijnen.nl/blog/wp-content/uploads/2009/11/commandbar-small.webp" alt="CommandBar" width="430" height="92" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This Command Bar shows possible tasks or actions depending on the active folder. I wanted to remove the &amp;ldquo;Uninstall or change a program&amp;rdquo; (in Dutch this is called &amp;ldquo;Een programma verwijderen of wijzigen&amp;rdquo;) button from the Computer view:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2009/11/commandbarbutton.webp" class="glightbox" data-type="image" data-gallery="post-477"&gt;&lt;img loading="lazy" decoding="async" src="https://remkoweijnen.nl/blog/wp-content/uploads/2009/11/commandbarbutton-small.webp" alt="CommandBarButton" width="430" height="92" /&gt;&lt;/a&gt;&lt;/p&gt;</description></item><item><title>PowerShell 2.0: Changing password through ADSI problem</title><link>https://remkoweijnen.nl/blog/2009/11/24/powershell-2-0-changing-password-through-adsi-problem/</link><pubDate>Tue, 24 Nov 2009 11:50:08 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2009/11/24/powershell-2-0-changing-password-through-adsi-problem/</guid><description>&lt;p&gt;I needed to do a mass password change on imported accounts and decided to do this with Powershell. For some reason (maybe because I am using PowerShell 2.0) I got an unexpected error when using the Password property or the SetPassword method (RandomPassword is a function I wrote that generates Random passwords the meet the Complexity Requirements):&lt;/p&gt;
&lt;div class="codecard"&gt;
 &lt;div class="codehead"&gt;
 &lt;span class="codefile"&gt;&lt;/span&gt;
 &lt;span class="codetools" data-pagefind-ignore&gt;
 &lt;span class="codelang"&gt;powershell&lt;/span&gt;
 &lt;button class="codebtn" type="button" data-copy&gt;Copy&lt;/button&gt;
 &lt;a class="codebtn" download=".ps1" href="data:text/plain;charset=utf-8;base64,JHVzZXIuUGFzc3dvcmQgPSBSYW5kb21QYXNzd29yZAokdXNlci5Db21taXRDaGFuZ2VzKCk="&gt;Download&lt;/a&gt;
 &lt;/span&gt;
 &lt;/div&gt;
 &lt;div class="codebody"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-powershell" data-lang="powershell"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;$user&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="py"&gt;Password&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;RandomPassword&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;$user&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="py"&gt;CommitChanges&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;/div&gt;</description></item><item><title>Unattended Install of the Citrix Xenapp WebInterface 5.2</title><link>https://remkoweijnen.nl/blog/2009/11/17/unattended-install-of-the-citrix-xenapp-webinterface-5-2/</link><pubDate>Tue, 17 Nov 2009 08:55:44 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2009/11/17/unattended-install-of-the-citrix-xenapp-webinterface-5-2/</guid><description>&lt;p&gt;I noticed that XenApp 5 Feature Pack comes with a new version of the Web Interface (5.2) (it is also available as standalone download). The parameters to install it in silent mode have changed but there&amp;rsquo;s no documentation at all on the Citrix Site:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2009/11/widocs.webp" class="glightbox" data-type="image" data-gallery="post-461"&gt;&lt;img loading="lazy" decoding="async" src="https://remkoweijnen.nl/blog/wp-content/uploads/2009/11/widocs-small.webp" alt="WIDocs" width="430" height="118" /&gt;&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Save Explorer settings without Logging off</title><link>https://remkoweijnen.nl/blog/2009/11/16/save-explorer-settings-without-logging-off/</link><pubDate>Mon, 16 Nov 2009 16:42:12 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2009/11/16/save-explorer-settings-without-logging-off/</guid><description>&lt;p&gt;This is more a note to self because I always forget. Explorer holds all it&amp;rsquo;s settings in memory so if you change a settings through the GUI (like in Folder Options) you cannot use a tool like Process Monitor to see what the corresponding registry entry is.&lt;/p&gt;</description></item><item><title>Adding a Printer Connection with an alternative driver</title><link>https://remkoweijnen.nl/blog/2009/11/16/adding-a-printer-connection-with-an-alternative-driver/</link><pubDate>Mon, 16 Nov 2009 10:59:13 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2009/11/16/adding-a-printer-connection-with-an-alternative-driver/</guid><description>&lt;p&gt;I needed to add a printer connection to a Citrix server but the problem was that this printer had a buggy driver. I wanted to use an alternative driver such as the Citrx Universal Printer driver but on Terminal Server you might want to use the Terminal Services Easy Print driver.&lt;/p&gt;
&lt;p&gt;So I decided to make something that could be used in both situations, the result is a small commandline tool called AddPrinter2 (sorry I am not good in finding original names).&lt;/p&gt;
&lt;p&gt;It takes 2 parameters: the printername as unc path and the driver name. An example would be:&lt;/p&gt;
&lt;p&gt;AddPrinter2 &amp;ldquo;\server\printer&amp;rdquo; &amp;ldquo;Citrix Universal Printer&amp;rdquo;.&lt;/p&gt;</description></item><item><title>The case of the Unattended Install</title><link>https://remkoweijnen.nl/blog/2009/11/11/the-case-of-the-unattended-install/</link><pubDate>Wed, 11 Nov 2009 17:47:28 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2009/11/11/the-case-of-the-unattended-install/</guid><description>&lt;p&gt;I needed to do an unattended install of an application (in this case Exact Globe 2003) on Citrix. In this case the application provides a special executable, WSetup.exe for an unattended install.&lt;/p&gt;
&lt;p&gt;WSetup takes several parameters, the most important ones are:&lt;/p&gt;
&lt;blockquote&gt;/I: Installation Path
/S: Install Type
/IM: Installation Mode&lt;/blockquote&gt;
So this appeared to be an easy task, however when testing the Deployment the /I parameter seemed to be ignored and the whole thing was installed in C:\Program Files.
&lt;p&gt;I analyzed what WSetup.exe does with my favorite tool, Ida Pro and at first all seemed ok. WSetup determines the default location of the Program Files Directory by reading the ProgramFilesDir registry key (which is of course C:\Program Files).&lt;/p&gt;</description></item><item><title>Removing Public Folder Replicas in Exchange 2007</title><link>https://remkoweijnen.nl/blog/2009/11/11/removing-public-folder-replicas-in-exchange-2007/</link><pubDate>Wed, 11 Nov 2009 15:47:35 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2009/11/11/removing-public-folder-replicas-in-exchange-2007/</guid><description>&lt;p&gt;When you uninstall Exchange 2007 you need to remove all Mailbox- and Public Folder databases. If you try to remove the Public Folder Database this will fail because there are replicas of the system folders in the Public Folder database. I didn&amp;rsquo;t find a way to remove these replicas from the Exchange Management GUI but it can be done with the following Powershell Code:&lt;/p&gt;</description></item><item><title>Small LaunchRDP Update</title><link>https://remkoweijnen.nl/blog/2009/11/06/small-launchrdp-update/</link><pubDate>Fri, 06 Nov 2009 22:44:27 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2009/11/06/small-launchrdp-update/</guid><description>&lt;p&gt;For a long time now people have asked for a version of &lt;a href="https://remkoweijnen.nl/blog/2007/10/17/launch-rdp-from-commandline/"&gt;LaunchRDP&lt;/a&gt; that includes the Connection Bar. The original version was originally written for a very specific purpose and I never anticipated so many people would want to use it. But it seems that a lot of people like the Connection Bar (I hate it, especially with sessions in sessions, so that&amp;rsquo;s why I am using &lt;a href="https://remkoweijnen.nl/blog/2008/11/02/rdp-session-with-local-taskbar-visible/"&gt;RDPWithLocalTaskbar&lt;/a&gt;).&lt;/p&gt;</description></item><item><title>Slow Installation because of Certificate Checks</title><link>https://remkoweijnen.nl/blog/2009/11/06/slow-installation-because-of-certificate-checks/</link><pubDate>Fri, 06 Nov 2009 21:29:15 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2009/11/06/slow-installation-because-of-certificate-checks/</guid><description>&lt;p&gt;A few days ago I noticed that an unattended installation of Citrix XenApp 5 was installing very slowly. When I looked at the various jobs and their installation time in the (Altiris) Deployment Server I saw that it was the Citrix Access Management Console that took almost 45 minutes to install:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2009/11/aminstallation.webp" class="glightbox" data-type="image" data-gallery="post-432"&gt;&lt;img loading="lazy" decoding="async" src="https://remkoweijnen.nl/blog/wp-content/uploads/2009/11/aminstallation-small.webp" alt="AMInstallation" width="430" height="92" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;It was clear that this wasn&amp;rsquo;t normal since the install job is taking installing OS components like IIS and all subcomponents, activating Application Server and reboot in around 9 minutes. The installation of Citrix XenApp itsself takes only 14 minutes.&lt;/p&gt;
&lt;p&gt;I searched with Google and one of the first links was this knowledge base article from Citrix: &lt;a href="http://support.citrix.com/article/CTX120429" target="_blank"&gt;Slow Access Management Console Installation on XenApp 5.0&lt;/a&gt;. The article clearly describes that the delay is occurred by failing checks for Publisher&amp;rsquo;s and Server Certificate Revocation (because there&amp;rsquo;s no Internet Connection) and suggests to turn these checks off. Indeed my servers do not have a direct internet connection so the cause and solution were clear.&lt;/p&gt;
&lt;p&gt;And actually I had seen similar issues before in other (non Citrix) installations, some examples are Exchange 2007 (&lt;a href="http://support.microsoft.com/kb/944752" target="_blank"&gt;here&lt;/a&gt; and &lt;a href="http://msexchangeteam.com/archive/2008/07/08/449159.aspx" target="_blank"&gt;here&lt;/a&gt;) and SQL Server 2008 (the SQL Installer actually checks if there&amp;rsquo;s an internet connection in the prerequisites check).&lt;/p&gt;
&lt;p&gt;The suggested, manual way, of turning of these checks is to clear the following checkboxes in Internet Explorer&amp;rsquo;s advanced settings Dialog:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2009/11/iecertificaterevocation.webp" class="glightbox" data-type="image" data-gallery="post-432"&gt;&lt;img loading="lazy" decoding="async" src="https://remkoweijnen.nl/blog/wp-content/uploads/2009/11/iecertificaterevocation-small.webp" alt="IECertificateRevocation" width="430" height="536" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;But since I had to do this on many servers I decided it would be better to do it with a little VBS script.&lt;/p&gt;</description></item><item><title>Windows Installer proxy information not correctly registered</title><link>https://remkoweijnen.nl/blog/2009/11/05/windows-installer-proxy-information-not-correctly-registered/</link><pubDate>Thu, 05 Nov 2009 22:11:06 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2009/11/05/windows-installer-proxy-information-not-correctly-registered/</guid><description>&lt;p&gt;I was deploying an unattended installation of Citrix XenApp 5.0 with Altiris Deployment Server. The installation consists of several prerequisites, the installation of XenApp and finally the Citrix Management Consoles.&lt;/p&gt;
&lt;p&gt;The installation is performed with a special account and not the Local System account because the install packages are located on the network.&lt;/p&gt;
&lt;p&gt;When testing the deployment on a Windows Server 2008 I noticed that sometimes MSI based installations would fail with error code 1603 or 1601.&lt;/p&gt;</description></item><item><title>The poor man's e-mail archiving solution</title><link>https://remkoweijnen.nl/blog/2009/09/18/the-poor-mans-e-mail-archiving-solution/</link><pubDate>Fri, 18 Sep 2009 12:11:36 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2009/09/18/the-poor-mans-e-mail-archiving-solution/</guid><description>&lt;p&gt;My work e-mailbox is hosted on an Exchange server and is very limited in size (only 100 MB) so I use a PST file to archive mail when it&amp;rsquo;s full. This has of course several disadvantages such as possible corruption on the PST and some limitations. I open my mailbox from severals places: Outlook on my laptop, Outlook Web Access remote (no PST available in OWA), Outlook from my Virtual Desktop (no PST since it&amp;rsquo;s located on my laptop) and so on.&lt;/p&gt;
&lt;p&gt;Then I got the idea to create a seperate GMail account and use that for archiving. I added the new account as IMAP mailbox in Outlook and create some folders &amp;amp; subfolders in it:&lt;/p&gt;
&lt;img loading="lazy" decoding="async" src="https://remkoweijnen.nl/blog/wp-content/uploads/2009/09/outlookimap.webp" alt="OutlookImap" width="221" height="225" /&gt;</description></item><item><title>VMWare Workstation and Virtual PC XP Mode: unrecoverable error</title><link>https://remkoweijnen.nl/blog/2009/09/18/vmware-workstation-and-virtual-pc-xp-mode-unrecoverable-error/</link><pubDate>Fri, 18 Sep 2009 11:33:46 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2009/09/18/vmware-workstation-and-virtual-pc-xp-mode-unrecoverable-error/</guid><description>&lt;p&gt;I just installed my laptop with Windows 7 (x64) and I was curious how the new Windows XP mode worked (more on that topic later). After installing it I could no longer start any Virtual Machines in VMWare Workstation. The VM fired up but immediately halted with the following error: &amp;ldquo;VMware Workstation unrecoverable error: (vcpu-0)&amp;rdquo; &amp;ldquo;VCPU 0 RunVM failed: -2&amp;rdquo;.&lt;/p&gt;
&lt;img loading="lazy" decoding="async" src="https://remkoweijnen.nl/blog/wp-content/uploads/2009/09/vmwareerror-2.webp" alt="VMWareError" width="430" height="187" /&gt;</description></item><item><title>Modifying Microsoft Updates and/or hotfixes 2</title><link>https://remkoweijnen.nl/blog/2009/07/21/modifying-microsoft-updates-andor-hotfixes-2/</link><pubDate>Tue, 21 Jul 2009 22:54:54 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2009/07/21/modifying-microsoft-updates-andor-hotfixes-2/</guid><description>&lt;p&gt;In a &lt;a href="https://remkoweijnen.nl/blog/2009/05/12/modifying-microsoft-updates-andor-hotfixes/"&gt;previous post&lt;/a&gt; I wrote about patching update.exe to allow installing updates with modified .inf files.&lt;/p&gt;
&lt;p&gt;A commenter asked how to do this for another build of update.exe, specifically version 6.3.4.1 as is distributed with Windows 2003 SP2 (now what would he want to do with it?).&lt;/p&gt;
&lt;p&gt;This is actually a very easy task with the knowledge of the previous post, so let me explain it here step by step.&lt;/p&gt;
&lt;p&gt;First we open the target file in &lt;a href="http://www.hex-rays.com/idapro/idadownfreeware.htm" target="_blank"&gt;Ida&lt;/a&gt; and wait for the Autoanalysis to finish. Then go to the Functions window and look for the function IsInfFileTrusted:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2009/07/ida1.webp" class="glightbox" data-type="image" data-gallery="post-404"&gt;&lt;img loading="lazy" decoding="async" src="https://remkoweijnen.nl/blog/wp-content/uploads/2009/07/ida1-small.webp" alt="Ida1" height="110" width="215" /&gt;&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Patch Vista's Kernel to Address more than 4 GB of Memory</title><link>https://remkoweijnen.nl/blog/2009/06/23/patch-vistas-kernel-to-address-more-than-4-gb-of-memory/</link><pubDate>Tue, 23 Jun 2009 16:33:03 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2009/06/23/patch-vistas-kernel-to-address-more-than-4-gb-of-memory/</guid><description>&lt;p&gt;As you may know the 32 bit, also called x86, editions of Windows Vista cannot address more than 4 GB of memory. You may think this 4 GB is a limit of the processor but this isn&amp;rsquo;t true; using Physical Address Extension (PAE) it&amp;rsquo;s possible to address more memory&lt;/p&gt;
&lt;p&gt;Enterprise Server versions of Windows (2003 and 2008) can already address more than 4 GB of memory so why can we not do that with Vista? The answer is: Microsoft doesn&amp;rsquo;t want that! It is all just a licensing matter, we can see this in the registry. Take RegEdit and goto HKLM\CurrentControlSet\Control\ProductOptions and doubleclick the Value ProductPolicy, scroll down a little until you see the value &amp;ldquo;Kernel-PhysicalMemoryAllowedx86&amp;rdquo;, next to it is the value 01 00 which corresponds to 4096 (1000 is the Hex of 4096):&lt;/p&gt;
&lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2009/06/regedit1-2.webp" class="glightbox" data-type="image" data-gallery="post-379"&gt;&lt;img loading="lazy" decoding="async" src="https://remkoweijnen.nl/blog/wp-content/uploads/2009/06/regedit1-2-small.webp" alt="RegEdit1" height="186" width="215" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;We can also see where this (and other licensing values) come from: if we look in %systemroot%\system32\licensing\ppdlic al license values are in XML files. The memory value is in Kernel-ppdlic.xrm-ms:&lt;/p&gt;</description></item><item><title>Dell Systems Build and Update Utility DVD</title><link>https://remkoweijnen.nl/blog/2009/06/15/dell-systems-build-and-update-utility-dvd/</link><pubDate>Mon, 15 Jun 2009 16:58:17 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2009/06/15/dell-systems-build-and-update-utility-dvd/</guid><description>&lt;p&gt;I was installing Dell Deployment Solution (the Dell branded version of Altiris) and at end of the installation you can choose to add drivers for scripted installed. If you do it asks for the Dell Systems Build and Update Utility DVD in order to install drivers for scripted install:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2009/06/dell1.webp" class="glightbox" data-type="image" data-gallery="post-372"&gt;&lt;img loading="lazy" decoding="async" src="https://remkoweijnen.nl/blog/wp-content/uploads/2009/06/dell1-small.webp" alt="Dell1" height="249" width="215" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I searched on the Dell site for this DVD but the only version I could find was a version of 20-11-2008 (5.5.1 AA00) with the filename OM_5.5.1_SUU_A00.ISO and it is not accepted by the installer:&lt;/p&gt;
&lt;img loading="lazy" decoding="async" src="https://remkoweijnen.nl/blog/wp-content/uploads/2009/06/helpfullerrormsg.webp" alt="HelpfullErrorMsg" height="137" width="163" /&gt;
&lt;p&gt;What a helpfull message ;-)&lt;/p&gt;</description></item><item><title>Delegated Management Console</title><link>https://remkoweijnen.nl/blog/2009/06/12/delegated-management-console/</link><pubDate>Fri, 12 Jun 2009 21:40:20 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2009/06/12/delegated-management-console/</guid><description>&lt;p&gt;In this topic I just want to show(case) you something I created in the past. It is a management console that enables delegated management in a Terminal Server or Citrix environment.&lt;/p&gt;
&lt;p&gt;The console is launched by a small executable that check credentials (based on group membership) and then launches an RDP session with the actual console in it. The logic behind it is that the RDP session runs with an account with delegated permissions in Active Directory and the actual user account that logs in here doesn&amp;rsquo;t have any permissions at all.&lt;/p&gt;
&lt;p&gt;This is the login screen:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2009/06/login.webp" class="glightbox" data-type="image" data-gallery="post-368"&gt;&lt;img loading="lazy" decoding="async" src="https://remkoweijnen.nl/blog/wp-content/uploads/2009/06/login-small.webp" alt="login" height="200" width="215" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;If you&amp;rsquo;ve passed the login screen you enter the Main Console which consists of a Treeview on the left with possible options and a work area on the right:&lt;/p&gt;
&lt;img loading="lazy" decoding="async" src="https://remkoweijnen.nl/blog/wp-content/uploads/2009/06/mainscreen.webp" alt="mainscreen" height="301" width="430" /&gt;</description></item><item><title>Citrix Desktop Switcher</title><link>https://remkoweijnen.nl/blog/2009/06/12/citrix-desktop-switcher/</link><pubDate>Fri, 12 Jun 2009 12:40:09 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2009/06/12/citrix-desktop-switcher/</guid><description>&lt;p&gt;A while ago I wrote a small tool to assist in switching between a Full Screen Citrix Desktop and the local desktop. By default the Citrix client can switch from full screen to windowed mode (with the SHIFT F2 hotkey) but it doesn&amp;rsquo;t minimize the window automatically. So this always requires manually minimizing, do your local work, give focus to the Citrix client again and press the hotkey again to return to full screen.&lt;/p&gt;
&lt;p&gt;My idea was really simply: we write a little exe that runs locally and registers the SHIFT F2 hotkey. When the Hotkey is pressed we determine if we are in full screen or in windowed mode and reverse that. When going from Full Screen to Windowed we minimize the Citrix Client and notify the user (by balloon tip) that he is on the local desktop. I called it the Citrix Desktop Switcher (sorry I couldn&amp;rsquo;t come up with a more original name)&lt;/p&gt;
&lt;p&gt;So let&amp;rsquo;s see it in action!&lt;/p&gt;
&lt;p&gt;When you start the Citrix Desktop Switcher you are notified that the tool is running (it doesn&amp;rsquo;t matter when you start the Switcher, you can start if even if the Citrix Session is already running).&lt;/p&gt;
&lt;img loading="lazy" decoding="async" src="https://remkoweijnen.nl/blog/wp-content/uploads/2009/06/balloon1.webp" alt="Balloon1" height="92" width="221" /&gt;</description></item><item><title>The messaging interface has returned an unknown error</title><link>https://remkoweijnen.nl/blog/2009/06/12/the-messaging-interface-has-returned-an-unknown-error/</link><pubDate>Fri, 12 Jun 2009 12:18:09 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2009/06/12/the-messaging-interface-has-returned-an-unknown-error/</guid><description>&lt;p&gt;Today someone asked questions about a script I wrote back in 2007 to solve a bug in Outlook (2003 but at least Outlook XP has the same issue). If you have access to someone&amp;rsquo;s calendar and want to make a print of it Outlook wants to print it in it&amp;rsquo;s default view which is a combined view on calendar appointments and tasks. However if you do not have permissions to the other persons tasks folder Outlook refuses to print and displays the following error: &lt;strong&gt;The messaging interface has returned an unknown error. If the problem persists, restart Outlook.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;To resolve it you can go to the Calendar | Daily View | Print, then click Page Setup and under Include Options deselect Taskpad. I didn&amp;rsquo;t want to do this for all users that&amp;rsquo;s why I wrote the script.&lt;/p&gt;</description></item><item><title>Modifying Microsoft Updates and/or hotfixes</title><link>https://remkoweijnen.nl/blog/2009/05/12/modifying-microsoft-updates-andor-hotfixes/</link><pubDate>Tue, 12 May 2009 13:53:34 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2009/05/12/modifying-microsoft-updates-andor-hotfixes/</guid><description>&lt;p&gt;As you might know Microsoft distributes updates and hotfixes with in installer, update.exe. When you run update.exe it looks into the supplied .inf files to see what it has to install. It&amp;rsquo;s not possible to make changes to the inf files however because that will invalidate it&amp;rsquo;s signature (and update.exe checks the signature that is stored in an accompanying .cat file).&lt;/p&gt;
&lt;p&gt;In my case I wanted to deploy the &lt;a href="http://www.microsoft.com/Downloads/details.aspx?familyid=F29D348A-78F9-47AD-92EB-632F9621BC84&amp;amp;displaylang=en" target="_blank"&gt;MUI pack for Internet Explorer 7&lt;/a&gt; to be able to support multiple languages. By default this pack installs 35 (!) languages and I wanted to install only Dutch language on top of existing English.&lt;/p&gt;</description></item><item><title>Unable to get System PTE individual lock consumer information error when using !sysptes 4 in WinDbg</title><link>https://remkoweijnen.nl/blog/2009/04/16/unable-to-get-system-pte-individual-lock-consumer-information-error-when-using-sysptes-4-in-windbg/</link><pubDate>Thu, 16 Apr 2009 16:07:07 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2009/04/16/unable-to-get-system-pte-individual-lock-consumer-information-error-when-using-sysptes-4-in-windbg/</guid><description>&lt;p&gt;A few days ago I was troubleshooting some strange problems on a Citrix Server. After some investigation (I will write about that later) it was clear to me that there was a shortage of System Page Table Entries (PTE&amp;rsquo;s). Using perfmon you can see how many free System PTE&amp;rsquo;s are available:&lt;/p&gt;
&lt;img loading="lazy" decoding="async" src="https://remkoweijnen.nl/blog/wp-content/uploads/2009/04/perfcounter.webp" alt="perfcounter" height="212" width="215" /&gt;
&lt;p&gt;Any value below 5000 is not good, values below 2000 are critical. In my case it wasn&amp;rsquo;t possible to view processes with Task Manager anymore.&lt;/p&gt;
&lt;p&gt;Next I used WinDbg and attached to the Kernel (you can do that with File | Kernel Debug | Local | OK) and issued the !vm command:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2009/04/windbg.webp" class="glightbox" data-type="image" data-gallery="post-341"&gt;&lt;img loading="lazy" decoding="async" src="https://remkoweijnen.nl/blog/wp-content/uploads/2009/04/windbg-small.webp" alt="WinDbg" height="342" width="430" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;WinDbg shows us a warning that a lot of PTE allocations have failed, we can also see that there&amp;rsquo;s enough Paged Pool and Non Paged Pool available.&lt;/p&gt;
&lt;p&gt;So how do we find the guilty driver (usually it&amp;rsquo;s a driver)?&lt;/p&gt;</description></item><item><title>SasLibEx updates</title><link>https://remkoweijnen.nl/blog/2009/04/07/saslibex-updates/</link><pubDate>Tue, 07 Apr 2009 08:40:36 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2009/04/07/saslibex-updates/</guid><description>&lt;p&gt;I have found and tested some new functionalities which I will add to &lt;a href="https://remkoweijnen.nl/blog/2009/03/30/sending-ctrl-alt-del-simulate-sas-in-windows-vista/"&gt;SasLibEx&lt;/a&gt;:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Unlocking workstation without entering password&lt;/li&gt;
	&lt;li&gt;Cancel UAC (User Account Control) request&lt;/li&gt;
	&lt;li&gt;fully disable Ctrl-Alt-Del&lt;/li&gt;
	&lt;li&gt;Cancel Ctrl-Alt-Del&lt;/li&gt;
	&lt;li&gt;Switch between secure desktop (where the UAC prompt is) and the normal desktop.&lt;/li&gt;
&lt;/ul&gt;
Some people asked if SasLibEx works on x64 or Windows 7, the answer is yes. I tested on build 7000 of Windows 7 beta and also on Server 2008 x64.
&lt;section class="comments"&gt;
&lt;h2&gt;5 Comments&lt;/h2&gt;
&lt;ol class="comment-list"&gt;
&lt;li class="comment depth-0"&gt;&lt;div class="comment-meta"&gt;&lt;span class="comment-author"&gt;&lt;a href="https://remkoweijnen.nl/blog/2009/03/30/sending-ctrl-alt-del-simulate-sas-in-windows-vista/" rel="nofollow ugc"&gt;Simulate ctrl-alt-del in Windows Vista | RemkoWeijnen.nl&lt;/a&gt;&lt;/span&gt; &lt;time datetime="2009-05-18"&gt;May 18, 2009&lt;/time&gt;&lt;/div&gt;&lt;div class="comment-body"&gt;&lt;p&gt;[...] SasLibEx updates | RemkoWeijnen.nl April 7th, 2009 at 8:41 2 [...]&lt;/p&gt;</description></item><item><title>Sending WM_KEYDOWN or WM_KEYUP</title><link>https://remkoweijnen.nl/blog/2009/03/30/sending-wm_keydown-or-wm_keyup/</link><pubDate>Mon, 30 Mar 2009 22:57:28 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2009/03/30/sending-wm_keydown-or-wm_keyup/</guid><description>&lt;p&gt;If you read the MSDN documentation of &lt;a href="http://msdn.microsoft.com/en-us/library/ms646280(VS.85).aspx" target="_blank"&gt;WM_KEYDOWN&lt;/a&gt; and &lt;a href="http://msdn.microsoft.com/en-us/library/ms646281(VS.85).aspx" target="_blank"&gt;WM_KEYUP&lt;/a&gt; you can see that those message require us to interpret lParam as a bitfield:&lt;/p&gt;
&lt;blockquote&gt;lParam
Specifies the repeat count, scan code, extended-key flag, context code, previous key-state flag, and transition-state flag, as shown in the following table.
&lt;p&gt;0-15&lt;br&gt;
Specifies the repeat count for the current message. The value is the number of times the keystroke is autorepeated as a result of the user holding down the key. The repeat count is always one for a WM_KEYUP message.&lt;br&gt;
16-23&lt;br&gt;
Specifies the scan code. The value depends on the OEM.&lt;br&gt;
24&lt;br&gt;
Specifies whether the key is an extended key, such as the right-hand ALT and CTRL keys that appear on an enhanced 101- or 102-key keyboard. The value is 1 if it is an extended key; otherwise, it is 0.&lt;br&gt;
25-28&lt;br&gt;
Reserved; do not use.&lt;br&gt;
29&lt;br&gt;
Specifies the context code. The value is always 0 for a WM_KEYUP message.&lt;br&gt;
30&lt;br&gt;
Specifies the previous key state. The value is always 1 for a WM_KEYUP message.&lt;br&gt;
31&lt;br&gt;
Specifies the transition state. The value is always 1 for a WM_KEYUP message.&lt;/blockquote&gt;&lt;br&gt;
I was looking for a convenient way to get and read the bits and this is what I made up:&lt;/p&gt;</description></item><item><title>Sending Ctrl-Alt-Del / Simulate SAS in Windows Vista</title><link>https://remkoweijnen.nl/blog/2009/03/30/sending-ctrl-alt-del-simulate-sas-in-windows-vista/</link><pubDate>Mon, 30 Mar 2009 21:51:48 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2009/03/30/sending-ctrl-alt-del-simulate-sas-in-windows-vista/</guid><description>&lt;p&gt;Existing &lt;a href="https://remkoweijnen.nl/blog/2008/12/13/locking-a-workstation-part-1/"&gt;code&lt;/a&gt; to simulate the Secure Attention Sequence (SAS),which most people refer to as control alt delete or ctrl-alt-del, no longer works in Windows Vista. It seems that Microsoft offers a library that exports a function called SimulateSAS(). It is not public and one is supposed to request it by sending a mail to &lt;a href="mailto:saslib@microsoft.com"&gt;&lt;a href="mailto:saslib@microsoft.com"&gt;saslib@microsoft.com&lt;/a&gt;&lt;/a&gt;. Mails to this address remain unanswered though.&lt;/p&gt;</description></item><item><title>Reading physical memory size from the registry</title><link>https://remkoweijnen.nl/blog/2009/03/20/reading-physical-memory-size-from-the-registry/</link><pubDate>Fri, 20 Mar 2009 13:15:46 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2009/03/20/reading-physical-memory-size-from-the-registry/</guid><description>&lt;p&gt;I&amp;rsquo;m working on a new build of &lt;a href="https://remkoweijnen.nl/blog/2009/02/20/tsadminex-beta-release/"&gt;TSAdminEx&lt;/a&gt; for which I need to query the total amount of physical memory. Locally we can use the &lt;a href="http://msdn.microsoft.com/en-us/library/aa366589(VS.85).aspx" target="_blank"&gt;GlobalMemoryStatusEx&lt;/a&gt; API but there&amp;rsquo;s no API to do this remotely. It would be possible using WMI but I decided not to use that because I dislike it because of it&amp;rsquo;s slowness and I need support for older OS versions which might not have WMI.&lt;/p&gt;
&lt;p&gt;So I found in the registry the following key:&lt;/p&gt;
&lt;blockquote&gt;HKLM\HARDWARE\RESOURCEMAP\System Resources\Physical Memory&lt;/blockquote&gt;
It has a value .Translated of type RES_RESOURCE_LIST which seems undocumented besides stating that it exists. Regedit knows how to handle it though. If you doubleclick on the key you will see something like this:</description></item><item><title>Preventing Domain Group Policies from Applying</title><link>https://remkoweijnen.nl/blog/2009/02/25/preventing-domain-group-policies-from-applying/</link><pubDate>Wed, 25 Feb 2009 13:31:11 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2009/02/25/preventing-domain-group-policies-from-applying/</guid><description>&lt;p&gt;I was just researching a little on how Group Policies are applied in Windows Vista. The client processing is actually done by the Group Policy Client Service. So can a user prevent Domain Policies from being applied by stopping this service?&lt;/p&gt;
&lt;p&gt;If you go to the service properties you can see that even a local administrator cannot stop or disable the service:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2009/02/gpsvc.webp" class="glightbox" data-type="image" data-gallery="post-325"&gt;&lt;img loading="lazy" decoding="async" src="https://remkoweijnen.nl/blog/wp-content/uploads/2009/02/gpsvc-small.webp" alt="gpsvc" height="240" width="215" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The description says: &amp;ldquo;The service is responsible for applying settings configured by administrators for the computer and users through the Group Policy component. &lt;em&gt;If the service is stopped or disabled, the settings will not be applied and applications and components will not be manageable through Group Policy&lt;/em&gt;. Any components or applications that depend on the Group Policy component might not be functional if the service is stopped or disabled.&amp;rdquo;&lt;/p&gt;
&lt;p&gt;That sounds good! Let&amp;rsquo;s try it&amp;hellip;&lt;/p&gt;</description></item><item><title>TSAdminEx Features Part 3</title><link>https://remkoweijnen.nl/blog/2009/02/25/tsadminex-features-part-3/</link><pubDate>Wed, 25 Feb 2009 13:08:31 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2009/02/25/tsadminex-features-part-3/</guid><description>&lt;table border="0" cellpadding="3" cellspacing="3" width="100%"&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://remkoweijnen.nl/blog/2009/02/20/tsadminex-beta-release/"&gt;Beta Release&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&lt;a href="https://remkoweijnen.nl/blog/2009/02/23/tsadminex-features-part-1/"&gt;Part 1&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&lt;a href="https://remkoweijnen.nl/blog/2009/02/24/tsadminex-features-part-2/"&gt;Part 2&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&amp;nbsp;&lt;/td&gt;
&lt;td&gt;&amp;nbsp;&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;
This is part 3 of the TSAdminEx Features series. Today I will discuss the Process View. As usual we will start by comparing TSAdmin to TSAdminEx again. So let's look at TSAdmin Process View:
&lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2009/02/tsadminprocess.webp" class="glightbox" data-type="image" data-gallery="post-320"&gt;&lt;img loading="lazy" decoding="async" src="https://remkoweijnen.nl/blog/wp-content/uploads/2009/02/tsadminprocess-small.webp" alt="TSAdminProcess" height="279" width="430" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;And the one from TSAdminEx:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2009/02/tsadminexprocessview.webp" class="glightbox" data-type="image" data-gallery="post-320"&gt;&lt;img loading="lazy" decoding="async" src="https://remkoweijnen.nl/blog/wp-content/uploads/2009/02/tsadminexprocessview-small.webp" alt="TSAdminExProcessView" height="182" width="430" /&gt;&lt;/a&gt;&lt;/p&gt;</description></item><item><title>TSAdminEx Features Part 2</title><link>https://remkoweijnen.nl/blog/2009/02/24/tsadminex-features-part-2/</link><pubDate>Tue, 24 Feb 2009 10:17:07 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2009/02/24/tsadminex-features-part-2/</guid><description>&lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/2009/02/23/tsadminex-features-part-1"&gt;Part1&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Now that a &lt;a href="https://remkoweijnen.nl/blog/2009/02/20/tsadminex-beta-release/"&gt;TSAdminEx beta is ready&lt;/a&gt; I will be showing you some features. In this part I will show the Sessions View.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s start again with a compare of TSAdmin and TSAdminEx:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2009/02/tsadminsessionview.webp" class="glightbox" data-type="image" data-gallery="post-290"&gt;&lt;img loading="lazy" decoding="async" src="https://remkoweijnen.nl/blog/wp-content/uploads/2009/02/tsadminsessionview-small.webp" alt="TSAdminSessionView" height="177" width="430" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2009/02/tsadminexsessionview.webp" class="glightbox" data-type="image" data-gallery="post-290"&gt;&lt;img loading="lazy" decoding="async" src="https://remkoweijnen.nl/blog/wp-content/uploads/2009/02/tsadminexsessionview-small.webp" alt="TSAdminExSessionView" height="135" width="430" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;As you can see TSAdminEx shows more details, it shows the following extra columns:&lt;/p&gt;</description></item><item><title>TSAdminEx Features Part 1</title><link>https://remkoweijnen.nl/blog/2009/02/23/tsadminex-features-part-1/</link><pubDate>Mon, 23 Feb 2009 16:18:28 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2009/02/23/tsadminex-features-part-1/</guid><description>&lt;p align="right"&gt;&lt;a href="https://remkoweijnen.nl/blog/2009/02/24/tsadminex-features-part-2/"&gt;Part 2&lt;/a&gt;&lt;/p&gt;
Now that a &lt;a href="https://remkoweijnen.nl/blog/2009/02/20/tsadminex-beta-release/" target="_blank"&gt;TSAdminEx beta is ready&lt;/a&gt; I will be showing you some features. In this part 1 I will be comparing the Users view to TSAdmin.
&lt;p&gt;Let&amp;rsquo;s start TSAdmin, this tool is present by default on Windows 2003. If you use Windows XP or Windows Vista you can get it by installing the &lt;a href="http://www.petri.co.il/download_windows_2003_r2_adminpak.htm" target="_blank"&gt;Administration Pack&lt;/a&gt;. Please note that TSAdmin does not work on Vista RTM due to a &lt;a href="https://remkoweijnen.nl/blog/2007/12/19/why-tsadmin-crashes-on-windows-vista/" target="_blank"&gt;bug&lt;/a&gt; that was &lt;a href="https://remkoweijnen.nl/blog/2008/03/02/vista-sp1-changes-to-terminal-server-api/" target="_blank"&gt;corrected in Vista SP1&lt;/a&gt; (TSAdminEx works fine on both RTM as well as SP1)&lt;/p&gt;
&lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2009/02/tsadmin1.webp" class="glightbox" data-type="image" data-gallery="post-264"&gt;&lt;img loading="lazy" decoding="async" src="https://remkoweijnen.nl/blog/wp-content/uploads/2009/02/tsadmin1-small.webp" alt="TSAdmin1" height="159" width="430" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Now let&amp;rsquo;s open TSAdminEx and start comparing&amp;hellip;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2009/02/tsadminex1.webp" class="glightbox" data-type="image" data-gallery="post-264"&gt;&lt;img loading="lazy" decoding="async" src="https://remkoweijnen.nl/blog/wp-content/uploads/2009/02/tsadminex1-small.webp" alt="TSAdminEx1" height="156" width="430" /&gt;&lt;/a&gt;&lt;/p&gt;</description></item><item><title>TSAdminEx Beta release</title><link>https://remkoweijnen.nl/blog/2009/02/20/tsadminex-beta-release/</link><pubDate>Fri, 20 Feb 2009 17:59:06 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2009/02/20/tsadminex-beta-release/</guid><description>&lt;p&gt;Over the last months I have been working hard on TSAdminEx and now, finally, I can now present a first beta release.&lt;/p&gt;
&lt;p&gt;If you don&amp;rsquo;t know what TSAdminEx is let me briefly introduce it. TSAdminEx is a tool that combines functionality of several existing tools: it has the power of task manager combined with the details of Process Explorer and the Terminal Server support of TSAdmin. On top of that it fully supports remote systems out of the box without installing any agents or services. It also has some unique features that neither of the mentioned tools can do!&lt;/p&gt;
&lt;p&gt;Several new features have been implemented since the &lt;a href="https://remkoweijnen.nl/blog/2008/01/27/test-2/" target="_blank"&gt;last time I talked about TSAdminEx&lt;/a&gt; and I will show you the most exciting ones here:&lt;/p&gt;</description></item><item><title>Accessing kernel objects in other sessions part 2</title><link>https://remkoweijnen.nl/blog/2009/02/03/accessing-kernel-objects-in-other-sessions-part-2/</link><pubDate>Tue, 03 Feb 2009 14:36:53 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2009/02/03/accessing-kernel-objects-in-other-sessions-part-2/</guid><description>&lt;p&gt;In &lt;a href="https://remkoweijnen.nl/blog/2009/01/27/accessing-kernel-objects-in-other-sessions/"&gt;part 1&lt;/a&gt; I showed how to create and open objects in Terminal Server Sessions. However, these are not all of the possible places where you can place objects via documented kernel32.dll functions.&lt;/p&gt;
&lt;p&gt;If we look into Winobj again, we notice, that every &lt;strong&gt;BaseNamedObjects&lt;/strong&gt; directory has a subdirectory named &lt;strong&gt;Restricted&lt;/strong&gt;. To be honest, I do not know why it&amp;rsquo;s created; it&amp;rsquo;s security allows object creation for &lt;em&gt;LocalSystem&lt;/em&gt; and &lt;em&gt;RESTRICTED&lt;/em&gt; special user (in windows 2000, &lt;em&gt;Everyone&lt;/em&gt; can also create objects in it). So, we can use it as prefix for object creation, for example, &lt;strong&gt;Restricted\MyAppEvent&lt;/strong&gt;: &lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2009/02/restrictedobject.gif" class="glightbox" data-type="image" data-gallery="post-242"&gt;&lt;img loading="lazy" decoding="async" src="https://remkoweijnen.nl/blog/wp-content/uploads/2009/02/restrictedobject-small.gif" alt="RestrictedObject" height="291" width="430" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Of course, you can still use &lt;strong&gt;Global&lt;/strong&gt;, &lt;strong&gt;Local&lt;/strong&gt;, or &lt;strong&gt;Session&lt;/strong&gt; links&lt;/p&gt;</description></item><item><title>Accessing kernel objects in other sessions part 1</title><link>https://remkoweijnen.nl/blog/2009/01/27/accessing-kernel-objects-in-other-sessions/</link><pubDate>Tue, 27 Jan 2009 19:43:52 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2009/01/27/accessing-kernel-objects-in-other-sessions/</guid><description>&lt;p&gt;As you know, many &lt;em&gt;kernel32.dll&lt;/em&gt; functions, which are working with named objects, like &lt;em&gt;OpenEvent&lt;/em&gt;, can be used to work with global and local objects. So what are global and local objects? Global objects are created in session 0 and are actually located in the &lt;strong&gt;\BaseNamedObjects&lt;/strong&gt; directory, while local objects are created in the caller&amp;rsquo;s session (for example in the &lt;strong&gt;\Sessions\5\BaseNamedObjects&lt;/strong&gt; directory (for session 0, global and local has no meaning since they point to the same object)). MSDN says that you can access only the objects in your own session(via the &lt;strong&gt;Local&amp;lt;/strong&amp;gt; prefix) and in session 0 (via the &lt;strong&gt;Global&amp;lt;/strong&amp;gt; prefix). But what if you need to access an object in another session?&lt;/p&gt;</description></item><item><title>Windows XP x64 Terminal Server Patch part 2 (optional)</title><link>https://remkoweijnen.nl/blog/2009/01/16/windows-xp-x64-terminal-server-patch-part-2-optional/</link><pubDate>Fri, 16 Jan 2009 00:32:05 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2009/01/16/windows-xp-x64-terminal-server-patch-part-2-optional/</guid><description>&lt;p&gt;In &lt;a href="https://remkoweijnen.nl/blog/2008/12/19/windows-xp-x64-terminal-server-patch-part-1-mandatory/"&gt;part 1&lt;/a&gt; I&amp;rsquo;ve showed how to get rid of some terminal server restrictions on Windows xp x64. But there are still some problems:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;You cannot connect to the &lt;font color="#0080ff"&gt;localhost&lt;/font&gt; (&lt;font color="#0080ff"&gt;127.0.0.1&lt;/font&gt;) (but can to &lt;em&gt;127.a.b.c&lt;/em&gt;, where a,b,c in [0..255] (except &lt;font color="#0080ff"&gt;127.0.0.0&lt;/font&gt; and &lt;font color="#0080ff"&gt;127.255.255.255&lt;/font&gt;)).&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;When you&amp;rsquo;re connecting to remote server, Remote Desktop Connection (mstsc.exe) checks through mtscax.dll that you&amp;rsquo;re connecting to your own address, connections are only allowed and you&amp;rsquo;re in the server mode. If this is not true, the connection is denied, usually with this message: &lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2009/01/consolefailed.gif" class="glightbox" data-type="image" data-gallery="post-224"&gt;&lt;img loading="lazy" decoding="async" src="https://remkoweijnen.nl/blog/wp-content/uploads/2009/01/consolefailed-small.gif" alt="ConsoleFailed" height="22" width="130" /&gt;&lt;/a&gt;. The logic of checking is the same: call &lt;font color="blue"&gt;gethostbyname&lt;/font&gt; for server name and check if it&amp;rsquo;s not equal to &lt;font color="#0080ff"&gt;127.0.0.1&lt;/font&gt;.&lt;/p&gt;</description></item><item><title>Download for Tech-Track #1</title><link>https://remkoweijnen.nl/blog/2009/01/08/download-for-tech-track-1/</link><pubDate>Thu, 08 Jan 2009 15:52:50 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2009/01/08/download-for-tech-track-1/</guid><description>&lt;p&gt;Iedereen bedankt voor de deelname!&lt;/p&gt;
&lt;p&gt;De download bevat de presentaties (inclusief de ontbrekende slides), de spy++ tool en links naar de Toolkit.&lt;/p&gt;
&lt;p&gt;&lt;a class="download" href="https://remkoweijnen.nl/blog/files/TechTrack1.zip"&gt;TechTrack1.zip&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Locking a workstation - part 2</title><link>https://remkoweijnen.nl/blog/2008/12/23/locking-a-workstation-part-2/</link><pubDate>Tue, 23 Dec 2008 17:13:37 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2008/12/23/locking-a-workstation-part-2/</guid><description>&lt;p&gt;In &lt;a href="https://remkoweijnen.nl/blog/2008/12/13/locking-a-workstation-part-1/"&gt;part 1&lt;/a&gt; I showed how &lt;em&gt;winlogon.exe&lt;/em&gt; registers its process and main window handle.&lt;/p&gt;
&lt;p&gt;In the &lt;em&gt;SasCreate&lt;/em&gt; function, winlogon.exe registers hotkeys like this:&lt;/p&gt;
&lt;div class="codecard"&gt;
 &lt;div class="codehead"&gt;
 &lt;span class="codefile"&gt;&lt;/span&gt;
 &lt;span class="codetools" data-pagefind-ignore&gt;
 &lt;span class="codelang"&gt;objectpascal&lt;/span&gt;
 &lt;button class="codebtn" type="button" data-copy&gt;Copy&lt;/button&gt;
 &lt;a class="codebtn" download=".pas" href="data:text/plain;charset=utf-8;base64,Y29uc3QKICBNT0RfU0FTID0gJDgwMDA7CgogIFJlZ2lzdGVySG90S2V5KFNhc1dpbmRvdywgMCwgTU9EX1NBUyBvciBNT0RfQ09OVFJPTCBvciBNT0RfQUxULCBWS19ERUxFVEUpOwoKeyRJRkRFRiBDSEVDS0VEX0JVSUxEfQogIFJlZ2lzdGVySG90S2V5KFNhc1dpbmRvdywgMSwgTU9EX0FMVCBvciBNT0RfQ09OVFJPTCBvciBNT0RfU0hJRlQsIFZLX0RFTEVURSk7IC8vIGhhbmRsZXIganVzdCBjYWxscyBOdFNodXRkb3duU3lzdGVtCiAgaWYgRW5hYmxlRGVza3RvcFN3aXRjaGluZyB0aGVuCiAgICBSZWdpc3RlckhvdEtleShTYXNXaW5kb3csIDIsIE1PRF9BTFQgb3IgTU9EX0NPTlRST0wsIFZLX1RBQik7IC8vIGhhbmRsZXIgc3dpdGNoZXMgZGVmYXVsdCBhbmQgd2lubG9nb24gZGVza3RvcHMKICBpZiBXaW5sb2dvbkluZm9MZXZlbEZsYWcgdGhlbgogICAgUmVnaXN0ZXJIb3RrZXkoU2FzV2luZG93LCAzLCBNT0RfQUxUIG9yIE1PRF9DT05UUk9MIG9yIE1PRF9TSElGVCwgVktfVEFCKTsgLy8gaGFuZGxlciBqdXN0IGNhbGxzIERlYnVnQnJlYWsKeyRFTkRJRn0KCiAgUmVnaXN0ZXJIb3RLZXkoU2FzV2luZG93LCA0LCBNT0RfQ09OVFJPTCBvciBNT0RfU0hJRlQsIFZLX0VTQ0FQRSk7IC8vIGhhbmRsZXIgZXhlY3V0ZXMgdGFzayBtYW5hZ2VyCnskSUZERUYgV0lOWFBfT1JfTEFURVJ9CiAgUmVnaXN0ZXJIb3RLZXkoU2FzV2luZG93LCA1LCBNT0RfV0lOLCBCeXRlKCdMJyk7IC8vIGhhbmRsZXIgbG9ja3MgdGhlIHdvcmtzdGF0aW9uCiAgUmVnaXN0ZXJIb3RrZXkoU2FzV2luZG93LCA2LCBNT0RfV0lOLCBCeXRlKCdVJyk7IC8vIGhhbmRsZXIgZXhlY3V0ZXMgdXRpbG1hbiBvbiBjdXJyZW50IGRlc2t0b3AKeyRFTkRJRn0="&gt;Download&lt;/a&gt;
 &lt;/span&gt;
 &lt;/div&gt;
 &lt;div class="codebody"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-objectpascal" data-lang="objectpascal"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="kr"&gt;const&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;MOD_SAS&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mh"&gt;$8000&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;RegisterHotKey&lt;span class="o"&gt;(&lt;/span&gt;SasWindow&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;MOD_SAS&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kr"&gt;or&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;MOD_CONTROL&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kr"&gt;or&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;MOD_ALT&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;VK_DELETE&lt;span class="o"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="cp"&gt;{$IFDEF CHECKED_BUILD}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;RegisterHotKey&lt;span class="o"&gt;(&lt;/span&gt;SasWindow&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;MOD_ALT&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kr"&gt;or&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;MOD_CONTROL&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kr"&gt;or&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;MOD_SHIFT&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;VK_DELETE&lt;span class="o"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="c1"&gt;// handler just calls NtShutdownSystem&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kr"&gt;if&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;EnableDesktopSwitching&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kr"&gt;then&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;RegisterHotKey&lt;span class="o"&gt;(&lt;/span&gt;SasWindow&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;MOD_ALT&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kr"&gt;or&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;MOD_CONTROL&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;VK_TAB&lt;span class="o"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="c1"&gt;// handler switches default and winlogon desktops&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kr"&gt;if&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;WinlogonInfoLevelFlag&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kr"&gt;then&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;RegisterHotkey&lt;span class="o"&gt;(&lt;/span&gt;SasWindow&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;MOD_ALT&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kr"&gt;or&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;MOD_CONTROL&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kr"&gt;or&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;MOD_SHIFT&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;VK_TAB&lt;span class="o"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="c1"&gt;// handler just calls DebugBreak&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="cp"&gt;{$ENDIF}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;RegisterHotKey&lt;span class="o"&gt;(&lt;/span&gt;SasWindow&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;MOD_CONTROL&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kr"&gt;or&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;MOD_SHIFT&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;VK_ESCAPE&lt;span class="o"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="c1"&gt;// handler executes task manager&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="cp"&gt;{$IFDEF WINXP_OR_LATER}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;RegisterHotKey&lt;span class="o"&gt;(&lt;/span&gt;SasWindow&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;MOD_WIN&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;Byte&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s"&gt;&amp;#39;L&amp;#39;&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="c1"&gt;// handler locks the workstation&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;RegisterHotkey&lt;span class="o"&gt;(&lt;/span&gt;SasWindow&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;6&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;MOD_WIN&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;Byte&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s"&gt;&amp;#39;U&amp;#39;&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="c1"&gt;// handler executes utilman on current desktop&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="cp"&gt;{$ENDIF}&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Did you notice the MOD_SAS constant?&lt;/p&gt;</description></item><item><title>Windows XP X64 Terminal Server patch part 1 (mandatory)</title><link>https://remkoweijnen.nl/blog/2008/12/19/windows-xp-x64-terminal-server-patch-part-1-mandatory/</link><pubDate>Fri, 19 Dec 2008 13:58:17 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2008/12/19/windows-xp-x64-terminal-server-patch-part-1-mandatory/</guid><description>&lt;p&gt;Windows XP X64 shares the same binaries with Windows 2003 X64, but Terminal Server has some restrictions on XP. This article shows you how to get rid of them and is based on cw2k ideas from the original Windows XP Terminal Server patch.&lt;/p&gt;
&lt;p&gt;&lt;font color="brown"&gt;Version 1.1 contains bug#1 fix and is smaller (less bytes are changed).&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;1) &lt;strong&gt;Winlogon.exe&lt;/strong&gt; contains a function, called &lt;font color="blue"&gt;EnumerateMatchingUsers&lt;/font&gt; which in turn calls &lt;font color="blue"&gt;IsProfessionalTerminalServer&lt;/font&gt; function. We need to patch this function to return zero (false):&lt;/p&gt;
&lt;p width="100%" style="border: 3px double #808080; overflow-x: scroll; white-space: nowrap; font-family: monospace"&gt; .text:0000000100042F77 IsProfessionalTerminalServer proc near &lt;span style="color: green"&gt;; CODE XREF: EnumerateMatchingUsers:loc_10002B44Bp&lt;/span&gt;&lt;span style="color: black"&gt;
.text:0000000100042F77 &lt;/span&gt; &lt;span style="color: #8080ff"&gt;; DATA XREF: .pdata:00000001000D01DCo ...&lt;/span&gt;&lt;span style="color: black"&gt;
.text:0000000100042F77&lt;/span&gt;&lt;span style="color: black"&gt;
.text:0000000100042F77 &lt;/span&gt; &lt;span style="color: green"&gt;VersionInformation&lt;/span&gt;&lt;span style="color: navy"&gt;= _OSVERSIONINFOW ptr&lt;/span&gt; &lt;span style="color: #008040"&gt;-138h&lt;/span&gt;&lt;span style="color: black"&gt;
.text:0000000100042F77 &lt;/span&gt; &lt;span style="color: green"&gt;var_20&lt;/span&gt; &lt;span style="color: navy"&gt;= word ptr&lt;/span&gt; &lt;span style="color: #008040"&gt;-20h&lt;/span&gt;&lt;span style="color: black"&gt;
.text:0000000100042F77 &lt;/span&gt; &lt;span style="color: green"&gt;var_ 1E&lt;/span&gt; &lt;span style="color: navy"&gt;= byte ptr&lt;/span&gt; &lt;span style="color: #008040"&gt;-1Eh&lt;/span&gt;&lt;span style="color: black"&gt;
.text:0000000100042F77 &lt;/span&gt; &lt;span style="color: green"&gt;var_18&lt;/span&gt; &lt;span style="color: navy"&gt;= qword ptr&lt;/span&gt; &lt;span style="color: #008040"&gt;-18h&lt;/span&gt;&lt;span style="color: black"&gt;
.text:0000000100042F77&lt;/span&gt;
&lt;span style="background: white none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: blue"&gt;&lt;span style="color: black"&gt;.text:0000000100042F77&lt;/span&gt; 48 81 EC 58 01 00 00 &lt;span style="color: navy"&gt;sub rsp&lt;/span&gt;&lt;span style="color: navy"&gt;,&lt;/span&gt; &lt;span style="color: green"&gt;158h &lt;font color="red"&gt;=&amp;gt; 31 C0 C3 xor eax, eax; retn&lt;/font&gt;&lt;/span&gt;
&lt;span style="color: black"&gt;.text:0000000100042F7E&lt;/span&gt; 48 8B 05 F3 3A 08 00 &lt;span style="color: navy"&gt;mov rax&lt;/span&gt;&lt;span style="color: navy"&gt;, cs:&lt;/span&gt;__security_cookie
&lt;span style="color: black"&gt;.text:0000000100042F85&lt;/span&gt; 48 89 84 24 40 01 00 00 &lt;span style="color: navy"&gt;mov [rsp+&lt;/span&gt;&lt;span style="color: green"&gt;158h&lt;/span&gt;&lt;span style="color: navy"&gt;+&lt;/span&gt;&lt;span style="color: green"&gt;var_18&lt;/span&gt;&lt;span style="color: navy"&gt;]&lt;/span&gt;&lt;span style="color: navy"&gt;, rax&lt;/span&gt;
&lt;span style="color: black"&gt;.text:0000000100042F8D&lt;/span&gt; 48 8D 4C 24 20 &lt;span style="color: navy"&gt;lea rcx&lt;/span&gt;&lt;span style="color: navy"&gt;, [rsp+&lt;/span&gt;&lt;span style="color: green"&gt;158h&lt;/span&gt;&lt;span style="color: navy"&gt;+&lt;/span&gt;&lt;span style="color: green"&gt;VersionInformation&lt;/span&gt;&lt;span style="color: navy"&gt;]&lt;/span&gt; ; void *
&lt;span style="color: black"&gt;.text:0000000100042F92&lt;/span&gt; 33 D2 &lt;span style="color: navy"&gt;xor edx&lt;/span&gt;&lt;span style="color: navy"&gt;, edx&lt;/span&gt; ; int&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;</description></item><item><title>Globally disable Flash Player autoupdate</title><link>https://remkoweijnen.nl/blog/2008/12/19/globally-disable-flash-player-autoupdate/</link><pubDate>Fri, 19 Dec 2008 09:06:16 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2008/12/19/globally-disable-flash-player-autoupdate/</guid><description>&lt;p&gt;On a Citrix or Terminal Server you will want to disable autoupdate notifications of the flash player.&lt;/p&gt;
&lt;p&gt;This can be done by creating a file mm.cfg in the folder where the flash ActiveX control is installed (normally C:\Windows\System32\Macromed\Flash).&lt;/p&gt;
&lt;p&gt;Place the following line in this file (with a text editor like Notepad):&lt;/p&gt;</description></item><item><title>Locking a workstation - part 1</title><link>https://remkoweijnen.nl/blog/2008/12/13/locking-a-workstation-part-1/</link><pubDate>Sat, 13 Dec 2008 23:13:08 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2008/12/13/locking-a-workstation-part-1/</guid><description>&lt;p&gt;Win32 API provides only 1 function for locking workstation, named &lt;strong&gt;LockWorkstation&lt;/strong&gt;. What does it do and how we can use it?&lt;/p&gt;
&lt;p&gt;When a new session is started, &lt;em&gt;smss.exe&lt;/em&gt; invokes &lt;em&gt;winlogon.exe&lt;/em&gt;. It registers its process id in &lt;em&gt;win32k.sys&lt;/em&gt; by calling &lt;strong&gt;RegisterLogonProcess&lt;/strong&gt;. It has this prototype:&lt;/p&gt;</description></item><item><title>Converting a volume name to a device name</title><link>https://remkoweijnen.nl/blog/2008/12/10/converting-a-volume-name-to-a-device-name/</link><pubDate>Wed, 10 Dec 2008 15:41:42 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2008/12/10/converting-a-volume-name-to-a-device-name/</guid><description>&lt;p&gt;Windows has a couple of different formats for volume names but it is unclear how to convert a Volumename (example: \?\Volume{GUID}) to a DeviceName (example: \Device\HarddiskVolume1).&lt;/p&gt;
&lt;p&gt;I found at that you can use the QueryDosDevice function but you need to remove the preceeding \?\ and the trailing \ of the VolumeName:&lt;/p&gt;</description></item><item><title>Commandline tool to change drive letter assignment</title><link>https://remkoweijnen.nl/blog/2008/12/09/commandline-tool-to-change-drive-letter-assignment/</link><pubDate>Tue, 09 Dec 2008 15:13:27 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2008/12/09/commandline-tool-to-change-drive-letter-assignment/</guid><description>&lt;p&gt;One of the side effects of using sysprep to prepare an image is that drive letter assignments are reset to default. This behaviour is documented in a &lt;a href="http://support.microsoft.com/kb/928386" target="_blank"&gt;knowledge base article&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;I previously solved this by running a diskpart script but that needed a custom script for each system (if the disk or partition order differs the script needed to be adjusted). So I needed to run a restore with sysprep determine the drive layout after sysprep, change the script, test by restoring again. So I wrote a commandline tool that can change a drive letter assignment based on the volume label.&lt;/p&gt;</description></item><item><title>Windows 2003 X64 Terminal Server Patch</title><link>https://remkoweijnen.nl/blog/2008/12/09/windows-2003-x64-terminal-server-patch/</link><pubDate>Tue, 09 Dec 2008 13:53:39 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2008/12/09/windows-2003-x64-terminal-server-patch/</guid><description>&lt;p&gt;A while ago I published a &lt;a href="https://remkoweijnen.nl/blog/2008/08/31/patch-windows-2003-terminal-server-to-allow-more-than-2-concurrent-sessions/"&gt;patch for Windows 2003 Terminal Server&lt;/a&gt; that allows more than 2 concurrent sessions in Remote Administration mode.&lt;/p&gt;
&lt;p&gt;Today I publish the same patch but for Windows Server 2003 X64. The patched function (CRAPolicy::Logon) is the same as in the original patch.&lt;/p&gt;</description></item><item><title>New Universal Patch Method</title><link>https://remkoweijnen.nl/blog/2008/12/09/new-universal-patch-method/</link><pubDate>Tue, 09 Dec 2008 12:50:23 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2008/12/09/new-universal-patch-method/</guid><description>&lt;p&gt;Up until now I used &lt;a href="http://www.tibed.net/vpatch/" target="_blank"&gt;VPatch&lt;/a&gt; for all my patches. The disadvantage of VPatch is that it uses strict MD5 hash checks. This means that a patch can only be applied to &lt;strong&gt;exactly&lt;/strong&gt; the same file the patch was based on (exact same build and language).&lt;/p&gt;
&lt;p&gt;Because many people are asking for patches for other builds and languages I decided to move over to another patch mechanism. This will use search &amp;amp; replace on specific Hex bytes.&lt;/p&gt;
&lt;p&gt;The consequence is that patching another build or language version is possible. However there is no absolute certaintity that the patch will work on other builds or languages. Ofcourse the patcher will only patch if the specific bytes were found which is safer than patching an offset.&lt;/p&gt;
&lt;p&gt;It&amp;rsquo;s up to the user to carefully test the patched file and hopefully report back to me if it&amp;rsquo;s working.&lt;/p&gt;
&lt;p&gt;Now I will describe how to use this universal patcher.&lt;/p&gt;</description></item><item><title>Executing a Fast User Switch programmatically - part 2</title><link>https://remkoweijnen.nl/blog/2008/11/26/executing-a-fast-user-switch-programmatically-part-2/</link><pubDate>Wed, 26 Nov 2008 16:45:46 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2008/11/26/executing-a-fast-user-switch-programmatically-part-2/</guid><description>&lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/2008/11/26/executing-a-fast-user-switch-programmatically-part-1/"&gt;Part1&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s write our own Credential Server implementation.&lt;/p&gt;
&lt;p&gt;At first, we need to create a named pipe with a unique name. Let&amp;rsquo;s construct the pipe name using a GUID - this should be unique, but we can do it in a cycle to be absolutely sure:&lt;/p&gt;</description></item><item><title>Executing a Fast User Switch programmatically - part 1</title><link>https://remkoweijnen.nl/blog/2008/11/26/executing-a-fast-user-switch-programmatically-part-1/</link><pubDate>Wed, 26 Nov 2008 15:23:37 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2008/11/26/executing-a-fast-user-switch-programmatically-part-1/</guid><description>&lt;p&gt;I think many of you have got experience with multiple Terminal Server Sessions in windows XP, also called Fast User Switching (FUS). Let&amp;rsquo;s get inside this cool feature.&lt;/p&gt;
&lt;p&gt;How does FUS work? Each session has its own winlogon.exe. It draws the &lt;strong&gt;same&lt;/strong&gt; interface which looks like the screenshot below:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2008/11/default.webp"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p align="center"&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2008/12/multiple-users-logged-on-2.webp" class="glightbox" data-type="image" data-gallery="post-149"&gt;&lt;img loading="lazy" decoding="async" src="https://remkoweijnen.nl/blog/wp-content/uploads/2008/12/multiple-users-logged-on-2-small.webp" alt="multiple-users-logged-on" height="320" width="430" /&gt;&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Terminal Server Internals</title><link>https://remkoweijnen.nl/blog/2008/11/19/terminal-server-internals/</link><pubDate>Wed, 19 Nov 2008 17:55:39 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2008/11/19/terminal-server-internals/</guid><description>&lt;p&gt;Hello, my name is Danila Galimov and i will write here sometimes :-)&lt;/p&gt;
&lt;p&gt;My first post is about communications between Terminal Server sessions and Terminal Server service process (termsrv.exe/dll). Terminal Server service needs to communicate with each session for many tasks, such as sending window message, getting message reply and so on. So, on init, Terminal Server creates a &lt;strong&gt;SmSsWinStationApiPort&lt;/strong&gt; port in global namespace and runs a few WinStationLpcThread threads, which are listening on port and are used to process port messages. When csrss.exe is started, it parses its command line, which usually looks like:&lt;/p&gt;
&lt;blockquote&gt;%SystemRoot%\system32\csrss.exe ObjectDirectory=\Windows SharedSection=4096,4096,1024 Windows=On SubSystemType=Windows ServerDll=basesrv,1 ServerDll=&lt;strong&gt;winsrv&lt;/strong&gt;&lt;em&gt;:UserServerDllInitialization,3 ServerDll&lt;/em&gt;=winsrv:&lt;em&gt;ConServerDllInitialization,2 ProfileControl=Off MaxRequestThreads=16&lt;/em&gt;&lt;/blockquote&gt;
and loads the required dlls (winsrv.dll in our case). Initialization of winsrv.dll creates a thread, which connects to &lt;strong&gt;SmSsWinStationApiPort&lt;/strong&gt; port and does the loop for processing Terminal Server messages until it receives WinStationTerminate message.
&lt;p&gt;We&amp;rsquo;ll try to fool Terminal Server&lt;/p&gt;</description></item><item><title>Switch between Java Versions</title><link>https://remkoweijnen.nl/blog/2008/11/12/switch-between-java-versions/</link><pubDate>Wed, 12 Nov 2008 16:37:52 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2008/11/12/switch-between-java-versions/</guid><description>&lt;p&gt;On a Citrix environment 2 different applications were required. One of the applications required java version 1.5 (and didn&amp;rsquo;t work with 1.6) and the other application needed specifically version 1.6.&lt;/p&gt;
&lt;p&gt;Because the applications are installed on a Citrix server the users do not have write permissions to HKEY_LOCAL_MACHINE so that was another complication.&lt;/p&gt;
&lt;p&gt;After a lot of monitoring with process monitor the general process of how a particular Java version loads in Internet Explorer became clear to me.&lt;/p&gt;
&lt;p&gt;Java adds an addon to IE called ssv.dll, you can see this trough Tools | Manage Add-ons | Enable or Disable Add-ons:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2008/11/addons-3.webp" class="glightbox" data-type="image" data-gallery="post-135"&gt;&lt;img loading="lazy" decoding="async" src="https://remkoweijnen.nl/blog/wp-content/uploads/2008/11/addons-3-small.webp" alt="AddOns" width="450" height="81" /&gt;&lt;/a&gt;&lt;/p&gt;</description></item><item><title>RDP Session with Local Taskbar visible</title><link>https://remkoweijnen.nl/blog/2008/11/02/rdp-session-with-local-taskbar-visible/</link><pubDate>Sun, 02 Nov 2008 08:16:42 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2008/11/02/rdp-session-with-local-taskbar-visible/</guid><description>&lt;p&gt;I usually have lots of Terminal Server sessions open when I&amp;rsquo;m working, both direct sessions but also &amp;ldquo;sessions in sessions&amp;rdquo;. In order to keep overview on my desktop I prefer to make the session size as big as possible without being full screen (so keep my local taskbar visible).&lt;/p&gt;
&lt;img loading="lazy" decoding="async" width="404" src="https://remkoweijnen.nl/blog/wp-content/uploads/2008/11/localtaskbar2.webp" alt="LocalTaskBar2" height="242" /&gt;
&lt;p&gt;If I run a session in a session I do this again, this makes switching sessions very easy and you can always see which session you are in:&lt;/p&gt;</description></item><item><title>Microsoft Tech-Ed IT Professionals 2008</title><link>https://remkoweijnen.nl/blog/2008/10/24/microsoft-tech-ed-it-professionals-2008/</link><pubDate>Fri, 24 Oct 2008 13:02:38 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2008/10/24/microsoft-tech-ed-it-professionals-2008/</guid><description>&lt;p&gt;So I will be attending the &lt;a target="_blank" href="http://www.microsoft.com/emea/teched2008/itpro/" title="Tech-Ed EMEA 2008"&gt;Tech-Ed EMEA&lt;/a&gt; in Barcelona, maybe some of you are going too?&lt;/p&gt;
&lt;p&gt;It would be nice to meet some of my readers, so maybe I&amp;rsquo;ll see you there!&lt;br&gt;
&lt;a href="http://techedemeaconnect.leveragesoftware.com/profile_view.aspx?customerid=rweijnen"&gt;&lt;img border="0" src="http://techedemeaconnect.leveragesoftware.com/businesscard.aspx?customerid=rweijnen" alt="Join Me at Tech·Ed EMEA Connect for IT Professionals!" /&gt;&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Application crashes while opening helpfile</title><link>https://remkoweijnen.nl/blog/2008/10/23/application-crashes-while-opening-helpfile/</link><pubDate>Thu, 23 Oct 2008 13:48:35 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2008/10/23/application-crashes-while-opening-helpfile/</guid><description>&lt;p&gt;I had an application that crashed when opening the Help Topics entry from the Help menu. A trace with Process Monitor showed that it was opening a help (.chm) file. Using Explorer I could normally open the Helpfile so thas was strange. Process Monitor did not reveil any ACCESS_DENIED or other problems.&lt;/p&gt;
&lt;p&gt;I did notice that ieframe.dll was being accessed several times and some further debugging revealed that a dll in the application directory was loaded (psapi.dll). This is strange because psapi.dll resided in the windows\system32 folder normally. Also the copy in the application directory was an old version (4.0.1371.1).&lt;/p&gt;</description></item><item><title>Patch Windows 2008 Terminal Server to allow more than 2 concurrent sessions</title><link>https://remkoweijnen.nl/blog/2008/10/21/patch-windows-2008-terminal-server-to-allow-more-than-2-concurrent-sessions/</link><pubDate>Tue, 21 Oct 2008 13:56:23 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2008/10/21/patch-windows-2008-terminal-server-to-allow-more-than-2-concurrent-sessions/</guid><description>&lt;p&gt;Well it took some time but I patched Terminal Server for Windows 2008 to allow unlimited sessions in Remote Administration mode.&lt;/p&gt;
&lt;p&gt;This patch is for 32 bit English version. In order to install it you need to perform the steps below. Before you start please check if using this patch is allowed according to your country&amp;rsquo;s law and your license agreement.&lt;/p&gt;</description></item><item><title>Prevent rename or removal of the My Documents icon on the desktop</title><link>https://remkoweijnen.nl/blog/2008/09/02/prevent-rename-or-removal-of-the-my-documents-icon-on-the-desktop/</link><pubDate>Tue, 02 Sep 2008 09:27:23 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2008/09/02/prevent-rename-or-removal-of-the-my-documents-icon-on-the-desktop/</guid><description>&lt;p&gt;&lt;span style="color: #ff0000;"&gt;&lt;strong&gt;EDIT:&lt;/strong&gt;&lt;/span&gt; &lt;strong&gt;Please read the &lt;/strong&gt;&lt;a href="https://remkoweijnen.nl/blog/2010/12/19/desktop-icons-hide-show-prevent-rename-or-delete/"&gt;&lt;strong&gt;Desktop Icons, hide, show, prevent rename or delete article&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt;, it may be a better solution!&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;One of my customers recently asked if it was possible to preven the user from renaming or deleting the My Documents icon on the desktop.&lt;/p&gt;
&lt;p&gt;If you know that deleting the icon from the desktop doesn&amp;rsquo;t really delete the My Documents folder from disk but just hides the icon then it&amp;rsquo;s obvious that it must be some kind of registry setting.&lt;/p&gt;
&lt;p&gt;So I fired up Process Monitor from Sysinternals and deleted the icon. This showed that after deleting the icon changed registry keys at the following location:&lt;/p&gt;
&lt;p&gt;HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\ClassicStartMenu\&lt;/p&gt;</description></item><item><title>Applications tab in taskmanager is empty #2</title><link>https://remkoweijnen.nl/blog/2008/09/02/applications-tab-in-taskmanager-is-empty-2/</link><pubDate>Tue, 02 Sep 2008 09:05:25 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2008/09/02/applications-tab-in-taskmanager-is-empty-2/</guid><description>&lt;p&gt;As a followup to the previous &lt;a href="https://remkoweijnen.nl/blog/2008/09/01/applications-tab-in-taskmanager-is-empty/"&gt;article&lt;/a&gt;:&lt;/p&gt;
&lt;p&gt;It might be better to just Exclude taskmanager because settings the Flag value to 0 might disable multi monitor support. To do this Create a new REG_SZ (string) under HKEY_LOCAL_MACHINE\Software\Citrix\CtxHook\AppInit_Dlls\Multiple Monitor Hook and name it Exclude. It's value should be taskmgr.exe (case sensitive!).&lt;/p&gt;</description></item><item><title>Applications tab in taskmanager is empty</title><link>https://remkoweijnen.nl/blog/2008/09/01/applications-tab-in-taskmanager-is-empty/</link><pubDate>Mon, 01 Sep 2008 16:46:21 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2008/09/01/applications-tab-in-taskmanager-is-empty/</guid><description>&lt;p&gt;Today I noticed something strange: on a Citrix (Presentation Server 4.5) server taskmanager does not show anything in the applications tab.&lt;/p&gt;
&lt;p&gt;&lt;img loading="lazy" decoding="async" height="231" alt="taskmgr" src="https://remkoweijnen.nl/blog/wp-content/uploads/2008/09/taskmgr.webp" width="225" /&gt;&lt;/p&gt;
&lt;p&gt;I tested this on the other Citrix Servers in the farm and they all had the same problem (and non Citrix servers did not). As you might know taskmanager fills the applications tab by enumerating all top level windows. That's why I suspected Citrix because it places several hooks (multi monitor support, speedscreen etc.).&lt;/p&gt;</description></item><item><title>Patch Windows 2003 Terminal Server to allow more than 2 concurrent sessions</title><link>https://remkoweijnen.nl/blog/2008/08/31/patch-windows-2003-terminal-server-to-allow-more-than-2-concurrent-sessions/</link><pubDate>Sun, 31 Aug 2008 07:19:48 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2008/08/31/patch-windows-2003-terminal-server-to-allow-more-than-2-concurrent-sessions/</guid><description>&lt;p&gt;As you might know Windows 2003 Server accepts at most 2 concurrent Terminal Server sessions (and 1 console session) in Remote Administration mode (which is the default). Of course if you switch to Application Mode you can have an unlimited number of sessions but this requires licenses and a license server.&lt;/p&gt;
&lt;p&gt;When Terminal Server creates a new session it checks if the new session is either a console session or a help assistant session and if not it allocates a license. The function that performs this check is called CRAPolicy::Logon&lt;/p&gt;</description></item><item><title>Remko's download's</title><link>https://remkoweijnen.nl/blog/2008/08/20/remkos-downloads/</link><pubDate>Wed, 20 Aug 2008 10:56:04 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2008/08/20/remkos-downloads/</guid><description>&lt;p&gt;&lt;a class="download" href="https://remkoweijnen.nl/blog/files/ProfMan.zip"&gt;ProfMan.zip&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Registry editing has been disabled by your administrator (not anymore!)</title><link>https://remkoweijnen.nl/blog/2008/08/12/registry-editing-has-been-disabled-by-your-administrator/</link><pubDate>Tue, 12 Aug 2008 23:09:32 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2008/08/12/registry-editing-has-been-disabled-by-your-administrator/</guid><description>&lt;p&gt;Most administrator will want to prevent normal users from opening Regedit and a command prompt. Usually this is done by activating the &amp;ldquo;Prevent access to registry editing tools&amp;rdquo; and &amp;ldquo;Prevent access to the command prompt&amp;rdquo; policy settings. They are located under User Configuration | Administrative Templates | System:&lt;/p&gt;
&lt;img loading="lazy" decoding="async" width="450" src="https://remkoweijnen.nl/blog/wp-content/uploads/2008/08/gpedit.webp" alt="gpedit" height="271" /&gt;
&lt;p&gt;Activating the policies will set the matching keys in the registry:&lt;/p&gt;
&lt;img loading="lazy" decoding="async" width="450" src="https://remkoweijnen.nl/blog/wp-content/uploads/2008/08/regkey.webp" alt="regkey" height="314" /&gt;
&lt;p&gt;If we try to open regedit we are denied access:&lt;/p&gt;
&lt;img loading="lazy" decoding="async" width="377" src="https://remkoweijnen.nl/blog/wp-content/uploads/2008/08/regedit1.webp" alt="regedit1" height="129" /&gt;
&lt;p&gt;So how does this work?&lt;/p&gt;</description></item><item><title>Unattended Citrix Installation: Could not Access the datastore using the DSN file</title><link>https://remkoweijnen.nl/blog/2008/06/23/error-26009-could-not-access-the-datastore-using-the-dsn-file/</link><pubDate>Mon, 23 Jun 2008 22:11:21 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2008/06/23/error-26009-could-not-access-the-datastore-using-the-dsn-file/</guid><description>&lt;p&gt;I was working on an unattended installation of Citrix Presentation Server 4.5 or rather Citrix Xenapp. I was creating the dsn file for the installation by a script that uses the echo command and output this to a file.&lt;/p&gt;
&lt;p&gt;This is a part of the script:&lt;/p&gt;</description></item><item><title>Resuming Microsoft's (Akami) Download Manager</title><link>https://remkoweijnen.nl/blog/2008/06/22/resuming-microsofts-akami-download-manager/</link><pubDate>Sun, 22 Jun 2008 08:51:09 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2008/06/22/resuming-microsofts-akami-download-manager/</guid><description>&lt;p&gt;If you ever download software from &lt;a title="Microsoft Volume Licensing Site" href="https://licensing.microsoft.com" target="_blank"&gt;Microsoft's Volume Licensing Site&lt;/a&gt; you have probably seen that it uses the Akamai download manager. Sometimes your downloads get interrupted but how to restart the downloadmanager? There's no entry in the startmenu and not even an icon on the desktop.&lt;/p&gt;</description></item><item><title>Configuring IBM Raid controller with Altiris</title><link>https://remkoweijnen.nl/blog/2008/06/17/configuring-ibm-raid-controller-with-altiris/</link><pubDate>Tue, 17 Jun 2008 21:41:58 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2008/06/17/configuring-ibm-raid-controller-with-altiris/</guid><description>&lt;p&gt;Today I was deploying some IBM x3550 and x3650 servers with Altiris Deployment Server. IBM Delivers a toolkit for Altiris that contains amongst others jobs for configuring raid arrays.&lt;/p&gt;
&lt;p&gt;To do this you need to create a raid policy file and deploy this. I created this policy file:&lt;/p&gt;
&lt;blockquote&gt;[Policy.RAID-1]
&lt;p&gt;AppliesTo.1 = t:ServeRAID-8k-l,d:4&lt;/p&gt;
&lt;p&gt;Array_Mode = CUSTOM&lt;br&gt;
Array.A = 1,2&lt;br&gt;
Array.B = 3,4&lt;/p&gt;
&lt;p&gt;Logical_Mode = CUSTOM&lt;br&gt;
Logical.1 = A:FILL:1&lt;br&gt;
Logical.2 = B:FILL:1&lt;/blockquote&gt;&lt;br&gt;
As you can see the policy only applies to the type of array controller in my servers (t:ServeRAID-8k-l). This way we prevent applying the policy to other configurarions. I have a 4 disk configuration (d:4) and want to create to RAID 1 arrays (A &amp;amp; B). On each array one Logical drive with the maximum size (FILL parameter).&lt;/p&gt;</description></item><item><title>Multiple Concurrent Terminal Server Sessions On Vista SP1</title><link>https://remkoweijnen.nl/blog/2008/06/14/mutiple-concurrent-terminal-session-on-vista-sp1/</link><pubDate>Sat, 14 Jun 2008 23:35:44 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2008/06/14/mutiple-concurrent-terminal-session-on-vista-sp1/</guid><description>&lt;p&gt;There are several patched terminal server dll&amp;rsquo;s floating around in the net to allow multiple concurrent Terminal Server session on Windows Vista with Service Pack 1. But they all have the same limitations:&lt;/p&gt;
&lt;p&gt;It&amp;rsquo;s not possible to start a session to Localhost, this is because the Terminal Server client does a check to see if you are running Personal Terminal Server (Vista/XP) and denies Localhost or 127.0.0.1 if true (127.0.0.2 works though).&lt;/p&gt;</description></item><item><title>Terminal Server Ping Tool</title><link>https://remkoweijnen.nl/blog/2008/06/13/terminal-server-ping-tool/</link><pubDate>Fri, 13 Jun 2008 13:34:46 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2008/06/13/terminal-server-ping-tool/</guid><description>&lt;p&gt;A while ago I included a new undocumented API into my JwaWinsta unit which is called WinStationServerPing. This API &amp;ldquo;pings&amp;rdquo; a Terminal or Citrix server and verifies that Terminal Server is up and running. It is not the same as a regular networking ping! This API actually makes a connection to a (remote) Terminal Server and verifies that Terminal Server runs and accepts connections.&lt;/p&gt;
&lt;p&gt;I wrote a small cmdline tool that uses this API to ping a Terminal Server which can be used to quickly determine if a Terminal Server is up and running. I named it WTSPing.&lt;/p&gt;
&lt;p&gt;So how does it work? Open up a command prompt (Start -&amp;gt; Run -&amp;gt; cmd) and type WTSPing /? to see the help:&lt;/p&gt;</description></item><item><title>Script to logoff all Terminal Server sessions</title><link>https://remkoweijnen.nl/blog/2008/06/09/script-to-logoff-all-terminal-server-sessions/</link><pubDate>Mon, 09 Jun 2008 13:48:50 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2008/06/09/script-to-logoff-all-terminal-server-sessions/</guid><description>&lt;p&gt;I needed a script to logoff all running Terminal Server sessions in order to rollout an install package. As you might know there is a commandline tool to logoff a session, it&amp;rsquo;s called logoff.exe.&lt;/p&gt;
&lt;p&gt;These are the commandline options:&lt;/p&gt;
&lt;p&gt;LOGOFF [sessionname | sessionid] [/SERVER:servername] [/V]&lt;/p&gt;</description></item><item><title>Encrypting RDP Passwords in VB.NET</title><link>https://remkoweijnen.nl/blog/2008/05/02/encrypting-rdp-passwords-in-vbnet/</link><pubDate>Fri, 02 May 2008 08:53:13 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2008/05/02/encrypting-rdp-passwords-in-vbnet/</guid><description>&lt;p&gt;Justin Shepard converted my code to &lt;a href="https://remkoweijnen.nl/blog/2007/10/18/how-rdp-passwords-are-encrypted/"&gt;encrypt RPD passwords&lt;/a&gt; to VB.NET:&lt;/p&gt;
&lt;div class="codecard"&gt;
 &lt;div class="codehead"&gt;
 &lt;span class="codefile"&gt;&lt;/span&gt;
 &lt;span class="codetools" data-pagefind-ignore&gt;
 &lt;span class="codelang"&gt;vbnet&lt;/span&gt;
 &lt;button class="codebtn" type="button" data-copy&gt;Copy&lt;/button&gt;
 &lt;a class="codebtn" download=".vb" href="data:text/plain;charset=utf-8;base64,Jz09PT09PVNPRgoKSW1wb3J0cyBTeXN0ZW0KSW1wb3J0cyBTeXN0ZW0uVGV4dApJbXBvcnRzIFN5c3RlbS5SdW50aW1lLkludGVyb3BTZXJ2aWNlcwpJbXBvcnRzIFN5c3RlbS5Db21wb25lbnRNb2RlbApJbXBvcnRzIE1pY3Jvc29mdC5WaXN1YWxCYXNpYwoKUHVibGljIE1vZHVsZSBSZHBFbmNyeXB0CgogICAgUHVibGljIENsYXNzIERQQVBJCjxkbGxpbXBvcnQ&amp;#43;IF8KICAgICAgICBQcml2YXRlIFNoYXJlZCBGdW5jdGlvbiBDcnlwdFByb3RlY3REYXRhKCBfCiAgICAgICAgICAgIEJ5UmVmIHBQbGFpblRleHQgQXMgREFUQV9CTE9CLCBfCiAgICAgICAgICAgIEJ5VmFsIHN6RGVzY3JpcHRpb24gQXMgU3RyaW5nLCBfCiAgICAgICAgICAgIEJ5UmVmIHBFbnRyb3B5IEFzIERBVEFfQkxPQiwgXwogICAgICAgICAgICBCeVZhbCBwUmVzZXJ2ZWQgQXMgSW50UHRyLCBfCiAgICAgICAgICAgIEJ5UmVmIHBQcm9tcHQgQXMgQ1JZUFRQUk9URUNUX1BST01QVFNUUlVDVCwgXwogICAgICAgICAgICBCeVZhbCBkd0ZsYWdzIEFzIEludGVnZXIsIF8KICAgICAgICAgICAgQnlSZWYgcENpcGhlclRleHQgQXMgREFUQV9CTE9CIF8KICAgICAgICApIEFzIEJvb2xlYW4KICAgICAgICBFbmQgRnVuY3Rpb24KCjxkbGxpbXBvcnQ&amp;#43;IF8KICAgICAgICBQcml2YXRlIFNoYXJlZCBGdW5jdGlvbiBDcnlwdFVucHJvdGVjdERhdGEoIF8KICAgICAgICAgICAgQnlSZWYgcENpcGhlclRleHQgQXMgREFUQV9CTE9CLCBfCiAgICAgICAgICAgIEJ5UmVmIHBzekRlc2NyaXB0aW9uIEFzIFN0cmluZywgXwogICAgICAgICAgICBCeVJlZiBwRW50cm9weSBBcyBEQVRBX0JMT0IsIF8KICAgICAgICAgICAgQnlWYWwgcFJlc2VydmVkIEFzIEludFB0ciwgXwogICAgICAgICAgICBCeVJlZiBwUHJvbXB0IEFzIENSWVBUUFJPVEVDVF9QUk9NUFRTVFJVQ1QsIF8KICAgICAgICAgICAgQnlWYWwgZHdGbGFncyBBcyBJbnRlZ2VyLCBfCiAgICAgICAgICAgIEJ5UmVmIHBQbGFpblRleHQgQXMgREFUQV9CTE9CIF8KICAgICAgICApIEFzIEJvb2xlYW4KICAgICAgICBFbmQgRnVuY3Rpb24KCjxzdHJ1Y3RsYXlvdXQ&amp;#43;IF8KICAgICAgICBGcmllbmQgU3RydWN0dXJlIERBVEFfQkxPQgogICAgICAgICAgICBQdWJsaWMgY2JEYXRhIEFzIEludGVnZXIKICAgICAgICAgICAgUHVibGljIHBiRGF0YSBBcyBJbnRQdHIKICAgICAgICBFbmQgU3RydWN0dXJlCgo8c3RydWN0bGF5b3V0PiBfCiAgICAgICAgRnJpZW5kIFN0cnVjdHVyZSBDUllQVFBST1RFQ1RfUFJPTVBUU1RSVUNUCiAgICAgICAgICAgIFB1YmxpYyBjYlNpemUgQXMgSW50ZWdlcgogICAgICAgICAgICBQdWJsaWMgZHdQcm9tcHRGbGFncyBBcyBJbnRlZ2VyCiAgICAgICAgICAgIFB1YmxpYyBod25kQXBwIEFzIEludFB0cgogICAgICAgICAgICBQdWJsaWMgc3pQcm9tcHQgQXMgU3RyaW5nCiAgICAgICAgRW5kIFN0cnVjdHVyZQoKICAgICAgICBQcml2YXRlIENvbnN0IENSWVBUUFJPVEVDVF9VSV9GT1JCSURERU4gQXMgSW50ZWdlciA9IDEKICAgICAgICBQcml2YXRlIENvbnN0IENSWVBUUFJPVEVDVF9MT0NBTF9NQUNISU5FIEFzIEludGVnZXIgPSA0CgogICAgICAgIFByaXZhdGUgU2hhcmVkIFN1YiBJbml0UHJvbXB0IF8KICAgICAgICAoIF8KICAgICAgICAgICAgQnlSZWYgcHMgQXMgQ1JZUFRQUk9URUNUX1BST01QVFNUUlVDVCBfCiAgICAgICAgKQogICAgICAgICAgICBwcy5jYlNpemUgPSBNYXJzaGFsLlNpemVPZihHZXRUeXBlKENSWVBUUFJPVEVDVF9QUk9NUFRTVFJVQ1QpKQogICAgICAgICAgICBwcy5kd1Byb21wdEZsYWdzID0gMAogICAgICAgICAgICBwcy5od25kQXBwID0gSW50UHRyLlplcm8KICAgICAgICAgICAgcHMuc3pQcm9tcHQgPSBOb3RoaW5nCiAgICAgICAgRW5kIFN1YgoKICAgICAgICBQcml2YXRlIFNoYXJlZCBTdWIgSW5pdEJMT0IgXwogICAgICAgICggXwogICAgICAgICAgICBCeVZhbCBkYXRhIEFzIEJ5dGUoKSwgXwogICAgICAgICAgICBCeVJlZiBibG9iIEFzIERBVEFfQkxPQiBfCiAgICAgICAgKQogICAgICAgICAgICAnIFVzZSBlbXB0eSBhcnJheSBmb3IgbnVsbCBwYXJhbWV0ZXIuCiAgICAgICAgICAgIElmIGRhdGEgSXMgTm90aGluZyBUaGVuCiAgICAgICAgICAgICAgICBkYXRhID0gTmV3IEJ5dGUoMCkge30KICAgICAgICAgICAgRW5kIElmCgogICAgICAgICAgICAnIEFsbG9jYXRlIG1lbW9yeSBmb3IgdGhlIEJMT0IgZGF0YS4KICAgICAgICAgICAgYmxvYi5wYkRhdGEgPSBNYXJzaGFsLkFsbG9jSEdsb2JhbChkYXRhLkxlbmd0aCkKCiAgICAgICAgICAgICcgTWFrZSBzdXJlIHRoYXQgbWVtb3J5IGFsbG9jYXRpb24gd2FzIHN1Y2Nlc3NmdWwuCiAgICAgICAgICAgIElmIGJsb2IucGJEYXRhLkVxdWFscyhJbnRQdHIuWmVybykgVGhlbgogICAgICAgICAgICAgICAgVGhyb3cgTmV3IEV4Y2VwdGlvbiggXwogICAgICAgICAgICAgICAgICAgICAgICAiVW5hYmxlIHRvIGFsbG9jYXRlIGRhdGEgYnVmZmVyIGZvciBCTE9CIHN0cnVjdHVyZS4iKQogICAgICAgICAgICBFbmQgSWYKCiAgICAgICAgICAgICcgU3BlY2lmeSBudW1iZXIgb2YgYnl0ZXMgaW4gdGhlIEJMT0IuCiAgICAgICAgICAgIGJsb2IuY2JEYXRhID0gZGF0YS5MZW5ndGgKICAgICAgICAgICAgTWFyc2hhbC5Db3B5KGRhdGEsIDAsIGJsb2IucGJEYXRhLCBkYXRhLkxlbmd0aCkKICAgICAgICBFbmQgU3ViCgogICAgICAgIFB1YmxpYyBFbnVtIEtleVR5cGUKICAgICAgICAgICAgVXNlcktleSA9IDEKICAgICAgICAgICAgTWFjaGluZUtleQogICAgICAgIEVuZCBFbnVtCgogICAgICAgIFByaXZhdGUgU2hhcmVkIGRlZmF1bHRLZXlUeXBlIEFzIEtleVR5cGUgPSBLZXlUeXBlLlVzZXJLZXkKCiAgICAgICAgUHVibGljIFNoYXJlZCBGdW5jdGlvbiBFbmNyeXB0IF8KICAgICAgICAoIF8KICAgICAgICAgICAgQnlWYWwga2V5VHlwZSBBcyBLZXlUeXBlLCBfCiAgICAgICAgICAgIEJ5VmFsIHBsYWluVGV4dCBBcyBTdHJpbmcsIF8KICAgICAgICAgICAgQnlWYWwgZW50cm9weSBBcyBTdHJpbmcsIF8KICAgICAgICAgICAgQnlWYWwgZGVzY3JpcHRpb24gQXMgU3RyaW5nIF8KICAgICAgICApIEFzIFN0cmluZwogICAgICAgICAgICBJZiBwbGFpblRleHQgSXMgTm90aGluZyBUaGVuCiAgICAgICAgICAgICAgICBwbGFpblRleHQgPSBTdHJpbmcuRW1wdHkKICAgICAgICAgICAgRW5kIElmCiAgICAgICAgICAgIElmIGVudHJvcHkgSXMgTm90aGluZyBUaGVuCiAgICAgICAgICAgICAgICBlbnRyb3B5ID0gU3RyaW5nLkVtcHR5CiAgICAgICAgICAgIEVuZCBJZgoKICAgICAgICAgICAgRGltIHJlc3VsdCBBcyBCeXRlKCkKICAgICAgICAgICAgRGltIGVuY3J5cHRlZCBBcyBTdHJpbmcgPSAiIgogICAgICAgICAgICBEaW0gaSBBcyBJbnRlZ2VyCiAgICAgICAgICAgIHJlc3VsdCA9IEVuY3J5cHQoa2V5VHlwZSwgXwogICAgICAgICAgICAgICAgICAgICAgICAgICAgIEVuY29kaW5nLlVuaWNvZGUuR2V0Qnl0ZXMocGxhaW5UZXh0KSwgXwogICAgICAgICAgICAgICAgICAgICAgICAgICAgIEVuY29kaW5nLlVuaWNvZGUuR2V0Qnl0ZXMoZW50cm9weSksIF8KICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkZXNjcmlwdGlvbikKICAgICAgICAgICAgRm9yIGkgPSAwIFRvIHJlc3VsdC5MZW5ndGggLSAxCiAgICAgICAgICAgICAgICBlbmNyeXB0ZWQgPSBlbmNyeXB0ZWQgJiBDb252ZXJ0LlRvU3RyaW5nKHJlc3VsdChpKSwgMTYpLlBhZExlZnQoMiwgIjAiKS5Ub1VwcGVyKCkKICAgICAgICAgICAgTmV4dAogICAgICAgICAgICBSZXR1cm4gZW5jcnlwdGVkLlRvU3RyaW5nKCkKICAgICAgICBFbmQgRnVuY3Rpb24KCiAgICAgICAgUHVibGljIFNoYXJlZCBGdW5jdGlvbiBFbmNyeXB0IF8KICAgICAgICAoIF8KICAgICAgICAgICAgQnlWYWwga2V5VHlwZSBBcyBLZXlUeXBlLCBfCiAgICAgICAgICAgIEJ5VmFsIHBsYWluVGV4dEJ5dGVzIEFzIEJ5dGUoKSwgXwogICAgICAgICAgICBCeVZhbCBlbnRyb3B5Qnl0ZXMgQXMgQnl0ZSgpLCBfCiAgICAgICAgICAgIEJ5VmFsIGRlc2NyaXB0aW9uIEFzIFN0cmluZyBfCiAgICAgICAgKSBBcyBCeXRlKCkKICAgICAgICAgICAgSWYgcGxhaW5UZXh0Qnl0ZXMgSXMgTm90aGluZyBUaGVuCiAgICAgICAgICAgICAgICBwbGFpblRleHRCeXRlcyA9IE5ldyBCeXRlKDApIHt9CiAgICAgICAgICAgIEVuZCBJZgoKICAgICAgICAgICAgSWYgZW50cm9weUJ5dGVzIElzIE5vdGhpbmcgVGhlbgogICAgICAgICAgICAgICAgZW50cm9weUJ5dGVzID0gTmV3IEJ5dGUoMCkge30KICAgICAgICAgICAgRW5kIElmCgogICAgICAgICAgICBJZiBkZXNjcmlwdGlvbiBJcyBOb3RoaW5nIFRoZW4KICAgICAgICAgICAgICAgIGRlc2NyaXB0aW9uID0gU3RyaW5nLkVtcHR5CiAgICAgICAgICAgIEVuZCBJZgoKICAgICAgICAgICAgRGltIHBsYWluVGV4dEJsb2IgQXMgREFUQV9CTE9CID0gTmV3IERBVEFfQkxPQgogICAgICAgICAgICBEaW0gY2lwaGVyVGV4dEJsb2IgQXMgREFUQV9CTE9CID0gTmV3IERBVEFfQkxPQgogICAgICAgICAgICBEaW0gZW50cm9weUJsb2IgQXMgREFUQV9CTE9CID0gTmV3IERBVEFfQkxPQgoKICAgICAgICAgICAgRGltIHByb21wdCBBcyAgXwogICAgICAgICAgICAgICAgICAgIENSWVBUUFJPVEVDVF9QUk9NUFRTVFJVQ1QgPSBOZXcgQ1JZUFRQUk9URUNUX1BST01QVFNUUlVDVAogICAgICAgICAgICBJbml0UHJvbXB0KHByb21wdCkKCiAgICAgICAgICAgIFRyeQogICAgICAgICAgICAgICAgVHJ5CiAgICAgICAgICAgICAgICAgICAgSW5pdEJMT0IocGxhaW5UZXh0Qnl0ZXMsIHBsYWluVGV4dEJsb2IpCiAgICAgICAgICAgICAgICBDYXRjaCBleCBBcyBFeGNlcHRpb24KICAgICAgICAgICAgICAgICAgICBUaHJvdyBOZXcgRXhjZXB0aW9uKCJDYW5ub3QgaW5pdGlhbGl6ZSBwbGFpbnRleHQgQkxPQi4iLCBleCkKICAgICAgICAgICAgICAgIEVuZCBUcnkKCiAgICAgICAgICAgICAgICBUcnkKICAgICAgICAgICAgICAgICAgICBJbml0QkxPQihlbnRyb3B5Qnl0ZXMsIGVudHJvcHlCbG9iKQogICAgICAgICAgICAgICAgQ2F0Y2ggZXggQXMgRXhjZXB0aW9uCiAgICAgICAgICAgICAgICAgICAgVGhyb3cgTmV3IEV4Y2VwdGlvbigiQ2Fubm90IGluaXRpYWxpemUgZW50cm9weSBCTE9CLiIsIGV4KQogICAgICAgICAgICAgICAgRW5kIFRyeQoKICAgICAgICAgICAgICAgIERpbSBmbGFncyBBcyBJbnRlZ2VyID0gQ1JZUFRQUk9URUNUX1VJX0ZPUkJJRERFTgoKICAgICAgICAgICAgICAgIElmIGtleVR5cGUgPSBrZXlUeXBlLk1hY2hpbmVLZXkgVGhlbgogICAgICAgICAgICAgICAgICAgIGZsYWdzID0gZmxhZ3MgT3IgKENSWVBUUFJPVEVDVF9MT0NBTF9NQUNISU5FKQogICAgICAgICAgICAgICAgRW5kIElmCgogICAgICAgICAgICAgICAgRGltIHN1Y2Nlc3MgQXMgQm9vbGVhbiA9IENyeXB0UHJvdGVjdERhdGEoIF8KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcGxhaW5UZXh0QmxvYiwgXwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkZXNjcmlwdGlvbiwgXwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbnRyb3B5QmxvYiwgXwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBJbnRQdHIuWmVybywgXwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwcm9tcHQsIF8KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZmxhZ3MsIF8KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2lwaGVyVGV4dEJsb2IpCgogICAgICAgICAgICAgICAgSWYgTm90IHN1Y2Nlc3MgVGhlbgogICAgICAgICAgICAgICAgICAgIERpbSBlcnJDb2RlIEFzIEludGVnZXIgPSBNYXJzaGFsLkdldExhc3RXaW4zMkVycm9yKCkKCiAgICAgICAgICAgICAgICAgICAgVGhyb3cgTmV3IEV4Y2VwdGlvbigiQ3J5cHRQcm90ZWN0RGF0YSBmYWlsZWQuIiwgXwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBOZXcgV2luMzJFeGNlcHRpb24oZXJyQ29kZSkpCiAgICAgICAgICAgICAgICBFbmQgSWYKCiAgICAgICAgICAgICAgICBEaW0gY2lwaGVyVGV4dEJ5dGVzKGNpcGhlclRleHRCbG9iLmNiRGF0YSkgQXMgQnl0ZQoKICAgICAgICAgICAgICAgIE1hcnNoYWwuQ29weShjaXBoZXJUZXh0QmxvYi5wYkRhdGEsIGNpcGhlclRleHRCeXRlcywgMCwgXwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNpcGhlclRleHRCbG9iLmNiRGF0YSkKCiAgICAgICAgICAgICAgICBSZXR1cm4gY2lwaGVyVGV4dEJ5dGVzCiAgICAgICAgICAgIENhdGNoIGV4IEFzIEV4Y2VwdGlvbgogICAgICAgICAgICAgICAgVGhyb3cgTmV3IEV4Y2VwdGlvbigiRFBBUEkgd2FzIHVuYWJsZSB0byBlbmNyeXB0IGRhdGEuIiwgZXgpCiAgICAgICAgICAgIEZpbmFsbHkKICAgICAgICAgICAgICAgIElmIE5vdCAocGxhaW5UZXh0QmxvYi5wYkRhdGEuRXF1YWxzKEludFB0ci5aZXJvKSkgVGhlbgogICAgICAgICAgICAgICAgICAgIE1hcnNoYWwuRnJlZUhHbG9iYWwocGxhaW5UZXh0QmxvYi5wYkRhdGEpCiAgICAgICAgICAgICAgICBFbmQgSWYKCiAgICAgICAgICAgICAgICBJZiBOb3QgKGNpcGhlclRleHRCbG9iLnBiRGF0YS5FcXVhbHMoSW50UHRyLlplcm8pKSBUaGVuCiAgICAgICAgICAgICAgICAgICAgTWFyc2hhbC5GcmVlSEdsb2JhbChjaXBoZXJUZXh0QmxvYi5wYkRhdGEpCiAgICAgICAgICAgICAgICBFbmQgSWYKCiAgICAgICAgICAgICAgICBJZiBOb3QgKGVudHJvcHlCbG9iLnBiRGF0YS5FcXVhbHMoSW50UHRyLlplcm8pKSBUaGVuCiAgICAgICAgICAgICAgICAgICAgTWFyc2hhbC5GcmVlSEdsb2JhbChlbnRyb3B5QmxvYi5wYkRhdGEpCiAgICAgICAgICAgICAgICBFbmQgSWYKICAgICAgICAgICAgRW5kIFRyeQogICAgICAgIEVuZCBGdW5jdGlvbgoKICAgIEVuZCBDbGFzcwoKICAgIFN1YiBNYWluKEJ5VmFsIGFyZ3MgQXMgU3RyaW5nKCkpCiAgICAgICAgVHJ5CiAgICAgICAgICAgIERpbSB0ZXh0IEFzIFN0cmluZyA9IGFyZ3MoMCkKICAgICAgICAgICAgRGltIGVuY3J5cHRlZCBBcyBTdHJpbmcKCiAgICAgICAgICAgIGVuY3J5cHRlZCA9IERQQVBJLkVuY3J5cHQoRFBBUEkuS2V5VHlwZS5NYWNoaW5lS2V5LCB0ZXh0LCBOb3RoaW5nLCAicHN3IikKCiAgICAgICAgICAgIENvbnNvbGUuV3JpdGVMaW5lKCJ7MH0iICYgQ2hyKDEzKSAmIENocigxMCksIGVuY3J5cHRlZCkKCiAgICAgICAgQ2F0Y2ggZXggQXMgRXhjZXB0aW9uCiAgICAgICAgICAgIFdoaWxlIE5vdCAoZXggSXMgTm90aGluZykKICAgICAgICAgICAgICAgIENvbnNvbGUuV3JpdGVMaW5lKGV4Lk1lc3NhZ2UpCiAgICAgICAgICAgICAgICBleCA9IGV4LklubmVyRXhjZXB0aW9uCiAgICAgICAgICAgIEVuZCBXaGlsZQogICAgICAgIEVuZCBUcnkKICAgIEVuZCBTdWIKCkVuZCBNb2R1bGUKJz09PT09PUVPRg=="&gt;Download&lt;/a&gt;
 &lt;/span&gt;
 &lt;/div&gt;
 &lt;div class="codebody"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-vbnet" data-lang="vbnet"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c"&gt;&amp;#39;======SOF
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;Imports&lt;/span&gt; &lt;span class="nn"&gt;System&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;Imports&lt;/span&gt; &lt;span class="nn"&gt;System.Text&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;Imports&lt;/span&gt; &lt;span class="nn"&gt;System.Runtime.InteropServices&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;Imports&lt;/span&gt; &lt;span class="nn"&gt;System.ComponentModel&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;Imports&lt;/span&gt; &lt;span class="nn"&gt;Microsoft.VisualBasic&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;Public&lt;/span&gt; &lt;span class="k"&gt;Module&lt;/span&gt; &lt;span class="nn"&gt;RdpEncrypt&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;Public&lt;/span&gt; &lt;span class="k"&gt;Class&lt;/span&gt; &lt;span class="nc"&gt;DPAPI&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="na"&gt;&amp;lt;dllimport&amp;gt;&lt;/span&gt; _
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;Private&lt;/span&gt; &lt;span class="k"&gt;Shared&lt;/span&gt; &lt;span class="k"&gt;Function&lt;/span&gt; &lt;span class="nf"&gt;CryptProtectData&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt; _
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;ByRef&lt;/span&gt; &lt;span class="n"&gt;pPlainText&lt;/span&gt; &lt;span class="ow"&gt;As&lt;/span&gt; &lt;span class="n"&gt;DATA_BLOB&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; _
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;ByVal&lt;/span&gt; &lt;span class="n"&gt;szDescription&lt;/span&gt; &lt;span class="ow"&gt;As&lt;/span&gt; &lt;span class="kt"&gt;String&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; _
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;ByRef&lt;/span&gt; &lt;span class="n"&gt;pEntropy&lt;/span&gt; &lt;span class="ow"&gt;As&lt;/span&gt; &lt;span class="n"&gt;DATA_BLOB&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; _
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;ByVal&lt;/span&gt; &lt;span class="n"&gt;pReserved&lt;/span&gt; &lt;span class="ow"&gt;As&lt;/span&gt; &lt;span class="n"&gt;IntPtr&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; _
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;ByRef&lt;/span&gt; &lt;span class="n"&gt;pPrompt&lt;/span&gt; &lt;span class="ow"&gt;As&lt;/span&gt; &lt;span class="n"&gt;CRYPTPROTECT_PROMPTSTRUCT&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; _
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;ByVal&lt;/span&gt; &lt;span class="n"&gt;dwFlags&lt;/span&gt; &lt;span class="ow"&gt;As&lt;/span&gt; &lt;span class="kt"&gt;Integer&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; _
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;ByRef&lt;/span&gt; &lt;span class="n"&gt;pCipherText&lt;/span&gt; &lt;span class="ow"&gt;As&lt;/span&gt; &lt;span class="n"&gt;DATA_BLOB&lt;/span&gt; _
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="ow"&gt;As&lt;/span&gt; &lt;span class="kt"&gt;Boolean&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;End&lt;/span&gt; &lt;span class="k"&gt;Function&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="na"&gt;&amp;lt;dllimport&amp;gt;&lt;/span&gt; _
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;Private&lt;/span&gt; &lt;span class="k"&gt;Shared&lt;/span&gt; &lt;span class="k"&gt;Function&lt;/span&gt; &lt;span class="nf"&gt;CryptUnprotectData&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt; _
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;ByRef&lt;/span&gt; &lt;span class="n"&gt;pCipherText&lt;/span&gt; &lt;span class="ow"&gt;As&lt;/span&gt; &lt;span class="n"&gt;DATA_BLOB&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; _
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;ByRef&lt;/span&gt; &lt;span class="n"&gt;pszDescription&lt;/span&gt; &lt;span class="ow"&gt;As&lt;/span&gt; &lt;span class="kt"&gt;String&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; _
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;ByRef&lt;/span&gt; &lt;span class="n"&gt;pEntropy&lt;/span&gt; &lt;span class="ow"&gt;As&lt;/span&gt; &lt;span class="n"&gt;DATA_BLOB&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; _
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;ByVal&lt;/span&gt; &lt;span class="n"&gt;pReserved&lt;/span&gt; &lt;span class="ow"&gt;As&lt;/span&gt; &lt;span class="n"&gt;IntPtr&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; _
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;ByRef&lt;/span&gt; &lt;span class="n"&gt;pPrompt&lt;/span&gt; &lt;span class="ow"&gt;As&lt;/span&gt; &lt;span class="n"&gt;CRYPTPROTECT_PROMPTSTRUCT&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; _
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;ByVal&lt;/span&gt; &lt;span class="n"&gt;dwFlags&lt;/span&gt; &lt;span class="ow"&gt;As&lt;/span&gt; &lt;span class="kt"&gt;Integer&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; _
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;ByRef&lt;/span&gt; &lt;span class="n"&gt;pPlainText&lt;/span&gt; &lt;span class="ow"&gt;As&lt;/span&gt; &lt;span class="n"&gt;DATA_BLOB&lt;/span&gt; _
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="ow"&gt;As&lt;/span&gt; &lt;span class="kt"&gt;Boolean&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;End&lt;/span&gt; &lt;span class="k"&gt;Function&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="na"&gt;&amp;lt;structlayout&amp;gt;&lt;/span&gt; _
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;Friend&lt;/span&gt; &lt;span class="k"&gt;Structure&lt;/span&gt; &lt;span class="nc"&gt;DATA_BLOB&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;Public&lt;/span&gt; &lt;span class="n"&gt;cbData&lt;/span&gt; &lt;span class="ow"&gt;As&lt;/span&gt; &lt;span class="kt"&gt;Integer&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;Public&lt;/span&gt; &lt;span class="n"&gt;pbData&lt;/span&gt; &lt;span class="ow"&gt;As&lt;/span&gt; &lt;span class="n"&gt;IntPtr&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;End&lt;/span&gt; &lt;span class="k"&gt;Structure&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="na"&gt;&amp;lt;structlayout&amp;gt;&lt;/span&gt; _
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;Friend&lt;/span&gt; &lt;span class="k"&gt;Structure&lt;/span&gt; &lt;span class="nc"&gt;CRYPTPROTECT_PROMPTSTRUCT&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;Public&lt;/span&gt; &lt;span class="n"&gt;cbSize&lt;/span&gt; &lt;span class="ow"&gt;As&lt;/span&gt; &lt;span class="kt"&gt;Integer&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;Public&lt;/span&gt; &lt;span class="n"&gt;dwPromptFlags&lt;/span&gt; &lt;span class="ow"&gt;As&lt;/span&gt; &lt;span class="kt"&gt;Integer&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;Public&lt;/span&gt; &lt;span class="n"&gt;hwndApp&lt;/span&gt; &lt;span class="ow"&gt;As&lt;/span&gt; &lt;span class="n"&gt;IntPtr&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;Public&lt;/span&gt; &lt;span class="n"&gt;szPrompt&lt;/span&gt; &lt;span class="ow"&gt;As&lt;/span&gt; &lt;span class="kt"&gt;String&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;End&lt;/span&gt; &lt;span class="k"&gt;Structure&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;Private&lt;/span&gt; &lt;span class="k"&gt;Const&lt;/span&gt; &lt;span class="n"&gt;CRYPTPROTECT_UI_FORBIDDEN&lt;/span&gt; &lt;span class="ow"&gt;As&lt;/span&gt; &lt;span class="kt"&gt;Integer&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;1&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;Private&lt;/span&gt; &lt;span class="k"&gt;Const&lt;/span&gt; &lt;span class="n"&gt;CRYPTPROTECT_LOCAL_MACHINE&lt;/span&gt; &lt;span class="ow"&gt;As&lt;/span&gt; &lt;span class="kt"&gt;Integer&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;4&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;Private&lt;/span&gt; &lt;span class="k"&gt;Shared&lt;/span&gt; &lt;span class="k"&gt;Sub&lt;/span&gt; &lt;span class="nf"&gt;InitPrompt&lt;/span&gt; _
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;(&lt;/span&gt; _
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;ByRef&lt;/span&gt; &lt;span class="n"&gt;ps&lt;/span&gt; &lt;span class="ow"&gt;As&lt;/span&gt; &lt;span class="n"&gt;CRYPTPROTECT_PROMPTSTRUCT&lt;/span&gt; _
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;ps&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;cbSize&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;Marshal&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;SizeOf&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="ow"&gt;GetType&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;CRYPTPROTECT_PROMPTSTRUCT&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;ps&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;dwPromptFlags&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;0&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;ps&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;hwndApp&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;IntPtr&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Zero&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;ps&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;szPrompt&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;Nothing&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;End&lt;/span&gt; &lt;span class="k"&gt;Sub&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;Private&lt;/span&gt; &lt;span class="k"&gt;Shared&lt;/span&gt; &lt;span class="k"&gt;Sub&lt;/span&gt; &lt;span class="nf"&gt;InitBLOB&lt;/span&gt; _
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;(&lt;/span&gt; _
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;ByVal&lt;/span&gt; &lt;span class="n"&gt;data&lt;/span&gt; &lt;span class="ow"&gt;As&lt;/span&gt; &lt;span class="kt"&gt;Byte&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt; _
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;ByRef&lt;/span&gt; &lt;span class="n"&gt;blob&lt;/span&gt; &lt;span class="ow"&gt;As&lt;/span&gt; &lt;span class="n"&gt;DATA_BLOB&lt;/span&gt; _
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="c"&gt;&amp;#39; Use empty array for null parameter.
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;If&lt;/span&gt; &lt;span class="n"&gt;data&lt;/span&gt; &lt;span class="ow"&gt;Is&lt;/span&gt; &lt;span class="k"&gt;Nothing&lt;/span&gt; &lt;span class="k"&gt;Then&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;data&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;New&lt;/span&gt; &lt;span class="kt"&gt;Byte&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;End&lt;/span&gt; &lt;span class="k"&gt;If&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="c"&gt;&amp;#39; Allocate memory for the BLOB data.
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;blob&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;pbData&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;Marshal&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;AllocHGlobal&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Length&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="c"&gt;&amp;#39; Make sure that memory allocation was successful.
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;If&lt;/span&gt; &lt;span class="n"&gt;blob&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;pbData&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Equals&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;IntPtr&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Zero&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;Then&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;Throw&lt;/span&gt; &lt;span class="k"&gt;New&lt;/span&gt; &lt;span class="n"&gt;Exception&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt; _
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="s"&gt;&amp;#34;Unable to allocate data buffer for BLOB structure.&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;End&lt;/span&gt; &lt;span class="k"&gt;If&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="c"&gt;&amp;#39; Specify number of bytes in the BLOB.
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;blob&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;cbData&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Length&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;Marshal&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Copy&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;blob&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;pbData&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Length&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;End&lt;/span&gt; &lt;span class="k"&gt;Sub&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;Public&lt;/span&gt; &lt;span class="k"&gt;Enum&lt;/span&gt; &lt;span class="nc"&gt;KeyType&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;UserKey&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;1&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;MachineKey&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;End&lt;/span&gt; &lt;span class="k"&gt;Enum&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;Private&lt;/span&gt; &lt;span class="k"&gt;Shared&lt;/span&gt; &lt;span class="n"&gt;defaultKeyType&lt;/span&gt; &lt;span class="ow"&gt;As&lt;/span&gt; &lt;span class="n"&gt;KeyType&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;KeyType&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;UserKey&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;Public&lt;/span&gt; &lt;span class="k"&gt;Shared&lt;/span&gt; &lt;span class="k"&gt;Function&lt;/span&gt; &lt;span class="nf"&gt;Encrypt&lt;/span&gt; _
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;(&lt;/span&gt; _
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;ByVal&lt;/span&gt; &lt;span class="n"&gt;keyType&lt;/span&gt; &lt;span class="ow"&gt;As&lt;/span&gt; &lt;span class="n"&gt;KeyType&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; _
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;ByVal&lt;/span&gt; &lt;span class="n"&gt;plainText&lt;/span&gt; &lt;span class="ow"&gt;As&lt;/span&gt; &lt;span class="kt"&gt;String&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; _
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;ByVal&lt;/span&gt; &lt;span class="n"&gt;entropy&lt;/span&gt; &lt;span class="ow"&gt;As&lt;/span&gt; &lt;span class="kt"&gt;String&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; _
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;ByVal&lt;/span&gt; &lt;span class="n"&gt;description&lt;/span&gt; &lt;span class="ow"&gt;As&lt;/span&gt; &lt;span class="kt"&gt;String&lt;/span&gt; _
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="ow"&gt;As&lt;/span&gt; &lt;span class="kt"&gt;String&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;If&lt;/span&gt; &lt;span class="n"&gt;plainText&lt;/span&gt; &lt;span class="ow"&gt;Is&lt;/span&gt; &lt;span class="k"&gt;Nothing&lt;/span&gt; &lt;span class="k"&gt;Then&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;plainText&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kt"&gt;String&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Empty&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;End&lt;/span&gt; &lt;span class="k"&gt;If&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;If&lt;/span&gt; &lt;span class="n"&gt;entropy&lt;/span&gt; &lt;span class="ow"&gt;Is&lt;/span&gt; &lt;span class="k"&gt;Nothing&lt;/span&gt; &lt;span class="k"&gt;Then&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;entropy&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kt"&gt;String&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Empty&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;End&lt;/span&gt; &lt;span class="k"&gt;If&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;Dim&lt;/span&gt; &lt;span class="n"&gt;result&lt;/span&gt; &lt;span class="ow"&gt;As&lt;/span&gt; &lt;span class="kt"&gt;Byte&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;Dim&lt;/span&gt; &lt;span class="n"&gt;encrypted&lt;/span&gt; &lt;span class="ow"&gt;As&lt;/span&gt; &lt;span class="kt"&gt;String&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;&amp;#34;&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;Dim&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="ow"&gt;As&lt;/span&gt; &lt;span class="kt"&gt;Integer&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;Encrypt&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;keyType&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; _
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;Encoding&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Unicode&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;GetBytes&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;plainText&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; _
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;Encoding&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Unicode&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;GetBytes&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;entropy&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; _
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;description&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;For&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;0&lt;/span&gt; &lt;span class="k"&gt;To&lt;/span&gt; &lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Length&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="n"&gt;1&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;encrypted&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;encrypted&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&lt;/span&gt; &lt;span class="n"&gt;Convert&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;ToString&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="n"&gt;16&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="n"&gt;PadLeft&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;&amp;#34;0&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="n"&gt;ToUpper&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;Next&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;Return&lt;/span&gt; &lt;span class="n"&gt;encrypted&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;ToString&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;End&lt;/span&gt; &lt;span class="k"&gt;Function&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;Public&lt;/span&gt; &lt;span class="k"&gt;Shared&lt;/span&gt; &lt;span class="k"&gt;Function&lt;/span&gt; &lt;span class="nf"&gt;Encrypt&lt;/span&gt; _
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;(&lt;/span&gt; _
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;ByVal&lt;/span&gt; &lt;span class="n"&gt;keyType&lt;/span&gt; &lt;span class="ow"&gt;As&lt;/span&gt; &lt;span class="n"&gt;KeyType&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; _
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;ByVal&lt;/span&gt; &lt;span class="n"&gt;plainTextBytes&lt;/span&gt; &lt;span class="ow"&gt;As&lt;/span&gt; &lt;span class="kt"&gt;Byte&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt; _
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;ByVal&lt;/span&gt; &lt;span class="n"&gt;entropyBytes&lt;/span&gt; &lt;span class="ow"&gt;As&lt;/span&gt; &lt;span class="kt"&gt;Byte&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt; _
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;ByVal&lt;/span&gt; &lt;span class="n"&gt;description&lt;/span&gt; &lt;span class="ow"&gt;As&lt;/span&gt; &lt;span class="kt"&gt;String&lt;/span&gt; _
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="ow"&gt;As&lt;/span&gt; &lt;span class="kt"&gt;Byte&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;If&lt;/span&gt; &lt;span class="n"&gt;plainTextBytes&lt;/span&gt; &lt;span class="ow"&gt;Is&lt;/span&gt; &lt;span class="k"&gt;Nothing&lt;/span&gt; &lt;span class="k"&gt;Then&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;plainTextBytes&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;New&lt;/span&gt; &lt;span class="kt"&gt;Byte&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;End&lt;/span&gt; &lt;span class="k"&gt;If&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;If&lt;/span&gt; &lt;span class="n"&gt;entropyBytes&lt;/span&gt; &lt;span class="ow"&gt;Is&lt;/span&gt; &lt;span class="k"&gt;Nothing&lt;/span&gt; &lt;span class="k"&gt;Then&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;entropyBytes&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;New&lt;/span&gt; &lt;span class="kt"&gt;Byte&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;End&lt;/span&gt; &lt;span class="k"&gt;If&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;If&lt;/span&gt; &lt;span class="n"&gt;description&lt;/span&gt; &lt;span class="ow"&gt;Is&lt;/span&gt; &lt;span class="k"&gt;Nothing&lt;/span&gt; &lt;span class="k"&gt;Then&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;description&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kt"&gt;String&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Empty&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;End&lt;/span&gt; &lt;span class="k"&gt;If&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;Dim&lt;/span&gt; &lt;span class="n"&gt;plainTextBlob&lt;/span&gt; &lt;span class="ow"&gt;As&lt;/span&gt; &lt;span class="n"&gt;DATA_BLOB&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;New&lt;/span&gt; &lt;span class="n"&gt;DATA_BLOB&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;Dim&lt;/span&gt; &lt;span class="n"&gt;cipherTextBlob&lt;/span&gt; &lt;span class="ow"&gt;As&lt;/span&gt; &lt;span class="n"&gt;DATA_BLOB&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;New&lt;/span&gt; &lt;span class="n"&gt;DATA_BLOB&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;Dim&lt;/span&gt; &lt;span class="n"&gt;entropyBlob&lt;/span&gt; &lt;span class="ow"&gt;As&lt;/span&gt; &lt;span class="n"&gt;DATA_BLOB&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;New&lt;/span&gt; &lt;span class="n"&gt;DATA_BLOB&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;Dim&lt;/span&gt; &lt;span class="n"&gt;prompt&lt;/span&gt; &lt;span class="ow"&gt;As&lt;/span&gt; _
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;CRYPTPROTECT_PROMPTSTRUCT&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;New&lt;/span&gt; &lt;span class="n"&gt;CRYPTPROTECT_PROMPTSTRUCT&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;InitPrompt&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;prompt&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;Try&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;Try&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;InitBLOB&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;plainTextBytes&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;plainTextBlob&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;Catch&lt;/span&gt; &lt;span class="n"&gt;ex&lt;/span&gt; &lt;span class="ow"&gt;As&lt;/span&gt; &lt;span class="n"&gt;Exception&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;Throw&lt;/span&gt; &lt;span class="k"&gt;New&lt;/span&gt; &lt;span class="n"&gt;Exception&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;&amp;#34;Cannot initialize plaintext BLOB.&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;ex&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;End&lt;/span&gt; &lt;span class="k"&gt;Try&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;Try&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;InitBLOB&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;entropyBytes&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;entropyBlob&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;Catch&lt;/span&gt; &lt;span class="n"&gt;ex&lt;/span&gt; &lt;span class="ow"&gt;As&lt;/span&gt; &lt;span class="n"&gt;Exception&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;Throw&lt;/span&gt; &lt;span class="k"&gt;New&lt;/span&gt; &lt;span class="n"&gt;Exception&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;&amp;#34;Cannot initialize entropy BLOB.&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;ex&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;End&lt;/span&gt; &lt;span class="k"&gt;Try&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;Dim&lt;/span&gt; &lt;span class="n"&gt;flags&lt;/span&gt; &lt;span class="ow"&gt;As&lt;/span&gt; &lt;span class="kt"&gt;Integer&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;CRYPTPROTECT_UI_FORBIDDEN&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;If&lt;/span&gt; &lt;span class="n"&gt;keyType&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;keyType&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;MachineKey&lt;/span&gt; &lt;span class="k"&gt;Then&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;flags&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;flags&lt;/span&gt; &lt;span class="ow"&gt;Or&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;CRYPTPROTECT_LOCAL_MACHINE&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;End&lt;/span&gt; &lt;span class="k"&gt;If&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;Dim&lt;/span&gt; &lt;span class="n"&gt;success&lt;/span&gt; &lt;span class="ow"&gt;As&lt;/span&gt; &lt;span class="kt"&gt;Boolean&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;CryptProtectData&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt; _
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;plainTextBlob&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; _
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;description&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; _
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;entropyBlob&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; _
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;IntPtr&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Zero&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; _
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;prompt&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; _
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;flags&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; _
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;cipherTextBlob&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;If&lt;/span&gt; &lt;span class="k"&gt;Not&lt;/span&gt; &lt;span class="n"&gt;success&lt;/span&gt; &lt;span class="k"&gt;Then&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;Dim&lt;/span&gt; &lt;span class="n"&gt;errCode&lt;/span&gt; &lt;span class="ow"&gt;As&lt;/span&gt; &lt;span class="kt"&gt;Integer&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;Marshal&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;GetLastWin32Error&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;Throw&lt;/span&gt; &lt;span class="k"&gt;New&lt;/span&gt; &lt;span class="n"&gt;Exception&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;&amp;#34;CryptProtectData failed.&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; _
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;New&lt;/span&gt; &lt;span class="n"&gt;Win32Exception&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;errCode&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;End&lt;/span&gt; &lt;span class="k"&gt;If&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;Dim&lt;/span&gt; &lt;span class="n"&gt;cipherTextBytes&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;cipherTextBlob&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;cbData&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="ow"&gt;As&lt;/span&gt; &lt;span class="kt"&gt;Byte&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;Marshal&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Copy&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;cipherTextBlob&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;pbData&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;cipherTextBytes&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; _
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;cipherTextBlob&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;cbData&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;Return&lt;/span&gt; &lt;span class="n"&gt;cipherTextBytes&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;Catch&lt;/span&gt; &lt;span class="n"&gt;ex&lt;/span&gt; &lt;span class="ow"&gt;As&lt;/span&gt; &lt;span class="n"&gt;Exception&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;Throw&lt;/span&gt; &lt;span class="k"&gt;New&lt;/span&gt; &lt;span class="n"&gt;Exception&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;&amp;#34;DPAPI was unable to encrypt data.&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;ex&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;Finally&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;If&lt;/span&gt; &lt;span class="k"&gt;Not&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;plainTextBlob&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;pbData&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Equals&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;IntPtr&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Zero&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt; &lt;span class="k"&gt;Then&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;Marshal&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;FreeHGlobal&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;plainTextBlob&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;pbData&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;End&lt;/span&gt; &lt;span class="k"&gt;If&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;If&lt;/span&gt; &lt;span class="k"&gt;Not&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;cipherTextBlob&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;pbData&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Equals&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;IntPtr&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Zero&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt; &lt;span class="k"&gt;Then&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;Marshal&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;FreeHGlobal&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;cipherTextBlob&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;pbData&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;End&lt;/span&gt; &lt;span class="k"&gt;If&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;If&lt;/span&gt; &lt;span class="k"&gt;Not&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;entropyBlob&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;pbData&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Equals&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;IntPtr&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Zero&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt; &lt;span class="k"&gt;Then&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;Marshal&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;FreeHGlobal&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;entropyBlob&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;pbData&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;End&lt;/span&gt; &lt;span class="k"&gt;If&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;End&lt;/span&gt; &lt;span class="k"&gt;Try&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;End&lt;/span&gt; &lt;span class="k"&gt;Function&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;End&lt;/span&gt; &lt;span class="k"&gt;Class&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;Sub&lt;/span&gt; &lt;span class="nf"&gt;Main&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;ByVal&lt;/span&gt; &lt;span class="n"&gt;args&lt;/span&gt; &lt;span class="ow"&gt;As&lt;/span&gt; &lt;span class="kt"&gt;String&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;Try&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;Dim&lt;/span&gt; &lt;span class="n"&gt;text&lt;/span&gt; &lt;span class="ow"&gt;As&lt;/span&gt; &lt;span class="kt"&gt;String&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;args&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;Dim&lt;/span&gt; &lt;span class="n"&gt;encrypted&lt;/span&gt; &lt;span class="ow"&gt;As&lt;/span&gt; &lt;span class="kt"&gt;String&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;encrypted&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;DPAPI&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Encrypt&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;DPAPI&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;KeyType&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;MachineKey&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;text&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;Nothing&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;&amp;#34;psw&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;Console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;WriteLine&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;&amp;#34;{0}&amp;#34;&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&lt;/span&gt; &lt;span class="n"&gt;Chr&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;13&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&lt;/span&gt; &lt;span class="n"&gt;Chr&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;10&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="n"&gt;encrypted&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;Catch&lt;/span&gt; &lt;span class="n"&gt;ex&lt;/span&gt; &lt;span class="ow"&gt;As&lt;/span&gt; &lt;span class="n"&gt;Exception&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;While&lt;/span&gt; &lt;span class="k"&gt;Not&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;ex&lt;/span&gt; &lt;span class="ow"&gt;Is&lt;/span&gt; &lt;span class="k"&gt;Nothing&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;Console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;WriteLine&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;ex&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Message&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;ex&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;ex&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;InnerException&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;End&lt;/span&gt; &lt;span class="k"&gt;While&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;End&lt;/span&gt; &lt;span class="k"&gt;Try&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;End&lt;/span&gt; &lt;span class="k"&gt;Sub&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;End&lt;/span&gt; &lt;span class="k"&gt;Module&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="err"&gt;&amp;#39;&lt;/span&gt;&lt;span class="o"&gt;======&lt;/span&gt;&lt;span class="n"&gt;EOF&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;section class="comments"&gt;
&lt;h2&gt;2 Comments&lt;/h2&gt;
&lt;ol class="comment-list"&gt;
&lt;li class="comment depth-0"&gt;&lt;div class="comment-meta"&gt;&lt;span class="comment-author"&gt;&lt;a href="http://Decript" rel="nofollow ugc"&gt;James&lt;/a&gt;&lt;/span&gt; &lt;time datetime="2010-07-05"&gt;Jul 5, 2010&lt;/time&gt;&lt;/div&gt;&lt;div class="comment-body"&gt;&lt;p&gt;Hi friends, anyone know where I can find the code to decrypt in vb.net? Thanks for your help&lt;/p&gt;</description></item><item><title>Working with bitfields in Delphi</title><link>https://remkoweijnen.nl/blog/2008/05/01/working-with-bitfields-in-delphi/</link><pubDate>Thu, 01 May 2008 23:06:00 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2008/05/01/working-with-bitfields-in-delphi/</guid><description>&lt;p&gt;Recently I needed to convert a C header file to Delphi which contained bitfields. Let&amp;rsquo;s take a look at a sample structure that contains bitfields:&lt;/p&gt;
&lt;div class="codecard"&gt;
 &lt;div class="codehead"&gt;
 &lt;span class="codefile"&gt;&lt;/span&gt;
 &lt;span class="codetools" data-pagefind-ignore&gt;
 &lt;span class="codelang"&gt;cpp&lt;/span&gt;
 &lt;button class="codebtn" type="button" data-copy&gt;Copy&lt;/button&gt;
 &lt;a class="codebtn" download=".cpp" href="data:text/plain;charset=utf-8;base64,dHlwZWRlZiBzdHJ1Y3QgX0JJVEZJRUxEU1RSVUNUVVJFIHsKICAgIERXT1JEIGR3VmFsdWUxOwogICAgVUxPTkcgQml0VmFsdWUxOiAxOwogICAgVUxPTkcgQml0VmFsdWUyOiAxOwogICAgVUxPTkcgQml0VmFsdWUzOiAxOwogICAgVUxPTkcgQml0VmFsdWU0OiAxOwp9IEJJVEZJRUxEU1RSVUNUVVJFLCAqIEJJVEZJRUxEU1RSVUNUVVJFOw=="&gt;Download&lt;/a&gt;
 &lt;/span&gt;
 &lt;/div&gt;
 &lt;div class="codebody"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-cpp" data-lang="cpp"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;typedef&lt;/span&gt; &lt;span class="k"&gt;struct&lt;/span&gt; &lt;span class="nc"&gt;_BITFIELDSTRUCTURE&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;DWORD&lt;/span&gt; &lt;span class="n"&gt;dwValue1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;ULONG&lt;/span&gt; &lt;span class="nl"&gt;BitValue1&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;ULONG&lt;/span&gt; &lt;span class="nl"&gt;BitValue2&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;ULONG&lt;/span&gt; &lt;span class="nl"&gt;BitValue3&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;ULONG&lt;/span&gt; &lt;span class="nl"&gt;BitValue4&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="n"&gt;BITFIELDSTRUCTURE&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;BITFIELDSTRUCTURE&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;It means that there is a DWORD (Cardinal) dwValue1 followed by a bitfield with the size of a ULONG (32 bits). In this bitfield 4 values are defined (BitValue1..4) which are used as boolean&amp;rsquo;s because the value can offcourse be 0 or 1. Since Delphi doesn&amp;rsquo;t know a bitfield type the question is how to translate it. Usually it would mean that we simply treat the whole bitfield value as a ULONG and extract the required properties by applying a bitmask (shl/shr). Starting from BDS2006 we can define a record with propertes and use getters and setters. Using this technique we can present boolean values to the user:&lt;/p&gt;</description></item><item><title>Using Windows Server 2008 as a SUPER workstation OS</title><link>https://remkoweijnen.nl/blog/2008/04/06/using-windows-server-2008-as-a-super-workstation-os/</link><pubDate>Sun, 06 Apr 2008 23:35:48 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2008/04/06/using-windows-server-2008-as-a-super-workstation-os/</guid><description>&lt;p&gt;Vijayshinva Karnure wrote a very cool article about running Server 2008 as a desktop os or rather as a Windows Vista replacement. It seems that besides additional features like Hyper-V, Server 2008 runs approx. 20% faster than Vista.&lt;/p&gt;
&lt;p&gt;If only upgrading Vista to Server 2008 would be possible&amp;hellip; (has anyone ever tried)?&lt;/p&gt;</description></item><item><title>How to deactivate Internet Explorer Enhanced Security Configuration in Windows Server 2008?</title><link>https://remkoweijnen.nl/blog/2008/04/04/how-to-deactivate-internet-explorer-enhanced-security-configuration-in-windows-server-2008/</link><pubDate>Fri, 04 Apr 2008 15:44:33 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2008/04/04/how-to-deactivate-internet-explorer-enhanced-security-configuration-in-windows-server-2008/</guid><description>&lt;p&gt;Open Server Manager and in the Security Information tab click Configure IE ESC. An improvement in Server 2008 is that you can disable it for Administators but enable it for Normal Users, this is nice for Terminal Server and Citrix environments.&lt;/p&gt;</description></item><item><title>How to install Powershell in Server 2008?</title><link>https://remkoweijnen.nl/blog/2008/04/04/how-to-install-powershell-in-server-2008/</link><pubDate>Fri, 04 Apr 2008 15:40:02 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2008/04/04/how-to-install-powershell-in-server-2008/</guid><description>&lt;p&gt;Even though Powershell is included with Windows Server 2008 it&amp;rsquo;s not installed by default. You can do this in Server Manager by going to Features and then Click Add Features in the Tasks bar on the right. Select Windows Powershell in the list and there you go!&lt;/p&gt;</description></item><item><title>Microsoft Remote Server Administration Tools released</title><link>https://remkoweijnen.nl/blog/2008/03/26/microsoft-remote-server-administration-tools-released/</link><pubDate>Wed, 26 Mar 2008 20:59:20 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2008/03/26/microsoft-remote-server-administration-tools-released/</guid><description>&lt;p&gt;&lt;span&gt;Microsoft has releaseed the Remote Server Administration Tools (RSAT) for Vista SP1. RSAT enables IT administrators to remotely manage roles and features in Windows Server 2008 from a computer running Windows Vista with SP1. It includes support for remote management of computers running either a Server Core installation or the full installation option of Windows Server 2008. It provides similar functionality to Windows Server 2003 Administration Tools Pack.&lt;br&gt;
&lt;/span&gt;&lt;/p&gt;</description></item><item><title>New home for Jedi Apilib and Jedi Security Library</title><link>https://remkoweijnen.nl/blog/2008/03/03/new-home-for-jedi-apilib-and-jedi-security-library/</link><pubDate>Mon, 03 Mar 2008 15:38:34 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2008/03/03/new-home-for-jedi-apilib-and-jedi-security-library/</guid><description>&lt;p&gt;A new website (blog) was opened for the Jedi Apilib and Jedi Security Library. I invite you all to take a look!&lt;/p&gt;
&lt;p&gt;You can find it &lt;a href="http://blog.delphi-jedi.net/2008/03/02/welcome/"&gt;here&lt;/a&gt;&lt;/p&gt;</description></item><item><title>How rdp passwords are encrypted 2</title><link>https://remkoweijnen.nl/blog/2008/03/02/how-rdp-passwords-are-encrypted-2/</link><pubDate>Sun, 02 Mar 2008 23:28:57 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2008/03/02/how-rdp-passwords-are-encrypted-2/</guid><description>&lt;p&gt;Several months ago I &lt;a href="https://remkoweijnen.nl/blog/2007/10/18/how-rdp-passwords-are-encrypted/"&gt;wrote&lt;/a&gt; about encrypting and decrypting RDP passwords. I left one thing open: encrypting the password up to the full 1329 bytes as mstsc does.&lt;/p&gt;
&lt;p&gt;Many people were curious about it so I hope the answer is not a disappointment because it&amp;rsquo;s actually really simple (but I took me a while to figure that out nonetheless). In what I figure is an attempt to hide the password length mstsc always fills up the password with zeroes until it has 512 bytes length.&lt;/p&gt;</description></item><item><title>Vista SP1 changes to Terminal Server API</title><link>https://remkoweijnen.nl/blog/2008/03/02/vista-sp1-changes-to-terminal-server-api/</link><pubDate>Sun, 02 Mar 2008 15:31:55 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2008/03/02/vista-sp1-changes-to-terminal-server-api/</guid><description>&lt;p&gt;In a previous &lt;a href="https://remkoweijnen.nl/blog/2007/12/19/why-tsadmin-crashes-on-windows-vista/"&gt;article&lt;/a&gt; I wrote about changes in utildll in vista that breaked compatibality for Terminal Server. Even though release notes for Service Pack 1 don&amp;rsquo;t indicate changes or fixes in this area my testing shows that Microsoft has taken over the Windows 2008 implementation of utildll to Vista.&lt;/p&gt;</description></item><item><title>Supporting for in loop in TObjectList descendants</title><link>https://remkoweijnen.nl/blog/2008/03/02/supporting-for-in-loop-in-tobjectlist-descendants/</link><pubDate>Sun, 02 Mar 2008 15:08:19 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2008/03/02/supporting-for-in-loop-in-tobjectlist-descendants/</guid><description>&lt;p&gt;For my Terminal Server unit in the Jedi Security library I use 2 TObjectList descendants to hold a list of Terminal Server Sessions and Processes. Consider the sample below which connects to a server and enumerates all sessions:&lt;br&gt;
&lt;br&gt;&lt;/p&gt;
&lt;div class="codecard"&gt;
 &lt;div class="codehead"&gt;
 &lt;span class="codefile"&gt;&lt;/span&gt;
 &lt;span class="codetools" data-pagefind-ignore&gt;
 &lt;span class="codelang"&gt;objectpascal&lt;/span&gt;
 &lt;button class="codebtn" type="button" data-copy&gt;Copy&lt;/button&gt;
 &lt;a class="codebtn" download=".pas" href="data:text/plain;charset=utf-8;base64,dmFyCiAgQVRlcm1pbmFsU2VydmVyOiBUSndUZXJtaW5hbFNlcnZlcjsKICBpOiBJbnRlZ2VyOwpiZWdpbgogIEFUZXJtaW5hbFNlcnZlciA6PSBUandUZXJtaW5hbFNlcnZlci5DcmVhdGU7CgogIEFUZXJtaW5hbFNlcnZlci5TZXJ2ZXIgOj0gJ1RTMDAxJzsKCiAgdHJ5CiAgICBpZiBBVGVybWluYWxTZXJ2ZXIuRW51bWVyYXRlU2Vzc2lvbnMgdGhlbgogICAgYmVnaW4KCiAgICAgIC8vIE5vdyBsb29wIHRocm91Z2ggdGhlIGxpc3QKICAgICAgZm9yIGkgOj0gMCB0byBBVGVybWluYWxTZXJ2ZXIuU2Vzc2lvbnMuQ291bnQgLSAxIGRvCiAgICAgIGJlZ2luCiAgICAgICAgTWVtbzEuTGluZXMuQWRkKEFUZXJtaW5hbFNlcnZlci5TZXNzaW9uc1tpXS5Vc2VybmFtZSk7CiAgICAgIGVuZDsKCiAgICBlbmQ7CiAgZXhjZXB0CiAgICBvbiBFOiBFSndzY2xXaW5DYWxsRmFpbGVkRXhjZXB0aW9uIGRvCiAgICBiZWdpbgogICAgICAvLyBIYW5kbGUgRXhjZXB0aW9uIGhlcmUKICAgIGVuZDsKICBlbmQ7CgogIC8vIEZyZWUgTWVtb3J5CiAgQVRlcm1pbmFsU2VydmVyLkZyZWU7CmVuZDs="&gt;Download&lt;/a&gt;
 &lt;/span&gt;
 &lt;/div&gt;
 &lt;div class="codebody"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-objectpascal" data-lang="objectpascal"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="kr"&gt;var&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;ATerminalServer&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;TJwTerminalServer&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;i&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kt"&gt;Integer&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="kr"&gt;begin&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;ATerminalServer&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;:=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;TjwTerminalServer&lt;span class="p"&gt;.&lt;/span&gt;Create&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;ATerminalServer&lt;span class="p"&gt;.&lt;/span&gt;Server&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;:=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;#39;TS001&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kr"&gt;try&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kr"&gt;if&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;ATerminalServer&lt;span class="p"&gt;.&lt;/span&gt;EnumerateSessions&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kr"&gt;then&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kr"&gt;begin&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="c1"&gt;// Now loop through the list&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kr"&gt;for&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;i&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;:=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kr"&gt;to&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;ATerminalServer&lt;span class="p"&gt;.&lt;/span&gt;Sessions&lt;span class="p"&gt;.&lt;/span&gt;Count&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kr"&gt;do&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kr"&gt;begin&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;Memo1&lt;span class="p"&gt;.&lt;/span&gt;Lines&lt;span class="p"&gt;.&lt;/span&gt;Add&lt;span class="o"&gt;(&lt;/span&gt;ATerminalServer&lt;span class="p"&gt;.&lt;/span&gt;Sessions&lt;span class="p"&gt;[&lt;/span&gt;i&lt;span class="p"&gt;].&lt;/span&gt;Username&lt;span class="o"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kr"&gt;end&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kr"&gt;end&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kr"&gt;except&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;on&lt;span class="w"&gt; &lt;/span&gt;E&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;EJwsclWinCallFailedException&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kr"&gt;do&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kr"&gt;begin&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="c1"&gt;// Handle Exception here&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kr"&gt;end&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kr"&gt;end&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="c1"&gt;// Free Memory&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;ATerminalServer&lt;span class="p"&gt;.&lt;/span&gt;Free&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="kr"&gt;end&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;br&gt;
In the sample I loop through the sessions with a for loop. Even though Delphi supports the for in loop since Delphi 2005 it's not possible to use this in TObjectList descendants, so we cannot use this:
&lt;br&gt;
&lt;div class="codecard"&gt;
 &lt;div class="codehead"&gt;
 &lt;span class="codefile"&gt;&lt;/span&gt;
 &lt;span class="codetools" data-pagefind-ignore&gt;
 &lt;span class="codelang"&gt;objectpascal&lt;/span&gt;
 &lt;button class="codebtn" type="button" data-copy&gt;Copy&lt;/button&gt;
 &lt;a class="codebtn" download=".pas" href="data:text/plain;charset=utf-8;base64,Ly8gTm93IGxvb3AgdGhyb3VnaCB0aGUgbGlzdApmb3IgU2Vzc2lvbiBpbiBBVGVybWluYWxTZXJ2ZXIuU2Vzc2lvbkxpc3QgZG8KYmVnaW4KICBNZW1vMS5MaW5lcy5BZGQoU2Vzc2lvbi5Vc2VybmFtZSk7CmVuZDs="&gt;Download&lt;/a&gt;
 &lt;/span&gt;
 &lt;/div&gt;
 &lt;div class="codebody"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-objectpascal" data-lang="objectpascal"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;// Now loop through the list&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="kr"&gt;for&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;Session&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kr"&gt;in&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;ATerminalServer&lt;span class="p"&gt;.&lt;/span&gt;SessionList&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kr"&gt;do&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="kr"&gt;begin&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;Memo1&lt;span class="p"&gt;.&lt;/span&gt;Lines&lt;span class="p"&gt;.&lt;/span&gt;Add&lt;span class="o"&gt;(&lt;/span&gt;Session&lt;span class="p"&gt;.&lt;/span&gt;Username&lt;span class="o"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="kr"&gt;end&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;br&gt;
To make this possible we need to implement GetEnumerator and an Enumerator class:
&lt;br&gt;
&lt;div class="codecard"&gt;
 &lt;div class="codehead"&gt;
 &lt;span class="codefile"&gt;&lt;/span&gt;
 &lt;span class="codetools" data-pagefind-ignore&gt;
 &lt;span class="codelang"&gt;objectpascal&lt;/span&gt;
 &lt;button class="codebtn" type="button" data-copy&gt;Copy&lt;/button&gt;
 &lt;a class="codebtn" download=".pas" href="data:text/plain;charset=utf-8;base64,VEp3U2Vzc2lvbnNFbnVtZXJhdG9yID0gY2xhc3MKcHJpdmF0ZQogIEZJbmRleDogSW50ZWdlcjsKICBGU2Vzc2lvbnM6IFRKd1dUU1Nlc3Npb25MaXN0OwpwdWJsaWMKICBjb25zdHJ1Y3RvciBDcmVhdGUoQVNlc3Npb25MaXN0OiBUSndXVFNTZXNzaW9uTGlzdCk7CiAgZnVuY3Rpb24gR2V0Q3VycmVudDogVEp3V1RTU2Vzc2lvbjsKICBmdW5jdGlvbiBNb3ZlTmV4dDogQm9vbGVhbjsKICBwcm9wZXJ0eSBDdXJyZW50OiBUSndXVFNTZXNzaW9uIHJlYWQgR2V0Q3VycmVudDsKZW5kOwoKY29uc3RydWN0b3IgVEp3U2Vzc2lvbnNFbnVtZXJhdG9yLkNyZWF0ZShBU2Vzc2lvbkxpc3Q6IFRKd1dUU1Nlc3Npb25MaXN0KTsKYmVnaW4KICBpbmhlcml0ZWQgQ3JlYXRlOwogIEZJbmRleCA6PSAtMTsKICBGU2Vzc2lvbnMgOj0gQVNlc3Npb25MaXN0OwplbmQ7CgpmdW5jdGlvbiBUSndTZXNzaW9uc0VudW1lcmF0b3IuR2V0Q3VycmVudDsKYmVnaW4KICBSZXN1bHQgOj0gRlNlc3Npb25zW0ZJbmRleF07CmVuZDsKCmZ1bmN0aW9uIFRKd1Nlc3Npb25zRW51bWVyYXRvci5Nb3ZlTmV4dDogQm9vbGVhbjsKYmVnaW4KICBSZXN1bHQgOj0gRkluZGV4IDwgRlNlc3Npb25zLkNvdW50IC0gMTsKICBpZiBSZXN1bHQgdGhlbgogICAgSW5jKEZJbmRleCk7CmVuZDs="&gt;Download&lt;/a&gt;
 &lt;/span&gt;
 &lt;/div&gt;
 &lt;div class="codebody"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-objectpascal" data-lang="objectpascal"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;TJwSessionsEnumerator&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kr"&gt;class&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;private&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;FIndex&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kt"&gt;Integer&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;FSessions&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;TJwWTSSessionList&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;public&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kr"&gt;constructor&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;Create&lt;span class="o"&gt;(&lt;/span&gt;ASessionList&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;TJwWTSSessionList&lt;span class="o"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kr"&gt;function&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;GetCurrent&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;TJwWTSSession&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kr"&gt;function&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;MoveNext&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kt"&gt;Boolean&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kr"&gt;property&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;Current&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;TJwWTSSession&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;read&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;GetCurrent&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="kr"&gt;end&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="kr"&gt;constructor&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;TJwSessionsEnumerator&lt;span class="p"&gt;.&lt;/span&gt;Create&lt;span class="o"&gt;(&lt;/span&gt;ASessionList&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;TJwWTSSessionList&lt;span class="o"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="kr"&gt;begin&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kr"&gt;inherited&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;Create&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;FIndex&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;:=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;FSessions&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;:=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;ASessionList&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="kr"&gt;end&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="kr"&gt;function&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;TJwSessionsEnumerator&lt;span class="p"&gt;.&lt;/span&gt;GetCurrent&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="kr"&gt;begin&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="ge"&gt;Result&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;:=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;FSessions&lt;span class="p"&gt;[&lt;/span&gt;FIndex&lt;span class="p"&gt;];&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="kr"&gt;end&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="kr"&gt;function&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;TJwSessionsEnumerator&lt;span class="p"&gt;.&lt;/span&gt;MoveNext&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kt"&gt;Boolean&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="kr"&gt;begin&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="ge"&gt;Result&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;:=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;FIndex&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;FSessions&lt;span class="p"&gt;.&lt;/span&gt;Count&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kr"&gt;if&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="ge"&gt;Result&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kr"&gt;then&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;Inc&lt;span class="o"&gt;(&lt;/span&gt;FIndex&lt;span class="o"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="kr"&gt;end&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;br&gt;
Now we add a function with the name GetEnumerator in the SessionList class:
&lt;br&gt;
&lt;div class="codecard"&gt;
 &lt;div class="codehead"&gt;
 &lt;span class="codefile"&gt;&lt;/span&gt;
 &lt;span class="codetools" data-pagefind-ignore&gt;
 &lt;span class="codelang"&gt;objectpascal&lt;/span&gt;
 &lt;button class="codebtn" type="button" data-copy&gt;Copy&lt;/button&gt;
 &lt;a class="codebtn" download=".pas" href="data:text/plain;charset=utf-8;base64,ZnVuY3Rpb24gVEp3V1RTU2Vzc2lvbkxpc3QuR2V0RW51bWVyYXRvcjogVEp3U2Vzc2lvbnNFbnVtZXJhdG9yOwpiZWdpbgogIFJlc3VsdCA6PSBUSndTZXNzaW9uc0VudW1lcmF0b3IuQ3JlYXRlKFNlbGYpOwplbmQ7"&gt;Download&lt;/a&gt;
 &lt;/span&gt;
 &lt;/div&gt;
 &lt;div class="codebody"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-objectpascal" data-lang="objectpascal"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="kr"&gt;function&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;TJwWTSSessionList&lt;span class="p"&gt;.&lt;/span&gt;GetEnumerator&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;TJwSessionsEnumerator&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="kr"&gt;begin&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="ge"&gt;Result&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;:=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;TJwSessionsEnumerator&lt;span class="p"&gt;.&lt;/span&gt;Create&lt;span class="o"&gt;(&lt;/span&gt;Self&lt;span class="o"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="kr"&gt;end&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;br&gt;
And that's really all!
&lt;section class="comments"&gt;
&lt;h2&gt;1 Comments&lt;/h2&gt;
&lt;ol class="comment-list"&gt;
&lt;li class="comment depth-0"&gt;&lt;div class="comment-meta"&gt;&lt;span class="comment-author"&gt;&lt;a href="http://blog.delphi-jedi.net/2008/03/03/remko-shows-us-how-to-use-the-terminal-server-feature-of-jwscl/" rel="nofollow ugc"&gt;&amp;amp;nbsp; Remko shows us how to use the Terminal Server feature of JWSCL&amp;amp;nbsp;by&amp;amp;nbsp;JEDI Windows API&lt;/a&gt;&lt;/span&gt; &lt;time datetime="2008-03-03"&gt;Mar 3, 2008&lt;/time&gt;&lt;/div&gt;&lt;div class="comment-body"&gt;&lt;p&gt;[...] Go and learn more about it here. [...]&lt;/p&gt;</description></item><item><title>TSAdminEx Progress</title><link>https://remkoweijnen.nl/blog/2008/01/27/test-2/</link><pubDate>Sun, 27 Jan 2008 23:04:07 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2008/01/27/test-2/</guid><description>&lt;p&gt;I just wanted to show some of the progress that I made in development of TSAdminEx. I thought the best way would be to show some screenshots. Which reminds me I installed a nice Javascript to enlarge the thumbnails, click to see it&amp;hellip;&lt;/p&gt;</description></item><item><title>Softpedia</title><link>https://remkoweijnen.nl/blog/2008/01/25/softpedia/</link><pubDate>Fri, 25 Jan 2008 20:22:25 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2008/01/25/softpedia/</guid><description>&lt;p&gt;Today I received an e-mail from Softpedia telling me that they have &lt;a target="_blank" href="http://www.softpedia.com/get/Internet/Remote-Utils/Launch-RDP.shtml"&gt;listed&lt;/a&gt; one of my commandline tools, LaunchRDP. I don&amp;rsquo;t know how they found or why they think that it should be listed, but it&amp;rsquo;s nice to see that they respect the author and informed me. If you want to rate it, &lt;a target="_blank" href="http://www.softpedia.com/get/Internet/Remote-Utils/Launch-RDP.shtml"&gt;here&amp;rsquo;s&lt;/a&gt; your chance!&lt;/p&gt;</description></item><item><title>Using WTSWaitSystemEvent</title><link>https://remkoweijnen.nl/blog/2008/01/25/using-wtswaitsystemevent/</link><pubDate>Fri, 25 Jan 2008 18:02:13 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2008/01/25/using-wtswaitsystemevent/</guid><description>&lt;p&gt;If you develop an application for Terminal Server you might want to react on session events. This means that your application is notified when a user logs on, logs off or becomes idle. This can be done with the &lt;a target="_blank" href="http://msdn2.microsoft.com/en-us/library/aa383856(VS.85).aspx"&gt;WTSWaitSystemEvent&lt;/a&gt; function. Implementing it is rather simple and could look something like this:&lt;/p&gt;</description></item><item><title>Why TSAdmin crashes on Windows Vista</title><link>https://remkoweijnen.nl/blog/2007/12/19/why-tsadmin-crashes-on-windows-vista/</link><pubDate>Wed, 19 Dec 2007 21:38:39 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2007/12/19/why-tsadmin-crashes-on-windows-vista/</guid><description>&lt;p&gt;Have you ever tried running the Terminal Server Administration tool (aka TSAdmin) on Windows Vista? You would need it to remotely administer windows 2000/2003 Terminal Servers. If you try to run it you will get an Access Violation but why? I found the answer to this question today because I was testing my &lt;a target="_blank" href="https://remkoweijnen.nl/blog/2007/10/23/tsadminex/"&gt;TSAdmin replacement &lt;/a&gt;on different Windows versions. Just like TSAdmin I use an (undocumented) function from Utildll.dll called ElapsedTimeString. It&amp;rsquo;s a very simple function that returns a formatted elapsed time string (as seen in the Idle time column from TSAdmin).&lt;/p&gt;</description></item><item><title>Undocumented API's from Utildll</title><link>https://remkoweijnen.nl/blog/2007/12/09/undocumented-apis-from-utildll/</link><pubDate>Sun, 09 Dec 2007 11:05:04 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2007/12/09/undocumented-apis-from-utildll/</guid><description>&lt;p&gt;Several of Microsoft&amp;rsquo;s Terminal Server tools use undocumented API&amp;rsquo;s from Utildll.dll. For instance Terminal Server Admin uses it to get a localised connect state string and to format time strings like idle time, logon time etc.&lt;/p&gt;
&lt;p&gt;Functions below seems to be the most usefull ones, I will add those to the JwaWinsta unit:&lt;/p&gt;</description></item><item><title>IDA 4.9 released as freeware</title><link>https://remkoweijnen.nl/blog/2007/12/09/ida-49-released-as-freeware/</link><pubDate>Sun, 09 Dec 2007 10:49:16 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2007/12/09/ida-49-released-as-freeware/</guid><description>&lt;p&gt;Datarescue has release IDA 4.9 as freeware. IDA Pro is the de-facto standard for the analysis of hostile code, vulnerability research and reverse engineering in general. You can find IDA freeware here: &lt;a href="http://www.datarescue.com/idabase/idadownfreeware.htm"&gt;&lt;a href="http://www.datarescue.com/idabase/idadownfreeware.htm"&gt;http://www.datarescue.com/idabase/idadownfreeware.htm&lt;/a&gt;&lt;/a&gt;&lt;/p&gt;
&lt;section class="comments"&gt;
&lt;h2&gt;1 Comments&lt;/h2&gt;
&lt;ol class="comment-list"&gt;
&lt;li class="comment depth-0"&gt;&lt;div class="comment-meta"&gt;&lt;span class="comment-author"&gt;&lt;a href="http://" rel="nofollow ugc"&gt;Remko&lt;/a&gt;&lt;/span&gt; &lt;time datetime="2007-12-19"&gt;Dec 19, 2007&lt;/time&gt;&lt;/div&gt;&lt;div class="comment-body"&gt;&lt;p&gt;Assarbad has setup a mirror to the freeware version of IDA on the idapalace site. You can find it here: http://old.idapalace.net/news.html&lt;/p&gt;</description></item><item><title>Delphi and Terminal Server Aware</title><link>https://remkoweijnen.nl/blog/2007/11/24/delphi-and-terminal-server-aware/</link><pubDate>Sat, 24 Nov 2007 23:21:37 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2007/11/24/delphi-and-terminal-server-aware/</guid><description>&lt;p&gt;When an application is not Terminal Server aware (also known as a legacy application), Terminal Server makes certain modifications to the legacy application to make it work properly in a multiuser environment. For example, Terminal Server will create a virtual Windows folder, such that each user gets a Windows folder instead of getting the system&amp;rsquo;s Windows directory. This gives users access to their own INI files. In addition, Terminal Server makes some adjustments to the registry for a legacy application. These modifications slow the loading of the legacy application on Terminal Server and require up to 8 MegaBytes extra memory. This behaviour can be avoided if the TSAware flag is present in the PE header of an executable as can be read &lt;a target="_blank" href="http://msdn2.microsoft.com/en-us/library/microsoft.visualstudio.vcprojectengine.vclinkertool.terminalserveraware(VS.80).aspx"&gt;here&lt;/a&gt; at MSDN.&lt;/p&gt;</description></item><item><title>Even more undocumented Terminal Server API's uncovered</title><link>https://remkoweijnen.nl/blog/2007/11/21/even-more-undocumented-terminal-server-apis-uncovered/</link><pubDate>Wed, 21 Nov 2007 18:18:37 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2007/11/21/even-more-undocumented-terminal-server-apis-uncovered/</guid><description>&lt;p&gt;I was contact by Danila Galimov a while ago because he was working with my JwaWinsta unit. Together we were able (and are still working on) uncovering more of the undocumented API&amp;rsquo;s in winsta.dll.&lt;/p&gt;
&lt;p&gt; We found several new classes for WinStationQueryInformationW that return lots of information:&lt;/p&gt;</description></item><item><title>Multiple Terminal Sessions in Windows Vista</title><link>https://remkoweijnen.nl/blog/2007/11/21/multiple-terminal-session-in-windows-vista/</link><pubDate>Wed, 21 Nov 2007 18:09:47 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2007/11/21/multiple-terminal-session-in-windows-vista/</guid><description>&lt;p&gt;There were 2 ways (known to me) of extending Windows XP to offer mulitple concurrent Terminal Sessions. One with the RC1 version of XP SP2 and one that patches Winlogon and Termsrv.dll. The latter offers not only multiple sessions but also multiple sessions under the same account and sessions to the local machine.&lt;/p&gt;</description></item><item><title>More undocumented Terminal Server API's</title><link>https://remkoweijnen.nl/blog/2007/11/09/more-undocumented-terminal-server-apis/</link><pubDate>Fri, 09 Nov 2007 22:42:58 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2007/11/09/more-undocumented-terminal-server-apis/</guid><description>&lt;p&gt;I added some more undocumented API&amp;rsquo;s to my Jwawinsta unit, the unit is now becoming a collection of the undocumented API&amp;rsquo;s in winsta.dll.&lt;/p&gt;
&lt;p&gt;These are the functions I added:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;WinStationDisconnect&lt;/li&gt;
	&lt;li&gt;WinStationGetProcessSid&lt;/li&gt;
	&lt;li&gt;CachedGetUserFromSid (exported by utildll.dll)&lt;/li&gt;
&lt;/ul&gt;
I also added some more parts of the undocumented structure returned by WinStationQueryInformationW, it now contains:
&lt;ul&gt;
	&lt;li&gt;Session State&lt;/li&gt;
	&lt;li&gt;WinStationName&lt;/li&gt;
	&lt;li&gt;SessionId&lt;/li&gt;
	&lt;li&gt;ConnectTime&lt;/li&gt;
	&lt;li&gt;DisconnectTime&lt;/li&gt;
	&lt;li&gt;LastInputTime&lt;/li&gt;
	&lt;li&gt;LogonTime&lt;/li&gt;
	&lt;li&gt;OutgoingFrames&lt;/li&gt;
	&lt;li&gt;OutgoingBytes&lt;/li&gt;
	&lt;li&gt;OutgoingCompressedBytes&lt;/li&gt;
	&lt;li&gt;IncomingCompressedBytes&lt;/li&gt;
	&lt;li&gt;IncomingFrames&lt;/li&gt;
	&lt;li&gt;IncomingBytes&lt;/li&gt;
	&lt;li&gt;Domain&lt;/li&gt;
	&lt;li&gt;Username&lt;/li&gt;
	&lt;li&gt;CurrentTime&lt;/li&gt;
&lt;/ul&gt;
&lt;section class="comments"&gt;
&lt;h2&gt;2 Comments&lt;/h2&gt;
&lt;ol class="comment-list"&gt;
&lt;li class="comment depth-0"&gt;&lt;div class="comment-meta"&gt;&lt;span class="comment-author"&gt;Chris&lt;/span&gt; &lt;time datetime="2007-12-03"&gt;Dec 3, 2007&lt;/time&gt;&lt;/div&gt;&lt;div class="comment-body"&gt;&lt;p&gt;I would like know how it is possible to access WindowStation and Desktops from a service.&lt;br&gt;
CreateDesktop and similar only works for the current session of the process.&lt;br&gt;
I know there exists NTQueryObject and similar but they are hard to understand and only query kernel objects.&lt;br&gt;
However creating a desktop from a service into another session is a mystery.&lt;/p&gt;</description></item><item><title>Terminal Server Client annoyances</title><link>https://remkoweijnen.nl/blog/2007/11/09/terminal-server-client-annoyances/</link><pubDate>Fri, 09 Nov 2007 21:39:50 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2007/11/09/terminal-server-client-annoyances/</guid><description>&lt;p&gt;If you want to get rid of this message: &lt;/p&gt;
&lt;p&gt;Remote Desktop cannot verify the identity of the computer you want to connect to.  This problem can occur if:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;The remote computer is running a version of Windows that is earlier than Windows Vista.&lt;/li&gt;
&lt;li&gt;The remote computer is configured to support only the RDP security layer.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Contact your network administrator or the owner of the remote computer for assistance.&lt;/p&gt;</description></item><item><title>Citrix Solutions Conference 2007</title><link>https://remkoweijnen.nl/blog/2007/11/08/citrix-solutions-conference-2007/</link><pubDate>Thu, 08 Nov 2007 15:01:24 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2007/11/08/citrix-solutions-conference-2007/</guid><description>&lt;p&gt;Yesterday I attended the Citrix Solutions Conference in Antwerp. Brad Pedersen (Chief Architect and Senior Fellow at  Citrix Systems) held an interesting speech about &lt;a target="_blank" href="http://www.citrix-eventservice.com/et/citrix/et/e/2007/01/1/m/be/agenda/popup/the_end_user_experience.html"&gt;The End User Experience&lt;/a&gt;. I liked especially liked the part about the history of Citrix and the early versions of their products like Wincredible and Winframe. Since Brad wrote the original code for Citrix and thus Terminal Server (the stuff that is in winsta.dll now) I hoped he could share some info with me on the undiscovered parts of winsta.dll. Unfortunately Brad could not do this because of a non disclosure agreement with Microsoft. He did tell me that Citrix is pushing Microsoft to make more Terminal Server API&amp;rsquo;s public. I presume that&amp;rsquo;s why Vista and Windows 2008 offer some new API&amp;rsquo;s which I wrote about &lt;a href="https://remkoweijnen.nl/blog/2007/10/30/new-terminal-server-apis-in-vista-sp1"&gt;earlier&lt;/a&gt;.&lt;/p&gt;</description></item><item><title>How to launch a process in a Terminal Session #2</title><link>https://remkoweijnen.nl/blog/2007/11/08/how-to-launch-a-process-in-a-terminal-session-2/</link><pubDate>Thu, 08 Nov 2007 13:48:18 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2007/11/08/how-to-launch-a-process-in-a-terminal-session-2/</guid><description>&lt;p&gt;&lt;img width="48" height="48" loading="lazy" decoding="async" align="right" src="https://remkoweijnen.nl/blog/wp-content/uploads/2007/11/cmd.webp" alt="Command Prompt Icon" /&gt;A little while ago I wrote an article on launching a process in another Terminal Session (&lt;a href="https://remkoweijnen.nl/blog/2007/10/20/how-to-launch-a-process-in-a-terminal-session/"&gt;/2007/10/20/how-to-launch-a-process-in-a-terminal-session/&lt;/a&gt;).&lt;/p&gt;
&lt;p&gt;The article didn&amp;rsquo;t have a demo app yet so I&amp;rsquo;ve attached it here.&lt;/p&gt;</description></item><item><title>JEDI Apilib and JEDI Windows Security Code Library</title><link>https://remkoweijnen.nl/blog/2007/11/08/jedi-apilib-and-jedi-windows-security-code-library/</link><pubDate>Thu, 08 Nov 2007 12:35:32 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2007/11/08/jedi-apilib-and-jedi-windows-security-code-library/</guid><description>&lt;p&gt;It has been a little silent on the &lt;a target="_blank" href="http://sourceforge.net/projects/jedi-apilib/"&gt;&lt;font color="#22229c"&gt;JEDI Apilib project&lt;/font&gt;&lt;/a&gt; lately, but this will change!&lt;/p&gt;
&lt;p&gt;We had some change in the team members: Marcel van Brakel, founder and large contributor of the project has signed off because he no longer actively uses Delphi. Christian Wimmer has joined the team and he is a very promising member.&lt;/p&gt;
&lt;p&gt;Christian has been working on a new include model (optional) of the Jedi Apilib which has the advantage that you only need to use one unit (JwaWindows) for the whole library.&lt;/p&gt;
&lt;p&gt;Chris has also published the JEDI Windows Security Code Library (Jwscl). This is library that tremendously simplifies using Win32 API calls from Delphi. At this point the library contains:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Windows Version&lt;/li&gt;
	&lt;li&gt;Token&lt;/li&gt;
	&lt;li&gt;Impersonation&lt;/li&gt;
	&lt;li&gt;Login&lt;/li&gt;
	&lt;li&gt;SID&lt;/li&gt;
	&lt;li&gt;Access Control List&lt;/li&gt;
	&lt;li&gt;Security Descriptor&lt;/li&gt;
	&lt;li&gt;Owner, Group, DACL, SACL&lt;/li&gt;
	&lt;li&gt;WindowStation&lt;/li&gt;
	&lt;li&gt;Desktop&lt;/li&gt;
	&lt;li&gt;LSA&lt;/li&gt;
	&lt;li&gt;Rights mapping&lt;/li&gt;
	&lt;li&gt;Secured Objects Files, Registry (+Inheritance), etc.&lt;/li&gt;
	&lt;li&gt;Credentials (Login Dialog)&lt;/li&gt;
	&lt;li&gt;Encryption (MS Crypto API)&lt;/li&gt;
	&lt;li&gt;Well Known SIDs&lt;/li&gt;
	&lt;li&gt;Privileges&lt;/li&gt;
	&lt;li&gt;Security Dialogs (The "ACL Editor" you see on the security yab when you rightclick object in Explorer)&lt;/li&gt;
	&lt;li&gt;Terminal Sessions&lt;/li&gt;
	&lt;li&gt;Unicode + Ansicode&lt;/li&gt;
	&lt;li&gt;Vista Elevation&lt;/li&gt;
	&lt;li&gt;Vista Integrity Level&lt;/li&gt;
&lt;/ul&gt;
Although Jwscl is in beta stage it is already very well useable.</description></item><item><title>Encrypt RDP password in Python</title><link>https://remkoweijnen.nl/blog/2007/11/05/encrypt-rdp-password-in-python/</link><pubDate>Mon, 05 Nov 2007 23:10:29 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2007/11/05/encrypt-rdp-password-in-python/</guid><description>&lt;p&gt;Dirk Schmitz send me his Python version of encrypting the RDP Password:&lt;/p&gt;
&lt;div class="codecard"&gt;
 &lt;div class="codehead"&gt;
 &lt;span class="codefile"&gt;&lt;/span&gt;
 &lt;span class="codetools" data-pagefind-ignore&gt;
 &lt;span class="codelang"&gt;python&lt;/span&gt;
 &lt;button class="codebtn" type="button" data-copy&gt;Copy&lt;/button&gt;
 &lt;a class="codebtn" download=".py" href="data:text/plain;charset=utf-8;base64,aW1wb3J0IHdpbjMyY3J5cHQKaW1wb3J0IGJpbmFzY2lpCgpwd2RIYXNoID0gd2luMzJjcnlwdC5DcnlwdFByb3RlY3REYXRhKHUiTVlQQVNTV09SRCIsdSdwc3cnLE5vbmUsTm9uZSxOb25lLDApCnByaW50IGJpbmFzY2lpLmhleGxpZnkocHdkSGFzaCk="&gt;Download&lt;/a&gt;
 &lt;/span&gt;
 &lt;/div&gt;
 &lt;div class="codebody"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-python" data-lang="python"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;win32crypt&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;binascii&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;pwdHash&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;win32crypt&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;CryptProtectData&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;u&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;MYPASSWORD&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="sa"&gt;u&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;psw&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="kc"&gt;None&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="kc"&gt;None&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="kc"&gt;None&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nb"&gt;print&lt;/span&gt; &lt;span class="n"&gt;binascii&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;hexlify&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;pwdHash&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&lt;br&gt;Read the original article here: &lt;a href="https://remkoweijnen.nl/blog/2007/10/18/how-rdp-passwords-are-encrypted/"&gt;/2007/10/18/how-rdp-passwords-are-encrypted/&lt;/a&gt;&lt;/p&gt;
&lt;section class="comments"&gt;
&lt;h2&gt;5 Comments&lt;/h2&gt;
&lt;ol class="comment-list"&gt;
&lt;li class="comment depth-0"&gt;&lt;div class="comment-meta"&gt;&lt;span class="comment-author"&gt;Arvid Requate&lt;/span&gt; &lt;time datetime="2010-11-14"&gt;Nov 14, 2010&lt;/time&gt;&lt;/div&gt;&lt;div class="comment-body"&gt;&lt;p&gt;Thank's, this really worked well, after a bit of fiddling (donation will be given asap). For Python 2.7 I had to remove the unicode conversion, otherwise the RDP server would not get the proper password. Interestingly your updated post about 512-byte padding and appending a '0'-character to obtain a 1329 'password 51'-hash did not work for me yet. Did you need the padding as a bugfix or did you suggest it merely as an imrovement to become fully compatible to the MS encoding format? (/2008/03/02/how-rdp-passwords-are-encrypted-2/).&lt;/p&gt;</description></item><item><title>Post Views</title><link>https://remkoweijnen.nl/blog/2007/11/02/post-views/</link><pubDate>Fri, 02 Nov 2007 21:18:28 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2007/11/02/post-views/</guid><description>&lt;p&gt;I was curious how many times my posts are viewed. So I installed &lt;a target="_blank" href="http://lesterchan.net/wordpress/readme/wp-pluginsused.html"&gt;this&lt;/a&gt; plugin which was made by Lester &amp;lsquo;GaMerZ&amp;rsquo; Chan. If you use Wordpress take a look at his other &lt;a target="_blank" href="http://lesterchan.net/wordpress/category/plugins/"&gt;plugins&lt;/a&gt;, there are some good ones there!&lt;/p&gt;</description></item><item><title>Query Active Directory from Excel</title><link>https://remkoweijnen.nl/blog/2007/11/01/query-active-directory-from-excel/</link><pubDate>Thu, 01 Nov 2007 18:23:55 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2007/11/01/query-active-directory-from-excel/</guid><description>&lt;p&gt;I had to lookup some users in Active Directory today which I received by mail. Offcourse I got full users name while I needed either samAccountName or full adsPath. Usually I write a small VBS script to do the lookup and paste this in Excel for further processing. But today I decided that an Excel function to do the lookup would be nice. So I wrote it.&lt;/p&gt;
&lt;p&gt;The function is called GetAdsProp and allows you to search on a specific AD field in the whole AD tree and return the value of another field.&lt;/p&gt;</description></item><item><title>Dear Visitor</title><link>https://remkoweijnen.nl/blog/2007/11/01/dear-visitor/</link><pubDate>Thu, 01 Nov 2007 16:19:05 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2007/11/01/dear-visitor/</guid><description>&lt;p&gt;If this is your first visit, take your time and look around. Here are some things you might be looking for:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;a href="http://www.simulatesas.com/blog/tag/saslibex/"&gt;SasLibEx&lt;/a&gt;: a library that can simulate the Secure Attention Sequence (Ctrl-Alt-Del) but it can even unlock a workstation or session without entering or needing the user's credentials (and many more things).&lt;/li&gt;
	&lt;li&gt;&lt;a href="https://remkoweijnen.nl/blog/2011/01/03/cannot-access-files-but-need-the-origin/"&gt;Who locks my file&lt;/a&gt;?&lt;/li&gt;
	&lt;li&gt;&lt;a href="https://remkoweijnen.nl/blog/2009/06/23/patch-vistas-kernel-to-address-more-than-4-gb-of-memory/"&gt;Patch 32 bit Windows to use the full 4 GB (and even more) memory&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;Patch Terminal Server to allow more Concurrent Sessions: &lt;a href="https://remkoweijnen.nl/blog/2008/08/31/patch-windows-2003-terminal-server-to-allow-more-than-2-concurrent-sessions/"&gt;2003&lt;/a&gt;, &lt;a href="https://remkoweijnen.nl/blog/2008/12/19/windows-xp-x64-terminal-server-patch-part-1-mandatory/"&gt;Windows XP X64&lt;/a&gt;, &lt;a href="https://remkoweijnen.nl/blog/2008/12/09/windows-2003-x64-terminal-server-patch/"&gt;2003 X64&lt;/a&gt;, &lt;a href="https://remkoweijnen.nl/blog/2008/10/21/patch-windows-2008-terminal-server-to-allow-more-than-2-concurrent-sessions/"&gt;2008&lt;/a&gt;, &lt;a href="https://remkoweijnen.nl/blog/2008/06/14/mutiple-concurrent-terminal-session-on-vista-sp1/"&gt;Vista&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;Some of my freeware tools such as &lt;a href="https://remkoweijnen.nl/blog/2007/10/17/launch-rdp-from-commandline/"&gt;LaunchRDP&lt;/a&gt;, &lt;a href="https://remkoweijnen.nl/blog/2007/10/18/how-rdp-passwords-are-encrypted/"&gt;RDP Password Encryption&lt;/a&gt;, &lt;a href="https://remkoweijnen.nl/blog/2007/11/01/query-active-directory-from-excel/"&gt;Active Directory Excel Addin&lt;/a&gt;, &lt;a href="https://remkoweijnen.nl/blog/2007/10/25/rdp-clipboard-fix/"&gt;RDP Clipboard Fix&lt;/a&gt; (well this list can go on and on, see also the Downloads section).&lt;/li&gt;
&lt;/ul&gt;
Do you like my work? Did my work help you?
&lt;ul&gt;
	&lt;li&gt;Leave a comment and tell me how it was usefull to you.&lt;/li&gt;
	&lt;li&gt;If you want you can make a donation with the Paypal Donate Button in the right Sidebar.&lt;/li&gt;
&lt;/ul&gt;
Thank you!</description></item><item><title>Google adds IMAP support to GMail</title><link>https://remkoweijnen.nl/blog/2007/11/01/google-adds-imap-support-to-gmail/</link><pubDate>Thu, 01 Nov 2007 15:53:58 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2007/11/01/google-adds-imap-support-to-gmail/</guid><description>&lt;p&gt;Google has added &lt;a rel="external" target="_blank" href="http://en.wikipedia.org/wiki/Imap" title="Wikipedia.org -- Internet Message Access Protocol"&gt;imap&lt;/a&gt; support to GMail. This means you can use an e-mail client like Outlook (Express) to read your mail but you don&amp;rsquo;t have to download and store them locally. Read more &lt;a rel="external" target="_blank" href="http://mail.google.com/support/bin/answer.py?ctx=gmail&amp;amp;hl=en&amp;amp;answer=75725"&gt;here&lt;/a&gt;. The Storage Limit has been raised to 4 GB (at time of writing 4569 MB)&lt;/p&gt;</description></item><item><title>How to get Client IP Address?</title><link>https://remkoweijnen.nl/blog/2007/10/31/how-to-get-client-ip-address/</link><pubDate>Wed, 31 Oct 2007 11:10:10 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2007/10/31/how-to-get-client-ip-address/</guid><description>&lt;p&gt;When a client is connected to a Terminal Server Session you can use the Terminal Server API to retrieve the client&amp;rsquo;s local IP address.&lt;/p&gt;
&lt;p&gt;Start by enumerating all sessions with &lt;a target="_blank" href="http://msdn2.microsoft.com/en-us/library/aa383833.aspx"&gt;WtsEnumerateSessions&lt;/a&gt; and then for each session get the ClientAddress with a call to &lt;a target="_blank" href="http://msdn2.microsoft.com/en-us/library/aa383838.aspx"&gt;WTSQuerySessionInformation&lt;/a&gt; with the WTSClientAddress parameter. Sound simple, no?&lt;/p&gt;
&lt;p&gt;WTSQuerySessionInformation returns a pointer to a &lt;a target="_blank" href="http://msdn2.microsoft.com/en-us/library/aa383857.aspx"&gt;WTS_CLIENT_ADDRESS&lt;/a&gt; structure. You need to know that the IP address is located at on &lt;em&gt;offset of 2 bytes&lt;/em&gt; in the Address member of WTS_CLIENT_ADDRESS.&lt;/p&gt;
&lt;p&gt;So here&amp;rsquo;s a sample:&lt;/p&gt;</description></item><item><title>New Terminal Server API's in Vista SP1</title><link>https://remkoweijnen.nl/blog/2007/10/30/new-terminal-server-apis-in-vista-sp1/</link><pubDate>Tue, 30 Oct 2007 22:19:25 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2007/10/30/new-terminal-server-apis-in-vista-sp1/</guid><description>&lt;p&gt;The upcoming Vista SP1 promises 3 new Terminal Server API functions:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;a target="_blank" href="http://msdn2.microsoft.com/en-us/library/bb394782.aspx"&gt;WTSConnectSession &lt;/a&gt;: Connects a Terminal Services session to an existing session on the local computer.&lt;/li&gt;
	&lt;li&gt;&lt;a target="_blank" href="http://msdn2.microsoft.com/en-us/library/bb394783.aspx"&gt;WTSStartRemoteControlSession&lt;/a&gt;: Starts the remote control of another Terminal Services session.&lt;/li&gt;
	&lt;li&gt;&lt;a target="_blank" href="http://msdn2.microsoft.com/en-us/library/bb394784.aspx"&gt;WTSStopRemoteControlSession &lt;/a&gt;: Stops a remote control session.&lt;/li&gt;
&lt;/ul&gt;
If you look in the Windows 2008 beta you can see that the functions are already implemented (in WtsApi32.dll):</description></item><item><title>Script to clear SQL Transactions logs</title><link>https://remkoweijnen.nl/blog/2007/10/28/script-to-clear-sql-transactions-logs/</link><pubDate>Sun, 28 Oct 2007 13:11:15 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2007/10/28/script-to-clear-sql-transactions-logs/</guid><description>&lt;p&gt;Script to clear SQL Transactions Logs&lt;/p&gt;
&lt;p&gt;Did you know that when you backup a SQL database with Backup Exec (with the SQL Agent) the transaction log is not cleared? This means that if you use the full recovery model your transaction log keeps growing and growing. I tested this with Backup Exec v11D and you can only create a seperate scheduled job to backup the transactions logs but not one to just clear it or truncate it after successfull backup.&lt;/p&gt;
&lt;p&gt;Therefore I made a VBS script that clears SQL transactions logs, an option would be to schedule this as a post backup job.&lt;/p&gt;
&lt;p&gt;This is the script:&lt;/p&gt;</description></item><item><title>RDP Clipboard Fix</title><link>https://remkoweijnen.nl/blog/2007/10/25/rdp-clipboard-fix/</link><pubDate>Thu, 25 Oct 2007 17:45:57 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2007/10/25/rdp-clipboard-fix/</guid><description>&lt;p&gt;Did you ever loose Clipboard functionality (copy/paste) while working with several Terminal Server sessions? I think everyone that works a lot with Terminal Server has experienced this from time to time.&lt;/p&gt;
&lt;p&gt;It&amp;rsquo;s caused by badly behaving applications. Dimitry Vostokov wrote a tool to fix this issue for Citrix (RepairCBDChain.exe), he explains the issue very well on his blog:&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Windows has a mechanism to notify applications about clipboard changes. An application interested in such notifications has to register itself in the so called clipboard chain. Windows inserts it on top of that chain and that application is responsible to propagate changes down the chain:&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://citrite.org/blogs/dmitryv/files/2006/12/rc1.JPG"&gt;&lt;em&gt;&lt;img src="http://citrite.org/blogs/dmitryv/files/2006/12/rc1.thumbnail.JPG" alt="rc1.JPG" height="80" /&gt;&lt;/em&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;If 3rd-party application forgets to forward notifications down then we have a broken clipboard chain and clipboard changes are not sent via ICA protocol:&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Read more at Dimitry&amp;rsquo;s Blog: &lt;a href="http://citrite.org/blogs/dmitryv/2006/12/09/clipboard-issues-explained/"&gt;&lt;a href="http://citrite.org/blogs/dmitryv/2006/12/09/clipboard-issues-explained/"&gt;http://citrite.org/blogs/dmitryv/2006/12/09/clipboard-issues-explained/&lt;/a&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;So how can we fix this for Terminal Server then?&lt;/p&gt;</description></item><item><title>TSAdminEx</title><link>https://remkoweijnen.nl/blog/2007/10/23/tsadminex/</link><pubDate>Tue, 23 Oct 2007 19:48:50 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2007/10/23/tsadminex/</guid><description>&lt;p&gt;You will probably know Microsofts Tool to Manage Terminal Server, it&amp;rsquo;s called Terminal Services Manager (you will probably know it as TSAdmin). It can be used to view information about terminal servers including all sessions, users, and processes for each terminal server.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2007/10/tsadmin1.webp" title="TSAdmin Screenshot" class="glightbox" data-type="image" data-gallery="post-32"&gt;&lt;img width="128" height="67" loading="lazy" decoding="async" src="https://remkoweijnen.nl/blog/wp-content/uploads/2007/10/tsadmin.thumbnail1.webp" alt="TSAdmin Screenshot" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;m currently working on a TSAdmin replacement (codename TSAdminEx). Purpose is to show how to use the Terminal Server API&amp;rsquo;s and as a little bonus we will add some extra functionality to TSAdminEx.&lt;/p&gt;</description></item><item><title>How to launch a process in a Terminal Session</title><link>https://remkoweijnen.nl/blog/2007/10/20/how-to-launch-a-process-in-a-terminal-session/</link><pubDate>Sat, 20 Oct 2007 22:45:24 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2007/10/20/how-to-launch-a-process-in-a-terminal-session/</guid><description>&lt;p&gt;This is an often asked question but the solution is simple:&lt;/p&gt;
&lt;p&gt;So how does it work?&lt;br&gt;
First we obtain the user&amp;rsquo;s primary access token with the &lt;a target="_blank" href="http://msdn2.microsoft.com/en-us/library/aa383840.aspx"&gt;WtsQueryUserToken &lt;/a&gt; API call. To call this function successfully, the calling application must be running within the context of the LocalSystem account and have the SE_TCB_NAME privilege (LocalSystem has this privilege by default). Since the function returns a primary acces token we can just pass this to CreateProcessAsUser and voila!&lt;/p&gt;</description></item><item><title>A referral was returned from the server</title><link>https://remkoweijnen.nl/blog/2007/10/19/a-referral-was-returned-from-the-server/</link><pubDate>Fri, 19 Oct 2007 15:58:48 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2007/10/19/a-referral-was-returned-from-the-server/</guid><description>&lt;p&gt;Ever tried to run a VBS scripts that queries Active Directory in another domain or from a workstation that is not a domain member? Than you have probably seen this error before:&lt;/p&gt;
&lt;p&gt;&lt;img border="0" width="1" src="wp-content/uploads/2007/10/Referral.png" alt="Error Message" height="1" /&gt;&lt;img border="0" width="1" src="wp-content/uploads/2007/10/Referral.png" alt="Error Message" height="1" /&gt;&lt;img width="318" height="165" loading="lazy" decoding="async" src="https://remkoweijnen.nl/blog/wp-content/uploads/2007/10/referral11.webp" alt="Error Message" /&gt;&lt;/p&gt;
&lt;p&gt;This is because the default settings for Chasing referrals is set to ADS_CHASE_REFERRALS_NEVER.&lt;/p&gt;</description></item><item><title>How rdp passwords are encrypted</title><link>https://remkoweijnen.nl/blog/2007/10/18/how-rdp-passwords-are-encrypted/</link><pubDate>Thu, 18 Oct 2007 21:23:17 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2007/10/18/how-rdp-passwords-are-encrypted/</guid><description>&lt;p&gt;&lt;img width="48" height="48" loading="lazy" decoding="async" align="right" src="https://remkoweijnen.nl/blog/wp-content/uploads/2007/10/mstsc1.webp" alt="mstsc icon" /&gt; Ever wondered how mstsc saves passwords? If you open an RDP file with a text editor like Notepad you can see the encrypted password. In this article I will show you how to encrypt and decrypt these passwords. Besides password recovery this enables you to create rpd files programmatically or perhaps update the password in many rdp files with a batch file.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://remkoweijnen.nl/blog/wp-content/uploads/2007/10/rdpscreenshot1.webp" title="RDP Screenshot"&gt;&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Launch RDP from commandline</title><link>https://remkoweijnen.nl/blog/2007/10/17/launch-rdp-from-commandline/</link><pubDate>Wed, 17 Oct 2007 22:47:53 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2007/10/17/launch-rdp-from-commandline/</guid><description>&lt;p&gt;&lt;img width="48" height="48" loading="lazy" decoding="async" src="https://remkoweijnen.nl/blog/wp-content/uploads/2007/10/cmd1.webp" alt="Command Prompt Icon" align="right" /&gt;A little while ago I wrote a little commandline tool that starts an RDP connection (with mstsc.exe) because mstsc doesn&amp;rsquo;t allow you to use the login credentials (username, password) as commandline arguments.&lt;/p&gt;
&lt;p&gt;Arguments are:&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;Servername (string)&lt;/li&gt;
	&lt;li&gt;Port (integer, usually 3389)&lt;/li&gt;
	&lt;li&gt;Username (string)&lt;/li&gt;
	&lt;li&gt;Domain (string)&lt;/li&gt;
	&lt;li&gt;Password (string)&lt;/li&gt;
	&lt;li&gt;Console (integer, specify 0 for false and 1 for true)&lt;/li&gt;
	&lt;li&gt;RedirectDrives (integer, specify 0 for false and 1 for true)&lt;/li&gt;
	&lt;li&gt;RedirectPrinters (integer, specify 0 for false and 1 for true)&lt;/li&gt;
&lt;/ol&gt;</description></item><item><title>Atheros AR5007EG - Bad WLAN performance</title><link>https://remkoweijnen.nl/blog/2007/10/16/toshiba-satellite-l40/</link><pubDate>Tue, 16 Oct 2007 17:55:54 +0000</pubDate><guid>https://remkoweijnen.nl/blog/2007/10/16/toshiba-satellite-l40/</guid><description>&lt;p&gt;A friend bought a new Toshiba Satellite L40 laptop which came with Windows Vista preinstalled. The wireless connection (via the built in Atheros AR5007EG card) was very unstable and sometimes unable to connect to the access point. When connected internet speed was very slow, sometimes unable to open pages at all. First we tried replacing the preinstalled Toshiba drivers with the latest from the Toshiba site and later on the most recent from Atheros (which can be found &lt;a target="_blank" href="http://www.atheros.cz/" title="here"&gt;here&lt;/a&gt;).  Both drivers didn&amp;rsquo;t improve the speed.  &lt;br&gt;
Solution:&lt;/p&gt;</description></item><item><title>About</title><link>https://remkoweijnen.nl/blog/about/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://remkoweijnen.nl/blog/about/</guid><description>&lt;p&gt;I&amp;rsquo;m an Innovation Engineer at Cloudhouse Labs, where I work on early product ideas, prototypes and technical experiments before they become formal engineering projects. My role sits close to product: exploring what might be useful, building enough to prove or disprove an idea, and helping turn future product direction into something people can actually see, test and discuss.&lt;/p&gt;</description></item><item><title>Archives</title><link>https://remkoweijnen.nl/blog/archives/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://remkoweijnen.nl/blog/archives/</guid><description/></item><item><title>Search</title><link>https://remkoweijnen.nl/blog/search/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://remkoweijnen.nl/blog/search/</guid><description/></item></channel></rss>