Blog

While setting up a new Windows 7 computer for a customer, the user had several programs that were very old. There was one program in particular that was written in the 1980s and was a DOS based program. This was a program that was custom written for this company to calculate the dividends for their partners, so no upgrade existed nor did they want to use another process. The program was very simple, click the appropriate DOS program and the report and checks print.

I found that the ports in the printer properties GUI do not correspond to the DOS printers. To print to a printer using DOS, you must use the following command to map the printer: net use port \\server\printer. You can run net use from a command prompt to see what devices are connected via command line. [more]

As you can see in the screenshot below, Printer1 is mapped to LPT2 from the GUI and LPT1 from the command line.

 

The solution for adding the printer so the DOS program could print was to place a batch file in the startup folder with the net use port \\server\printer command so the printer will be mapped each time the computer starts. This resolve this issue and allowed the DOS program to print to the printer on the new Windows 7 PC.


 

Frink is a java program that runs everywhere - Windows, Mac, Linux, Android, uh, except the iPhone. Basically Frink is a calculating tool and programming language.  Here are a few of the features the I like:

  • Tracks units of measure through all calculations.
  • Recognizes thousands of unit types and can convert between them.
  • Arbitrary precision math - huge floating point numbers, retains rational numbers with no loss of precision, works with complex numbers.
  • Does date and time math.
  • Can run under a web server and can generate HTML 5 code.
  • Knows monetary exchange rates, translates text between a dozen languages, reads and writes local files, web and ftp files, does graphics, object-oriented programming...

Frink is updated very often.[more]  It has been updated over 600 times since December 2001. The web site is at http://futureboy.us/frinkdocs.

There are several ways to run Frink.  Using that Java Web Start stuff is just too much overhead for me.  The way I run it on Windows is to just download the frink.jar file, and run a batch file to invoke it.  The batch file just has this in it:
cmd /c start javaw -jar c:\u\frink.jar


 

Environment:

  • Server: XenApp 6, Windows Server 2008 R2
  • XenDesktop Controller: XenDesktop 5.6
  • Client: Various (Windows 7 Embedded TC, Windows 7 PC)

Two types of redirection supported for imaging devices:

  • TWAIN redirection (XenApp, XenDesktop)
  • USB Redirection (XenDesktop only) NOTE: XenApp does support USB Redirection, but not for Image Scanners. For details on USB devices supported by XenApp, refer to CTX816193. 

TWAIN Redirection [more]

  • The imaging device must be connected locally to the user device and have the associated vendor-supplied TWAIN driver installed
  • Citrix online plug-in 11.x or later or the Citrix offline plug-in
  • XenApp\XenDesktop 32-bit and 64-bit OSes support TWAIN redirection for 32-bit TWAIN applications only. XenApp does not support 16-bit TWAIN drivers
  • Citrix Policies (XenApp\XenDesktop): The Client TWAIN device redirection policy setting must be added to the appropriate policy. To configure image compression, add the TWAIN compression level setting and select the appropriate compression level. 
    • User Policy
    • Enabled by default
  • PROCESS: To capture an image, users connect to a server from a client machine that has an imaging device and the associated vendor-supplied TWAIN driver installed locally. When the TWAIN application is run from within this session, the application detects and interacts with the client-side device using a DLL hook process that communicates with the driver on the local client.
  • TWAIN Redirection troubleshooting: CTX107411
