Remote Desktop Printer Redirection Errors and Warnings in Event Log

This is a simple, but nevertheless annoying problem: you connect to your server with Remote Desktop from another computer, and the Windows event log starts getting spammed with printer related errors and warnings, such as missing printer drivers, printer purge and deletion notifications and other printer related actions.

Automatic printer redirection in Remote Desktop can be a neat feature, but you don’t always need it. Unfortunately, it is turned on be default, so here is how to turn it off…

Disabling Printer Redirection on the Client

Printer redirection can be disabled for a particular client computer in its Remote Desktop Connection dialog by performing the following steps:

  1. Click on the Options >> button to open the options interface
  2. In the Remote Desktop Connection dialog before connecting to the server, select the Local Resources tab.
  3. In the Local devices and resources group uncheck the checkbox for Printers

Back on the General tab you may choose to save these settings in a RDP file for later reuse.

Disabling Printer Redirection on the Server

Sometimes you don’t want any of your client computers to ever share their printers with the server. In that case it is best to disable printer redirection on the server rather than on each individual client. Printer redirection can be disabled server-side through the Group Policy Editor by performing the following steps:

  1. Click on START, select Run…, type mmc and press Enter to launch the Microsoft Management Console.
  2. From the main menu in the Management Console select File and Add/Remove Snap-in…
  3. Click on the Add… button to open the Add Standalone Add-in dialog.
  4. From the list select Group Policy Object Editor and click the Add button.
  5. Click Finish, close and OK to close all open dialogs.
  6. Back in the console, select Console Root → Local Computer Policy → Computer Configuration → Administrative Templates → Windows Components → Terminal Services → Terminal Server → Printer Redirection in the tree.
  7. From the list of settings on the right, double-click on Do not allow printer redirection and set it to Enabled in its Properties dialog.

If you do not see the above item after adding the Local Computer Policy add-in in the console tree, you have to add the System.adm administrative template to the policy by going through the following steps:

  1. In the console, right-click on Console Root → Local Computer Policy → Computer Configuration → Administrative Templates and select Add/Remove Templates… from the context menu.
  2. In the Add/Remove Templates dialog click the Add… button and open the file system.adm.

Note on Windows Home Server

In Windows Home Server the system.adm template is also not loaded by default and has to be added manually as described above. In addition to that, the setting to prohibit printer redirection is located in: Console Root → Local Computer Policy → Computer Configuration → Administrative Templates → Windows Components → Terminal Services → Client/Server data redirection

Gunique GUID Resolution Tool

This article is part of a backup. It was originally posted on Sunday, May 9. 2004.

When developing or reversing engineering software and websites, or when dealing with ActiveX, COM, OLE or other Windows internals in general, one often faces so called GUIDs. Most of the time it is not clear what exactly a given GUID represents. Gunique is a small freeware tool that is able to translate GUIDs to human readable names and vice versa.

Download

Name: Gunique
Version: 1.0.0 Build 9
Download: gunique.zip (286kB)

Note: By using Gunique you agree to the disclaimer at the bottom of this file.

Screenshot

Gunique Screenshot

Contents

Application (2 Files):

  • /gunique.exe – Gunique application
  • /readme.txt – this file

Installation

Just copy the two files into a folder of your choice. No additional steps required.

Known Bugs and Issues

There are no known bugs.

FAQ

Q: What is a GUID?
A: The term GUID is short for Global Unique Identifier, a 128-bit (16 bytes) integer value that can be used to identify any sort of components, such as hardware and software. Whenever you need to uniquely identify something, GUIDs are your best friend.
Q: How are GUIDs used in Microsoft Windows?
A: In the Windows OS, GUIDs are used in a number of different ways. Their main purpose is to identify certain parts of software, specifically COM classes (CLSID) and interfaces (IID), but also type libraries (libUUID), drivers, device classes, network connections and users.
Q: How are GUIDs generated?
A: There are many different ways to create GUIDs, but usually there’s an algorithm to combine various unique settings, such as the MAC address of your network adapter, the IP address of your computer, the current time or a random number. This algorithm guarantees that it’s very unlikely to generate two GUIDs with the same value.
Q: Which GUIDs can be translated into human readable names?
A: Translation is limited to the information saved in the system registry. Therefore only GUIDs for registered software components can be converted. This includes the software components mentioned in the previous question.
Q: What is the Running Object Table (ROT)?
A: The ROT is a Windows internal table that holds a list of currently registered and running COM objects on your machine.
Q: Are wildcards supported in the search window?
A: Yes, currently supported wildcards are ‘*’ to match any number of characters, and ‘?’ to match any single character. Wildcards cannot be used when searching for GUIDs though.
Q: Where can I learn more about COM, GUIDs and the ROT?
A: Do a search on MSDN
Q: Where can I get the latest version of Gunique?
A: http://www.gerke-preussner.de

