Welcome to MSDN Blogs Sign in | Join | Help

Dr. Z's Blog

Dr. "Z" lives in Northern Virginia with his family. He tries to stay in touch with developers and architects in the Mid-Atlantic region.
Visual Studio 2010 and .NET Framework 4 Release Candidate

The Visual Studio 2010 and .NET Framework 4 Release Candidate (RC) is available to MSDN subscribers on Monday, February 8th, with general availability on February 10th. Click here to find out more detail.

Scott Guthrie talks about a few known issues and suggestions in his post. If you are working with Silverlight 4, stay with the beta version for now.

My Favorite Windows 7 Feature: Sticky Notes

Windows 7 comes with many improved and new features for end users. One of my favorites is Sticky Notes. While I am not a typical user who likes to jog down important notes including passwords and sticks the notes on computer screens, but I do write my To-Do-List on paper, in a Notepad/Word doc, and of course Outlook tasks. But none of them is as handy as Windows 7 Sticky Notes, which I will explain below.

Windows 7 Sticky Notes are always on. You don’t have to save your Sticky Notes; they are saved automatically as soon as you finish typing. Even if you shut down your computer, your notes are safely saved. When your computer re-starts, the notes are there. Therefore, there is no Save option. Interestingly, the only way to delete a note is to close a Sticky Notes window.

You can start your Sticky Notes by typing the word “sticky” in the search box from the Windows icon at the low left corner. The default color is yellow, but you can choose from other five colors, blue, green, pink, purple and white.

image

Try it if you haven’t. No more misplaced notes or messages, thanks to Windows 7.

Cloud Computing in DC, Feb. 16, 2010

Microsoft has been in the cloud for 15 years -- dating all the way back to the introduction of hotmail email services through Windows Live messenger and XBOX Live.  In fact, no one has been delivering cloud services for as long or at the same scale as Microsoft. And we have been extremely busy over the past 6 years investing our R&D dollars into our Online Services offerings.

If you have been thinking about how the Cloud can help you:

· Drive greater efficiency in your IT systems and cut costs out of your IT infrastructure?

· Increase the scalability and agility of your IT infrastructure?

· Reduce your IT carbon footprint?

· Help your developers respond more quickly to business requirements?

· Address lost productivity and user frustration with disconnected IT experiences?

Join us to discover how Microsoft Cloud Computing enables organizations like yours to:

· Have the Flexibility by choosing whether your applications will run locally, in the cloud, or a combination of the two based on your business needs

· Remain confident in the Security and availability of your data and services as you harness the efficiency, cost, and environments benefits of the cloud

· Maintain Control while increasing end-user satisfaction and productivity via the enablement of seamless experiences across the PC, Web, and phone.

Registration Options

Event ID:
1032437955 or click here

Register by Phone
1-877-673-8368

Meal: Yes

Windows Azure Billing Starts Today

Pricing detail is available here. Developers with MSDN subscriptions can take advantage of an MSDN offer here.

Dan Kasun offers some guidance on how to keep your costs down in his post.

Uninstall Windows XP Mode and Delete VHD Files

I have blogged about Windows XP Mode and application compatibility in a previous post and a recent post that referenced an article “Windows 7's XP Mode: what it is, how it works, who it's for” by Peter Bright. In this post I will discuss how to uninstall Windows XP Mode and how to remove a VHD file using a custom tool when necessary.

If for any reason you want to remove XP Mode from your Windows 7 computer, it is very straightforward to do so: go to the Control panel, select Windows XP Mode and uninstall it.

image

This action will remove two VHD files that have been installed at two default locations on your computer. Note that your Virtual PC is still enabled, which means you can still create and run Virtual PC images.

  • C:\Users\<username>\AppData\Local\Microsoft\Windows Virtual PC\Virtual Machines\Windows XP Mode.vhd (the file size is about 428MB)
  • C:\Program Files\Windows XP Mode\Windows XP Mode base.vhd (about 1.12GB)

However, you may have to remove the “Windows XP Mode base.vhd” file manually if you ever left a copy of the file on the same computer, which was my case. The problem is that you cannot remove the VHD file because it is system protected and only the System account has Full Control rights on it as shown below.

image

In other words, even if you logged on with an administrator privileged account, you wouldn’t have much luck: the System account permission was required and you as a local administrator didn’t have the required permission. So the question is, how you could delete the file?

image

Thanks to Microsoft’s new search engine, Bing, I got several clues on how to run an interactive command line session (cmd.exe) under the System account. One clue as described in this post was to use the AT scheduler to launch a session under the System account,  but this approach worked for XP only. If you try to run the following command line on Windows 7, you receive an “Access is denied” error.