USB Redirection
  • When redirecting USB devices, the endpoint client device must first recognize the USB device to have it mapped to the session. If the device requires a special driver, it must be installed on both the client machine, as well as the Virtual Desktop Agent (VDA) machine. The device can still be mapped without the driver as long as the endpoint recognizes it, but it will not function as expected until the driver is installed on the VDA machine.
    NOTE: In some cases, installing the driver locally can break USB redirection. If the driver does not allow the device to be released for redirection, the VDA may not be able to communicate with the device.
    • When a device is detected, you can view the properties of the device via device manager or 'Printers and Devices'
    • It is important to determine the devices vendor ID (VID) and product ID (PID) as well as the device’s Class. This information is usually found on the details tab of the properties of the device. 
    • Here is an example of a USB device and its defined properties:
      • Property = Hardware IDs (VID = 095D, PID = 9205)
      • Property=Compatible IDS (Class=01)
  • Certain USB classes are blocked by default because they are used mainly only on local workstations.  When some devices, such as a smartcard, Keyboard or Mouse, are connected, they will be connected by one of the predefined standard channels. Therefore, these types of devices are blocked by default for the USB channel as their functionality is required on the local endpoint
    • Communications and CDC Control (Classes 02 and 0a)
    • Human Interface Devices (Class 03)
    • USB Hubs (Class 09)
    • Smart Card (Class 0b)
    • Wireless Controller (Class e0)
  • Certain USB classes are allowed by the default USB policy rules
    • Audio (Class 01)
    • Physical Interface Devices(Class 05)
    • Still Imaging (Class 06)
    • Printers (Class 07)
    • Mass Storage (Class 08)
    • Content Security (Class 0d)
    • Video (Class 0e)
    • Personal Healthcare (Class 0f)
    • Application and Vendor Specific (Classes fe and ff)
  • Components of USB Redirection
    • Receiver – Citrix Client used to connect to XenDesktop\XenApp
      • Citrix Remote USB Device Driver (intercepts devices normal driver)
      • Configured by four methods
        • Desktop Viewer Toolbar (user)
          • Preferences must be set to Connect All or Ask each time to be presented with device on XenDesktop
        • Connection Center (user)
          • Session Security > USB Device must be set to Ask Permission or Full Access
        • GPO Computer or User policies (admin)
          • Configures settings mentioned above
          • Also setting for USB Device Rules
            • Allows for blocking or allowing devices based off VID, PID and Device Class
        • Registry (admin)
          • Devices can be automatically redirected by adding the VID and PID information into a registry key. See this article for details: CTX123015
    • VDA (Virtual Desktop Agent) – XenDesktop VM
      • Citrix Remote USB Host Controller (communicates with USB Device Driver)
      • Citrix USB Service (handles addition\removal of devices, monitors devices)
      • Configured by:
        • HDX Policy via XenDesktop Controller (admin)
          • Client USB device redirection policy must be enabled (disabled by default)
          • USB Device Rules
            • Allows for blocking or allowing devices based off VID, PID and Device Class
    • Troubleshooting
      • HDXMonitor Tool (runs on VDA) – Real time status on USB device connection, provides network performance stats, reports active USB rules in place, delivers USB filtered event log messages http://hdx.citrix.com/hdx-monitor
      • When using USB redirection for an imaging device, TWAIN redirection must be disabled. If the scanner is TWAIN compliant, the VDA will not be able to communicate with the device since the TWAIN redirection process is using the device. In my case, I received a message that it the device was “busy or in use”.
      • In my case, there also seemed to be an issue with Citrix Receiver 3.0 (online plug-in v13). Downgrading to v 12.3 of the online plug-in or upgrading to version 3.3 (online plug-in v13.3) fixed the USB redirection issue.

 

When Microsoft Exchange sends an e-mail, the message size may change due to the encoding used to package it. Messages with attachments can expand even more, since the only way to send e-mail attachments is to convert them from plain ASCII to MIME or UU-encode the message. Even if an attachment is smaller than the limits set in Exchange, it may not be accepted because its MIME-encoded or UU-encoded size is too big. This happens most often when limits are set for inbound SMTP mail. An incoming MIME-encoded e-mail with attachments can increase in size anywhere from 30% to 40%, depending on how many separate attachments, line breaks, MIME headers or other non-data elements are in the message. The exact size can vary enormously, especially since mail systems all behave a little differently when converting e-mail and attachments to MIME. The same problem exists in reverse, where messages sent from your domain will be constrained by message limit sizes on other hosts. Likewise, mail sent from your domain is going to expand anywhere from 30% to 40% in size when converted. [more]