Disclaimer

Copyright (c) 2004 headcrash industries. All rights reserved.

This software is provided “as is”, without warranty of any kind, expressed or implied. In no event shall the author or its contributors be held liable for any direct, indirect, incidental, special or consequential damages arising out of the use of or inability to use this software.

Redistribution of Gunique in any form, including but not limited to websites, CDROM and printed media, is strictly prohibited and requires the explicit permission of the author.

TekEx Texture Extraction Tool for Mechwarrior 4

This article is part of a backup. It was originally posted on Sunday, May 9. 2004.

In 2002 the MekTek Development team released a utility called Hudpatch 3 that allows for patching selected data files (such as textures) within .mw4 content packages of the popular computer game Mechwarrior 4. Its main purpose is to replace certain elements of the head-up display (HUD) in order to enhance the game experience.

The Hudpatch utility itself uses a certain unpublished archive format containing the files to be patched (so called .tek files). In order to add your own modifications to patches provided by MekTek (e.g. BlackKnight and Vengeance map grid patches) or by other developers (e.g. the Energy HUD by Insomniax) it is necessary to be able to extract the files from the patch. TekEx is a tool to open and unpack .tek patch archives.

Download

Name: TekEx
Version: 1.1.0 Build 2
Download: tekex.zip (240kB)

Note: By using TekEx you agree to the disclaimer at the bottom of this file.

Screenshot

TekEx Screenshot

Contents

Application (2 Files):

  • /tekex.exe – TekEx application
  • /readme.txt – this file

Installation

Just copy the two files into a folder of your choice. No additional steps required.

Bugs and Known Issues

There are no known bugs.

FAQ

Q: Can TekEx create new .tek patch archives to be used with Hudpatch?
A: No. Hudpatch itself already has the capability to create new .tek files. Please read the Hudpatch manual for more information!
Q: I found a certain .tek patch online – how can I add my own modifications?
A: Use TekEx to extract the data files from the .tek archive. Modify the extracted files as you like (e.g. change bitmap graphics in your favorite paint program) and create a new .tek archive from the modified files using the Hudpatch utility.
Q: Where can I get the latest version of TekEx?
A: http://www.gerke-preussner.de

Disclaimer

Copyright (c) 2004 headcrash industries. All rights reserved.

This software is provided “as is”, without warranty of any kind, expressed or implied. In no event shall the author or its contributors be held liable for any direct, indirect, incidental, special or consequential damages arising out of the use of or inability to use this software.

Redistribution of TekEx in any form, including but not limited to websites, CDROM and printed media, is strictly prohibited and requires the explicit permission of the author.

InfoZIP UnZip Wrapper for Delphi

This article is part of a backup. It was originally posted on Monday, March 15. 2004.

Many of todays applications require the capability of extracting certain files from a ZIP archive, either onto the disk or into memory. A perfect solution is the UnZip DLL from the InfoZIP project because it offers few API functions to solve just this task without the hassle of dealing with file streams, ZIP formats and compression in general. Unfortunately, this great library is barely documented, thus hard to use in Delphi projects.

Therefore I decided to write a small Delphi wrapper that provides all required data types and functions along with detailed documentation in order to give you direct access to the UnZip API. Since I completed this project in a single afternoon, it may not be free of errors. Feel free to contact me if you find any bugs, make any changes, add new functionality, or have any general suggestions I may incorporate into this version.

Download

Name: InfoZIP UnZip Wrapper for Delphi
Version: 1.0.0 Build 2
Download: delphiunzip.zip (334kB)

Note: By using the contents of the InfoZIP UnZip Wrapper for Delphi, in parts or as a whole, you agree to the disclaimer at the bottom of this file.

Contents

Wrapper (2 files):

  • /Unzip.pas – DLL Wrapper for Delphi
  • /readme.txt – this file

