technical solutions and commentary

December 29, 2006

Move the Offline Files Cache in Windows Vista

Filed under: Uncategorized — Jason Hartley @ 3:54 pm

How to move the Offline Files cache location from the default location (c:\windows\csc) to another volume.

  1. From an elevated command prompt, run the following command:
    REG ADD
    “HKLM\System\CurrentControlSet\Services\CSC\Parameters” /v MigrationParameters /t REG_DWORD /d 1 /f
  2. Run the following command as a user who is a local administrator, substituting the drive letter if necessary:
    c:\windows\system32\migwiz\migwiz.exe
  3. In the Windows Easy Transfer wizard, select the following options as you progress through the wizard:
  • Click Start a New Transfer.
  • Click My old computer.
  • Click Use a CD, DVD or other removable media.
  • Click External hard disk or to a network location.
  • Enter a path where you want to save Savedata.mig, and then click Next.
  • Click Advanced options.
  • On the Select user accounts, files, and settings to transfer page, do the following:
    • Deselect all check boxes.
    • Under System and program settings (all users), expand Windows Settings, expand Network and Internet, and then select the Offline Files check box
    • Repeat the previous procedure for each user listed on the page.
  • Click Next to begin the transfer process.
  1. In the registry, create a string value called CacheLocation under HKLM\System\CurrentControlSet\Services\CSC\Parameters.To this value, assign the NT format name of the new folder where you want the cache to be. For example, if you want the cache to be in d:\csc, type \??\d:\csc.

    Create d:\csc (or whatever path you used in the previous step).

  2. Restart the computer.
  3. Run c:\windows\system32\migwiz\migwiz.exe and select the following options as you progress through the wizard:
  • Click Continue a transfer in progress.
  • Click No, I’ve copied files and settings to a CD, DVD, or other removable media.
  • Click On an external hard disk or network location.
  • Enter the path to the .mig file created in Step 3e.
  • Map the user account on the old computer to the corresponding one on the new computer.
  • Click Next, and then click Transfer.

Log off, log on, and then make sure you can correctly access your offline files.

Deleting the Old Cache
Assuming everything got moved correctly, you can delete the old cache from an RC1 build by typing the following commands from an elevated command prompt:

takeown /r /f c:\windows\csc
rd /s c:\windows\csc

The limitation of this method of deleting the old cache is that Takeown.exe can only process paths up to MAX_PATH (260) in length. If this path length is exceeded, the takeown command will fail. To work around this, the suggested method is to move the cache location back to the old one using step 4 again, set a registry key to clear the cache, reboot, and then move the cache back to the new location. Here are the steps.

  1. Due to step 4 above of cache moving instructions, there should already be a string value called CacheLocation under HKLM\System\CurrentControlSet\Services\CSC\Parameters.To this value, assign the NT format name of the old folder where the cache was previously stored. For example, if the old cache was in c:\windows\csc, type \??\c:\windows\csc.
  2. Restart the computer.
  3. In registry, create a DWORD value called FormatDatabase under HKLM\System\CurrentControlSet\Services\CSC\Parameters.To this value, assign the value of 1.
  4. Restart the computer (and log in preferably as a local admin user, so that folder redirection does not kick in again. The other option is to disconnect the network before you log in).
  5. Now assign the CacheLocation reg key back to the new location like step 4 of cache moving instructions.
  6. Restart the computer.

From “The Filing Cabinet” blog in this post. Thanks guys.

Network File Encryption not working on a Windows Cluster

Filed under: Uncategorized — Jason Hartley @ 10:45 am

When attempting to encrypt folders or files on a share published through a Windows Cluster Resource it fails. You may see the error “An error occurred applying attributes to the file:” … “The logon session in not in the state that is consistent with the requested operation.”

Encryption Error

This occurs in any network share published through the cluster, including redirected folders. Interestingly, when logged on as the ‘domain administrator’ you may not get this error.

Troubleshoot and verify the issue

Logon a workstation as a domain user. Create a test folder on a non-clustered network server share. Access the ‘Properties’ of the test folder and click the ‘Advanced’ settings. Select ‘Encrypt contents to secure data.”  You should not get the error stated above.

Next try to encrypt a test folder on a file cluster resource share. You should get the error. If you are not able to encrypt the folder on the non-clustered server you may have other issues in the domain, such as Kerberos authentication issues.