A third-party program, such as UUDeview (http://www.miken.com/uud/), can help you find out just how much larger a MIME or UU-encoded version of a given file will be. (Note that this tool does not calculate things like message size overhead, but it can still be helpful.) The exact maximum incoming and outgoing message size is going to be up to the e-mail administrator, but should be set with these caveats in mind.

Also, take the time to explain to users that when they send attachments, they need to be mindful that messages will increase in size.


 

I'm a big fan of using dd to do byte for byte copies of disks and partitions.  However, I've noticed the performance of dd in OSX is usually pretty poor.  Most people recommend toying around with the 'bs' option (for byte size) to find the optimal copy "chunk" size.  I've always had the best results using bs=512k, but even that didn't seem to help when I was recently trying to copy the contents of an old hard disk to a new one.  Both disks were connected to the internal SATA controller, but I was only getting a 15 MB/s copy rate. 

When running the command, I used the device specifications as enumerated by 'diskutil list' (e.g., dd if=/dev/disk0 of=/dev/disk1 bs=512k).  However, after some research, I found that you can place an 'r' in front of the disk# specification to access the "raw" disk and significantly improve performance.  So, I tried "dd if=/dev/rdisk0 of=/dev/rdisk1 bs=512k" and I started getting a 90+ MB/s copy rate. 


 

We recently helped a user who reported that some of her emails were blank in Outlook. She said it was mainly forwards and replies that were blank. After looking at her computer, I found that all plain text emails were “blank”, while all HTML emails showed the text correctly. The emails that were forwards and replies to her that were blank were from mobile devices, and therefore sent as plain text. After some digging, I found that she had set the plain text  font color to white. The messages appeared to be blank because the email was displaying white text on a white background.

To change this setting to File > Options > Mail > Stationery and Fonts. When you click the Font buttons, you can change the color of the font. Make sure the font color is not white or blank. [more]


 

This is an addendum to a previous post on searching in windows explorer.  You can also search in all sorts of places, not just the file system

Control panel - sort of an expanded fuzzy search and finds items related to your term.

Under Add/Remove programs, installed updates: You can search for a KB number to see if it’s installed.  You have to start with a word and it does not seem to use wildcards.  Also you cannot specify fields, like program:, version:, etc.[more]

Keep this in mind when you are scrolling through a long list of printers, list of gadgets, etc.

New gotcha:  Outlook:// links no longer work.  It looks like officially these are no longer supported.  It is still recognized by Outlook, so a simple workaround there is to just start up Outlook and pass it the URI.
 
This will still work for folders in your mailbox, outlook://Inbox will go to your inbox.  But this will not work for public folders.
There is a discussion here: https://social.technet.microsoft.com/Forums/en-US/outlook/thread/da5404a8-ce24-4795-9b25-794362301c75 that says the official word from Microsoft is "there is no solution".  It seems the problem is caused by the fact that Outlook can now access more than one Exchange server at a time, so the SMTP address of the user is now included in the path to the Public folders.  So it will work by including your e-mail address, like this:

outlook /recycle /select "outlook://Public Folders - john.smith@example.com/All Public Folders/Contacts"


 

Like many companies, I’m sure, our VMware environment has been built and upgraded from early 3.x to the nearly current 5.0 with all sorts of VMware extras and features thrown in (such as Upgrade Manager, VMware Converter plugin, etc.).  A while back, we upgraded our entire environment to the 5.0 tree (starting with vCenter and finishing with the hosts). Everything upgraded smoothly and there were no problems reported after the upgrade was completed.

A short while ago, I had some extra time and checked on the service status view inside the VI Client to make sure everything was green. There were a few red items that I could quickly fix with service restarts (after the last reboot of the server, some services didn’t start up correctly – simple fix), but there was also one red item that I found out would take a little doing. The error message basically stated: [more]

com.vmware.converter alert unable to retrieve health data from https://vcenter_servername.domain:port/converter/health.xml

In troubleshooting, I found something that I missed during the upgrade to vCenter 5.0. vCenter Converter is not supported in vCenter 5.0 as VMware wants to move everyone to the more robust (and better) standalone version of the Converter application. Because of this, they strongly recommend uninstalling vCenter Converter BEFORE the upgrade to vCenter 5.0. Now if you were to miss this, like me, and upgraded anyway, there is a simple solution. The problem stems from the fact that old links to Converter are left behind in the ADAM database after the upgrade.

http://kb.vmware.com/kb/2006132

Resolution
To work around this issue, uninstall vCenter Converter from the Add/Remove Programs on the vCenter Server, then remove the remaining vCenter Converter attributes from the ADAM database.

To remove the remaining vCenter Converter attributes from the ADAM database:
1. Back up the vCenter Server ADAM database before proceeding.For more information, see Manually backing up and restoring the vCenter Server 4.x and 5.0 ADAM instance data (1029864).
2. Stop the VirtualCenter Server service. For more information, see Stopping, starting, or restarting vCenter services (1003895).

Note: Stopping the VirtualCenter Server service also stops the VirtualCenter Management Webservices service and the vSphere Profile-Driven Storage service.
3. Remove the Converter folder, which is located at:

C:\Program Files\VMware\Infrastructure\VirtualCenter Server\extensions\com.vmware.converter
4. Download the cleanup.bat.gz and cleanup.class.gz files which are attached at the end of this article.
5. Using the gunzip utility, unzip the files into this folder:

C:\Program Files\VMware\Infrastructure\VirtualCenter Server

Note: If the install directory of the vCenter Server is different in your environment, you must modify the _JAVA andPATH_ROOT variables in the cleanup.bat file. Update the variables to reference your vCenter Server install directory accordingly.
6. Open a command prompt and run these commands to remove Converter and Update Manager attributes from the ADAM database:

For Converter:

cd "C:\Program Files\VMware\Infrastructure\VirtualCenter Server"
cleanup.bat com.vmware.converter

You see output similar to:

Deleting components of type com.vmware.vcIntegrity from CN=FD75D28F-CC3A-4638-8185-EEBC998DA14F,OU=ComponentSpecs,OU=Health
7. Restart the VirtualCenter Server service, the VirtualCenter Management Webservices service, and the vSphere Profile-Driven Storage service. For more information, see Stopping, starting, or restarting vCenter services (1003895).
The moral of this story is to read the release notes, as they will provide valuable information regarding the product you are installing or updating. And if you haven’t yet upgraded to vCenter 5.0, be sure to uninstall the Converter plugin before performing that upgrade.


 

I have been working on migrating a customer from Exchange 2003 to Exchange 2010. I had already moved all the mailboxes, public folders, and all the inbound/outbound email routing to the Exchange 2010 servers. I enabled SMTP logging on the Exchange 2003 server so that I could detect any other devices out there on the network that may have been routing email through the old Exchange 2003 server. I reviewed it off and on for a week or so and noticed a small volume of SMTP traffic was being recorded inbound from the Exchange 2010 servers. I didn’t pay much attention to the actual to/from addresses or the payload at the time assuming it was probably public folder replication. [more]

A few days later, after removing all the public folder replicas from the Exchange 2003 server, I was still seeing this traffic so I started to look at it more closely. What I was seeing was inbound SMTP traffic from the Exchange 2010 servers with a from address being one of a handful of distribution lists. Then, the Exchange 2003 server would turn around and send email to the Exchange 2010 servers to each individual email addresses in the distribution list. After a fair amount of digging I discovered the issue. At some time in the past, the customer had manually designated distribution list expansion servers in the AD properties of the distribution list.

Using ADSI and one of the problematic distribution groups, I was able to find a property defined on the distribution group called msExchangeExpansionServerName. For all distribution groups getting routed back and forth between the Exchange 2003 and 2010 servers, this field was populated with the value of the old Exchange 2003 server. Why you would define this property on the distribution group in an environment with one Exchange server, I have no idea. However, a quick powershell script fixed the issue:

Get-DistributionGroup | where {$_.ExpansionServer -ne "$null"} | set-distributiongroup -ExpansionServer $null


 

The control-plane option is used to apply an access-list to traffic destined to the device itself.  Normally, access-Lists applied to interfaces control traffic flowing through the ASA.  When the “control-plane” tag is added, the access-list is used to control traffic that terminates on the ASA.  This can be beneficial if you want to limit the traffic that is permitted to terminate on the ASA (i.e. VPN related traffic). 

access-group device_access_in in inside control-plane [more]

One important thing to note is that access control rules for to-the-box management traffic (defined by such commands as http, ssh, or telnet) have higher precedence than an access list applied with the “control-plane” option. Therefore, such permitted management traffic will be allowed to come in even if explicitly denied by access list with the “control-plane” option.