at 20:00 /interactive cmd.exe

image

As suggested in the error message above, I tried the schtask utility. However the interactive session is only enabled if the /RU user is currently logged on at the time the job runs and the task runs only if the user is logged in.

schtasks /Create /SC ONCE /ST 20:00 /RU "NT AUTHORITY\SYSTEM" /RP  /TN DeleteVHD /TR "cmd.exe"

Another clue as outlined in this post was to use the psexec tool. If you try to run the following command line on Windows 7 (you have to download and install the pstools first), you receive an “Access is denied” error. As you can see, Windows 7 has tightened security in a big way.

psexec -i -s cmd.exe

image

At this point I felt I was pretty much out of the option, but I didn’t want to reformat my computer in order to get rid of the stubborn VHD file. As I continued to search for a possible solution, I realized that if I could set NTFS permissions on a file programmatically I might be able to grant Full Control permissions to a local administrator account and the problem would be solved. So I decided to proceed with this approach.

Those of us who have done programming work with XP or earlier versions of OS probably remember how this could be done with the Active Directory Service Interface (ADSI) APIs, as documented in this Microsoft Support article.  But on Windows 7, you can use the managed code for folder and file related operations. There is a great example in an MSDN File Security Class article. I downloaded the sample code, created a VS2010 console app and made some minor changes. As shown in the code below, all I had to do was to grant FullControl permissions to a local administrator account which I specified.

//replace file name and account name
string fileName = "c:\\temp\\Windows XP Mode base.vhd";
string accountName =@"domainorcomputername\username";

// Add the access control entry to the file.
AddFileSecurity(fileName, accountName, FileSystemRights.FullControl, AccessControlType.Allow);

// Remove the file
File.Delete(fileName);

Once the console application was compiled, I copied it to the folder where the VHD file was located and scheduled the following task.

schtasks /Create /SC ONCE /ST 20:00 /RU "NT AUTHORITY\SYSTEM" /RP  /TN GrantFileFullControl /TR "c:\temp\GrantFilePermission.exe"

I then issued a command to run the scheduled task immediately.

schtasks /run /TN GrantFileFullControl

The custom tool successfully added FullControl permissions to the file for the specified administrator account, but didn’t actually delete the file. I was puzzled for a moment. Fortunately, when I hit the DEL button manually, the file was gone! I almost couldn’t believe that it actually worked.