To resolve the issue

On the Cluster Server:

  1. Open Cluster Administrator.
  2. In the console tree, double-click Groups, and then click the group that contains the File Share resource you need to allow encryption on.
  3. In the details pane, click the Network Name resource in that you will use to connect to this file share.
  4. On the File menu, click Take Offline.
  5. On the File menu, click Properties.
  6. On the Parameters tab, select Enable Kerberos Authentication, and then click OK.
  7. In the details pane, click the Network Name resource for the file share.
  8. On the File menu, click Bring Online.

On a Domain Controller

  1. Open Active Directory Users and Computers.
  2. Locate the Machine Account for the CLUSTER (not the node name but the cluster network name). If it did not exist before, it should have been created after following the steps above and will be located in the Computers container.
  3. Right-click the Machine Account for the Cluster Resource, choose Properties.
  4. Click on the Delegation tab, choose Trust this computer for delegation to any service (Kerberos only), and click OK.
  5. Reboot the client workstation, logon as a domain user and verify encrypting a folder on the cluster share works.

More information can be found in the following TechNet Articles:

December 26, 2006

Manage Windows 2003 using Vista Administration Tools

Filed under: Uncategorized — Jason Hartley @ 12:06 pm

Installing the Windows Server 2003 AdminPak on Windows Vista computers results in error messages. There is a work-around which enables most (but not all) of the Admin Tools to function under Windows Vista.

Instructions for the work around have been published in Microsoft TechNet in KB article 930056, entitled ‘Error message when you install the Windows Server 2003 management tools on a Windows Vista-based computer: “MMC could not create the snap-in”‘.

Fun Microsoft Videos

Filed under: general — Jason Hartley @ 12:01 pm

Links to classic/funny Microsoft Videos on Todd Bishops (Seattle-PI) blog. A lot of these are available from the Internet Archive (www.archive.org).

December 19, 2006

Outlook Email disappearing after being Read.

Filed under: Office — Jason Hartley @ 11:46 am

The problem with Outlook E-mail disappearing after being Read, is due to a filter being applied. I have run into this a few times where a user receives email in the Inbox and has Preview turned on, the email marked as read after a few seconds, and disappears. Often times the user does not know how the filter got turned on or applied.

You can verify this by looking at the status bar, you might see “Filter Applied” to in the bottom left corner of the Outlook window.

To resove this:

  • Open Outlook
  • Select the “Inbox” (or another folder mail is disappearing from)
  • Click “View” from the menu
  • Choose “Arrange by”, then “Custom…”

You should now be at the “Custom View: Messages” window.

  • Click the “Filter” button
  • Click “Clear All” (at the bottom) in the “Messages” tab.
  • Click “Clear All” (at the bottom) in the “More Choices” tab.
    (This is likely currently set to “Only items that are: unread” — this is probably the cause of the problem)
  •  Click “OK” and “OK”.

The Read emails should now appear.

December 15, 2006

Resolving Citrix Presentation Server 4.0 Printing Issues

Filed under: software — Jason Hartley @ 3:16 pm

If you are experience printing issues on Citrix Presentation Server (PS) 4.0, install the following hotfixes.

The Rollup addresses a total of 258 issues resolved on a Presentation Server 4.0 machine, including many printing issues. The post-R02 hot fixes above address additional printing/printer issues experienced in a PS 4.0 environment. The links to the patches above are for the 32-bit version.

As a best practice, someone in the IT group should be assigned to monitor the all vendors of deployed technology, including the Citrix Support web site for any new hotfixes. Any Citrix hotfix labeled as “Critical” by Citrix should be tested and applied ASAP.

It should also be noted that Citrix Systems is discontinuing technical support June 30, 2007 and maintenance (hotfixes) for the Citrix MetaFrame XP Presentation Server product line Dec 31, 2006. Anyone delivering applications through Citrix XP should test and migrate to the more current supported versions of Presentation Server (3.0 & 4.0) as soon as possible.

Internet accessible Network Time Servers for NTP

Filed under: Uncategorized — Jason Hartley @ 1:00 pm

It is becoming critical to point network devices (routers, servers) to the internet to set time the clock on the device. Kerberos authentication used in many directory services, including Microsoft’s Windows Active Directory, require clocks on authenticating devices to be set within 5 minutes of the authentication servers.

