<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Windows XP on Remko's Blog</title><link>https://remkoweijnen.nl/blog/categories/windows-xp/</link><description>Recent content in Windows XP on Remko's Blog</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Mon, 05 Aug 2013 16:51:21 +0000</lastBuildDate><atom:link href="https://remkoweijnen.nl/blog/categories/windows-xp/index.xml" rel="self" type="application/rss+xml"/><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>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>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>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>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/28/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/28/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>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>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>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 class="codelang"&gt;objectpascal&lt;/span&gt;&lt;/span&gt;
 &lt;span class="codetools" data-pagefind-ignore&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>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>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>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></channel></rss>