You can download the VS2010 tool here (C#).

Find Out if Your Word Documents Contain Custom XML Markup

Gray Matter talks about a custom tool that helps detect if any Word documents (.docx and .docm) contain custom xml mark. You can find the detail about the tool and how to use it here.

Microsoft CEO Steve Ballmer Talks About His White House Meeting

Check out this CBNC interview below.

Windows 7: What’s New and How is it Different from XP and Vista

John M. Guilfoil, editor-in-chief at Blast, talked to Marty Cassidy, the general manager of the northeast district at Microsoft and went over several commonly asked questions about Windows 7 below. For detail, read the article here.

windows7_v_web       Windows Live EssentialsFeatured downloads

  • For people that downgraded or stayed with Windows XP, what will be the biggest differences between XP and Windows 7 for users?
  • What about Windows gaming on Windows 7?
  • What are the top differences between Windows Vista and Windows 7?
  • What are the brand new features in Windows 7?
  • What new programs/apps are there in Windows 7?
Visual Studio 2010 and .NET Framework 4 Training Kit (Jan. 2010 Release)
The January 2010 release of the Training Kit works with Visual Studio 2010 Beta 2 and .NET Framework 4 Beta 2. It is available for download here.

The Visual Studio 2010 and .NET Framework 4 Training Kit includes presentations, hands-on labs, and demos. This content is designed to help you learn how to utilize the Visual Studio 2010 features and a variety of framework technologies including:

  • C# 4.0
  • Visual Basic 10
  • F#
  • Parallel Extensions
  • Windows Communication Foundation
  • Windows Workflow
  • Windows Presentation Foundation
  • ASP.NET 4
  • Windows 7
  • Entity Framework
  • ADO.NET Data Services
  • Managed Extensibility Framework
  • Visual Studio Team System
A Free Antivirus Program: Microsoft Security Essentials

A few months ago Microsoft released a free antivirus program named Microsoft Security Essentials (MSE). It is mainly for consumers and home users. You can download it here. To see how MSE works, check out this blog, Introducing Microsoft Security Essentials.

With MSE, you don’t need to run other antivirus, anti-spyware software products such as McAfee and Symantec (Norton). In fact, you need to uninstall these products first before installing MSE.

While MSE is not a direct replacement of Microsoft’s Defender, you don’t need to run it either. If you are an XP user, installing MSE will automatically remove Defender. If Defender is not removed, you should manually remove it from the Control panel. If you are a Vista or Windows 7 user, you will NOT be able to remove Defender. However, installing MSE will automatically disable Defender. If for any reason Defender is not disabled, you should manually disable it to prevent from performance degradation.

It is worth noting that Microsoft Forefront Client Security is another antivirus product from Microsoft. Unlike MSE, Forefront is designed for business customers. It provides a centrally managed interface and is integrated into enterprise IT infrastructure products such as Active Directory. You can find more info on Microsoft Forefront Client Security here.

Hosting Videos Using Windows Azure Storage

Silverlight Streaming will be discontinued. This is a bit dated news, but you can find the announcement and step by step instructions for retrieving Silverlight Streaming content here.

While Windows® Azure is not a direct replacement for Silverlight Streaming and will have costs associated with its use, you can use Windows Azure to host videos in your web applications including blogs. David Sayed published a series of blog posts on how to host videos on Windows Azure.

Windows Azure Briefing at Microsoft DC Office on Jan. 14, 2010

AIS will present a half-day briefing on Windows Azure. Registration is available here.

01/14/2010, 09:00 AM - 01:00 PM
Welcome Time: 08:30 AM

Microsoft Corporation
5404 Wisconsin Ave. Suite 700
Chevy Chase, MD 20815
driving directions

Featured Product/Topic: Windows Azure platform

Recommended Audiences: Technology Executives, IT Managers, IT Professionals, Business Executives, Vice Presidents, CEO, CIO, COO, CFO, IT Directors, Software Developers, Technical Decision Makers

Head in the Clouds, Feet on the Ground
Featured Products/Topics: Microsoft Windows Azure Platform

Head in the Clouds, Feet on the Ground
Do you want to know how to:
• Leverage the different aspects of the Windows Azure Platform including Windows Azure, SQL Azure and Azure AppFabric
• How to assess your organization for Azure and help them determine your cloud strategy?
• Understand the cloud charges and determine the ROI of migrating to the cloud?
• Determine what best practices to apply in migrating applications to Azure?
At this briefing you will:
• Receive a recap of key highlights and announcements about Windows Azure
• Hear about real projects and the kinds of applications that should be considered for deployment to the cloud
• See a demonstration of a reference application we developed using Silverlight and Windows Azure
Attendees most likely to benefit from this briefing include:
• Executive Technology/ Business Liaisons
• Technology Decision Makers
• Development and Architecture Leaders

Preshow Keynote of the Consumer Electronics Show 2010

The annual Consumer Electronics Show opens this Thursday Jan. 7th in Las Vegas. Steve Ballmer, chief executive officer of Microsoft, and Robbie Bach, president of the Entertainment & Devices Division at Microsoft, will deliver the 2010 International CES pre-show keynote address at 6:30 p.m. PST on Wednesday, Jan. 6, at the Las Vegas Hilton, Hilton Center. The keynote address will also be webcast live and on demand at http://www.microsoft.com/ces.

Windows 7 and MinWin

Windows 7 has introduced many new and improved features not only on the user experience side but also at the kernel level. If you are curious of what changes have been made at the Windows kernel level, you can find great insights from Mark Russinovich’s PDC09 session on “Windows 7 and Windows Server 2008 R2 Kernel Changes”.

One of the changes I’d like to highlight here is the introduction of MinWin in Windows 7, which is a result of tremendous engineering work aimed at removing dependencies among Windows components. As Mark explains, MinWin, with 25 MB in size, is a set of bottom parts of Windows components or APIs and can be built, booted and tested independently. With this change or re-architecture, changes made within MinWin will not affect any Windows components, which means no rebuild of the entire Windows OS is required in order to test these changes. To find more detail on MinWin, check out this Channel9 interview with Mark.

Happy Holidays!


image image

Getting started with multi-touch development in Silverlight 3, using Windows 7 and an iPod

In a recent blog post Chris Klug discusses how he created a Silverlight 3 multitouch application on Windows 7 that communicates with an iPhone application called OScemote. Pretty interesting stuff.

To see how an iPhone may be used as a controller for a Silverlight app on Windows 7, or how a Silverlight application with MIRIA custom controls works on Windows 7, click the images (youtube videos) below.

image image

More Posts Next page »
Page view tracker