Demo (10 files):

  • /demo/FormMain.dfm -DFM file for main window
  • /demo/FormVersion.dfm -DFM file for version window
  • /demo/FormMain.pas – Pascal source code for main window
  • /demo/FormVersion.pas – Pascal source code for version window
  • /demo/unzip32.dll – InfoZIP UnZip DLL, Version 5.5.0
  • /demo/main.cfg – Configuration file for demo project
  • /demo/main.dpr – Project file for demo project
  • /demo/main.exe – Precompiled executable
  • /demo/main.res – Ressource file for the demo
  • /demo/testdata.zip – Sample ZIP archive used by the demo

Installation

Wrapper only:

Copy the file Unzip.pas into a folder of your choice and add that folder to the library path in the environment options of Delphi or to the directory paths of your project’s settings, or copy the file directly into the source code folder of your project.

Demo application:

Copy all files into a folder of your choice. Open the file main.dpr to view the source code in Delphi, or start main.exe to launch the demo.

Known Bugs and Issues

The demos for Wiz_SetOpts() and Wiz_Unzip() are currently not working, thus disabled. This might be fixed in a future release of this distribution. There are no known bugs in the UnZip DLL wrapper.

FAQ

Q: Which versions of Borland Delphi are supported?
A: The wrapper was developed in Delphi 7, but should work with all other versions of Borland Delphi too.
A: How can I add Unzip functionalities to my application?
Q: Simply add ‘Unzip’ to the uses clause. All DLL functions will be statically linked into your program.
A: Is it possible to dynamically link the DLL using LoadLibrary()?
Q: Yes, add dyn_unzip32 to the conditional defines in your project configuration. This will disable static linking and provide ready to use prototypes for the API functions which can then be bound using GetProcAddress().
A: How can I create new ZIPs or add new files to an existing archive?
Q: Not at all. As the name implies, unzip32.dll can be used to unpack only.
A: How can I extract a certain file from a ZIP archive?
Q: Using the Wiz_SingleEntryUnzip() function. See the included demo application for working sample code.
A: How can I extract a certain file into memory, without saving it on disk?
Q: Using the Wiz_UnzipToMemory() function. See the included demo application for working sample code.
A: How can I convert the return values of API functions into readable text?
Q: The wrapper provides Wiz_ErrorToStr() for this purpose.
A: Why can’t I compile using object methods as callback functions?
Q: Procedure pointers and pointers to methods of an instance object are incompatible. While procedure pointers can be used by the UnZip API, object methods can not. For further information search the Delphi help file for “Procedural types”.
A: Where can I get the latest version of unzip32.dll?
Q: http://www.info-zip.org/pub/infozip/UnZip.html
A: Where can i get the latest version of Unzip.pas?
Q: http://www.gerke-preussner.de

Disclaimer

Copyright (c) 2004 headcrash industries. All rights reserved.

This software is provided “as is,” without warranty of any kind, expressed or implied. In no event shall the author or its contributors be held liable for any direct, indirect, incidental, special or consequential damages arising out of the use of or inability to use this software.

Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions:

  1. 1. Redistributions of source code must retain the original copyright notices in the source code file header.
  2. 2. Redistributions of source code and compiled executables must reproduce the above copyright notice, disclaimer, and this list of conditions in
    documentation and/or other materials provided with the distribution.

unzip32.dll is Copyright (c) 1990-2003 Info-ZIP. All rights reserved. Please visit the InfoZIP website for licensing, downloads and further information about UnZip.

Restoring Shared Folder Permissions on Windows Home Server

With every reboot, Windows Home Server (WHS) automatically resets the permissions for all shared folders in the shared directory. If you are using one or more of the shared folders to host files for services that require customized access for users other than the Home Server accounts, those services will likely stop functioning properly after a server restart. Common examples include web servers, such as IIS or Apache spitting out Access Denied messages, or FTP servers returning read or write errors.

Solution

One way to get around this issue is to setup a scheduled task in Windows that runs a batch file to restore the file permissions at system startup. The example batch file below restores read access for the Authenticated Users user group on a folder called Http, which is used as the root for an IIS web server and takes advantage of WHS folder duplication.

  1. echo y| cacls d:\shares\Http /E /T /G "NT AUTHORITY\Authenticated Users":R

Remarks

Obviously, this approach is limited in that you have to multiply the above command line for each folder and user, but it works very well if only a few permissions need to be restored, such as in the example use case above. Note that the /T parameter applies the permission change to all files in all sub-directories as well. The /E parameter ensures that the user is adding to instead of replacing existing permissions, so that shared folder permissions configured through the Windows Home Server Console remain unaffected. Please refer to the help on cacls for additional permission options on the folder’s access control list.