In a Windows network the client devices retrieve and synchronize the system clock with the server (DC) they authenticate to. The subordinate DC’s in the directory all sychronize with the DC which holds the “PDC Emulator” FSMO role in the local domain. Which in turn goes up the chain to the Forest Root Domain to obtain the time from the “PDC Emulator” DC in the root.

Standalone Windows Servers and the Windows Server (FSMO) DC by default is configured to set their time based on the ”time.windows.com” internet NTP servers. The problem with this, is that this internet time source does not always seem to be available — maybe traffic load, or other reasons.

You can manually set which internet time source your servers and routers poll time from. There are many time sources available, for that reason I have included links to lists of internet time sources below.

WMworld 2006 Conference Material Downloads

Filed under: Uncategorized — Jason Hartley @ 12:38 pm

VMware has published the Sessions materials (mp3, pdf, webcast) from the (November) 2006 VMworld to the public web site. They can be downloaded directly from VMware at http://www.vmware.com/vmtn/vmworld/.

December 14, 2006

Bad MSDN Code Sample on IWebRow interface

Filed under: Uncategorized — Jason Hartley @ 2:39 pm

When writing a connected webpart for WSS 3.0, I decided to use the System.Web.UI.WebControls.WebParts.IWebRow interface. The only good code sample I could find was on MSDN http://msdn2.microsoft.com/en-us/library/system.web.ui.webcontrols.webparts.iwebpartrow.aspx It didn’t work, my webpart would would be fine until you actually tried to connect it to anything. Then I would get the always helpful “webpart has caused a problem that that we won’t log or explain anywhere” error screen. After many attempts to debug and correct my code I found the problem in :

public void GetRowData(RowCallback callback)
{
callback(_table.Rows);
}

In the code sample the Schema for your rows is passed as:

return TypeDescriptor.GetProperties(_table.DefaultView[0]);

The schema you passed the consumer webpart (in my case a dataview) is not the same as the rows you end up passing it. When I finaly figured it out the fix is easy. You simply need to pass the default view in to the callback object and you have no problems, GetRowData is now:

public void GetRowData(RowCallback callback)
{
callback(_table.DefaultView[0]);
}

Hopefully, this is helpfull to somebody, I find nothing more frustrating then when the MSDN code sample does not work and nobody has posted a solution anywhere.

I also decided to implement the IWebPartRow in a seperate class. In the whole code sample I ended up only passing one parameter to the consumer so I could have used a different interface, but I didn’t know that when I started.

Here is the class that implements the IWebPartRow:

public class PartsFilterRow : IWebPartRow

{

private DataTable tb = null;public string Query = “”;

private void SetupTable(){

if (tb == null){

tb = new DataTable(”Table”);tb.Columns.Add(”Query”);

DataRow row = tb.NewRow();row[0] = Query;

tb.Rows.Add(row);

}

}

public PropertyDescriptorCollection Schema{

get

{

SetupTable();

return TypeDescriptor.GetProperties(tb.DefaultView[0]);}

}

public void GetRowData(RowCallback objcallback){

SetupTable();

//objcallback(tb.Rows[0]);

objcallback(tb.DefaultView[0]);

//objcallback(null);

}

}

And Here is the how I use it in different webpart classes:

private PartsFilterRow pfr = new PartsFilterRow();
private const string DefaultQueryStart = “”;
private const string DefaultQueryEnd = “”;

protected override void OnInit(EventArgs e)
{
base.OnInit(e);
pfr.Query = DefaultQueryStart + DefaultQueryEnd;
}

[ConnectionProvider("Row")]
public IWebPartRow ProvideInterfaceForConnection()
{
return pfr;
}

December 13, 2006

Deleting saved names in the Outlook Mail List.

Filed under: Office — Jason Hartley @ 2:55 pm

Outlook keeps a list of all the names and email addresses of people you have sent mail to in the past. Microsoft calls this the “nickname” and “auto completion cache” of Outlook.

There are two ways you can delete these names…

  1. Search for the *.N2K file on the workstation and delete it. This is the cache file.
  2. In Outlook, click the “New Mail Message” button. Type in the single letter such as “a”, this will display all the contacts and email addresses that are remembered — which start with the letter. Hold down the “delete” button to remove the names in the list. Repeat for each letter.

More resources: