Tuesday, October 20, 2009

Troubleshooting 0xc0190036 Errors on Windows Vista / Windows 2008

This morning, I found myself in the unfortunate circumstance of the dreaded 0xc0190036 error. There is not a lot of information about this particular error code. It is, in fact, related to inaccessible or corrupt files.



During an update process, many files are flagged for replacement during the next system boot--that way, the system can keep running until the next convenient restart. In this case, however, some of the files are corrupt for whatever reason (bad blocks on hard drive, bad memory causing CRC errors, lots of potential sources). The solution is relatively easy once you know what the problem is.

To repair this problem, you will need:

- Windows Vista or 2008 Boot Media
- USB thumb drive containing
-- disk controller drivers not included on Windows Media
-- replacement for corrupt file
- ImageX (or another way to read the Windows install.wim from either the original media or service pack installation)

ImageX is part of the Windows Automated Installation Kit (WAIK). It's a 1GB download; a few folks have been kind enough to extract the necessary bits and host them. If you are unable to find them, leave a comment and I'll send them to you.

The file listed in the 0xc0190036 error is most likely the corrupt file. The first step is to extract the replacement files using ImageX. In this case, I'm going to be using the Windows 2008 SP2 installation media since it contains the updated file that I need (hvboot.sys).

1. After extracting the ImageX support files, right-click wimfltr.inf and select "Install." This will install the WIM Filter Driver (required to mount WIM files).
2. Create a temporary directory to which the WIM file will be mounted (such as C:\Mounted_Images).
3. Run the command imagex /mount e:\sources\install.wim 1 C:\Mounted_Images to mount image 1 inside the install.wim file to C:\Mounted_Images.
4. Copy the necessary file (in my case, C:\Mounted_Images\Windows\winsxs\amd64_microsoft-hyper-v-drivers_31bf3856ad364e35_6.0.6002.18005_none_c73bce55acf5cb5f\hvboot.sys) to a USB thumb drive.

Next, you'll need to make sure you have the appropriate RAID drivers for your system if they are not included on the Windows media. If you presented driver media during the original Windows installation, you can use that media.

Finally, the repair:

1. Boot to the Windows Vista or 2008 installation media.
2. Attach your USB thumb drive containing the replacement for the corrupt file as well as controller drivers.
3. Select "Repair My Computer."
4. Select "Load drivers" and browse to the drive containing your controller driver (in my case, the USB drive was mounted as C:\).
5. Select the driver from the list presented and click "Add driver."
6. Click Next to go to the repair menu.
7. Select "Command Prompt" to launch a command prompt session.
8. Run chkdsk /F on your system volume (in my case, the system volume had been mounted as E:\, so I ran chkdsk /f e:\).
9. When prompted, dismount the volume so Chkdsk can have exclusive access to it.
10. When Chkdsk is complete, copy the replacement file from your USB thumb drive to the appropriate location on your system drive (since the system volume had been mounted as E:\, I needed to copy hvboot.sys to E:\Windows\system32\drivers).
11. Restart.

If you encounter more c0190036 errors, you can repeat the process for each damaged file.

Tuesday, September 29, 2009

The Lemon Drop

Any bartender can combine cheap ingredients and pre-made mixes. But if you want to make incredible drinks people really enjoy, you need to start with good quality ingredients.

A little high school chemistry never hurt, either.

The Lemon Drop is a drink that is routinely desecrated with bottom-shelf vodka and sour mix. If you've spent any time on my drinks blog posts, you'll find that I favor drinkability and flavor over just about everything else.

This is no different.

Lemon Drop
1 1/2 oz Belvedere Vodka
3/4 oz Caravella Limoncello
-or-
2 oz Absolut Citron Vodka
1/4 oz Caravella Limoncello

3/4 oz simple syrup
1/2 oz Cointreau Orange Liqueur
1 fresh-squeezed lemon

Rim either an old-fashioned or martini glass with the squeezed lemon and dip in sugar. Combine the spirits and fresh-squeezed lemon in a metal shaker full of ice. Shake until the canister is frosty and strain into the glass. Garnish with a lemon wedge.

If the drink is too strong, you can add a splash of club soda without affecting the flavor.

Thursday, September 24, 2009

An Old Fashioned Drink for the Modern Man

If you're looking for a drink that hearkens back to simpler times or a crisp drink that none of your neighors are drinking, look no further than the Old Fashioned. Concocted as early as 1806 (according to some), this blend of whisky or bourbon tempered by a little sugar and bitters hits the spot every time.

Old Fashioned
1 tsp or so of simple syrup (or about 1/2 tsp of loose sugar)
Splash of club soda or water
2 or 3 dashes of Angostura bitters
1 1/2 oz of whisky or bourbon (I prefer Maker's Mark)

Comine the syrup, club soda (or not, if you're a purist), and bitters in a glass with an ice cube. If using loose sugar, make sure it's fully dissolved. Swirl around until the inside of the glass is coated. Add the whisky or bouron. Serve with a cherry or two and an orange slice.

Setting up a Receive Connect for Postini Re-Injection

For any of you that use Postini for email services, setting up reinjection for the receive connectors in Exchange 2007 is a lot more work than allowing connection and relay through a vSMTP server in Exchange 2003.

Exchange 2007 has a lot of great features, such as the uber-powerful Exchange Management Shell. IMHO, Exchange 2007 also has a lot of drawbacks, such as a half-assed GUI. You can only achieve the most basic things through the GUI; anything that requires thought or a little more configuration is done through the cumbersome Exchange Management Shell interface.

To achieve the previously simple task of allowing relay through a vSMTP server, you can go one of two routes. I'm going to document the route that grants least privilege. The MSExchangeTeam blog as well as Technet both have variations on this as well as the Pro's and Con's of using it.

Allow Anonymous Relay
1. Open the Exchange Management Console.
2. Expand Server Configuration > Hub Transport.
3. Select the server in the top pane, and then click New Receive Connector... in the right pane.
4. Enter a name for the connector, such as "Postini Receive Connector," select "Custom" as the intended use for the connector, and click Next.


5. Select the "All availble IPv4 addresses" entry and click the Edit... button.


6. Select the "Specify an IP address:" radio button, enter the IP address of the interface that will be communicating with Postini, and click OK.


7. Enter the Fully-Qualified Domain Name the connector use to respond to connection attempts (most likely something like mail.mydomain.com) and click Next.


8. Click the 0.0.0.0-255.255.255.255 enter and click Edit....


9. Enter the appropriate address range for the Postini system you use. Systems 5, 6, 7, 8, and 20 are 64.18.0.0/20 (64.18.0.0./255.255.240.0); System 9 is 74.125.148.0/22 (75.125.148.0/255.255.252.0); Systems 20, 200, and 201 are 207.126.144.0/20 (207.126.144.0/255.255.240.0) and click OK.


10. Click Next.
11. Click New.


12. Right-click on the new connector, select Properties, select the Authenticaion tab and Ensure "Transport Layer Security" and "Basic Authentication" are selected.
14. Click the Permissions Groups tab and ensure Anonymous Users is selected.
15. Click OK.

So that gets you about half-way there. To finish it up, open the EMS and Copy/Paste the following cmdlet in:

Get-ReceiveConnector "Postini Receive Connector" | Add-ADPermission -User "NT AUTHORITY\ANONYMOUS LOGON" -ExtendedRights "Ms-Exch-SMTP-Accept-Any-Recipient"

Replace "Postini Receive Connector" with the name of the connector you created in Step 4 above.

If you want to use the EMS to create and set the permissions on the new connector, you can use these cmdlets:

New-ReceiveConnector -Name "Postini Receive Connector" -AuthMechanism "Tls,BasicAuth" -Usage Custom -PermissionGroups AnonymousUsers -Bindings 10.0.0.11:25 -RemoteIpRanges 64.18.0.0/20

Get-ReceiveConnector "Postini Receive Connector" | Add-ADPermission -User "NT AUTHORITY\ANONYMOUS LOGON" -ExtendedRights "Ms-Exch-SMTP-Accept-Any-Recipient"

Replace the values for -Name, -Bindings, and -RemoteIPRanges as necessary.

For more information on these types of connectors:
MSExchange Team Blog
Microsoft Technet

Thursday, September 3, 2009

Using LDIFDE and CSVDE to find computers in Active Directory

LDIFDE is an oldie-but-goodie tool for finding specific information in Active Directory. If you know the name of the attribute that contains the data you're looking for, you can construct a pretty powerful query.

For example, you can search for all computers in the Active Directory domain mydomain.com:

ldifde -f output.txt -r "(objectClass=computer)" -d "dc=mydomain,dc=com"

You can filter it down to all workstation-class computers (running Windows XP), as well:

ldifde -f output.txt -r "(&(objectClass=computer)(operatingSystem=Windows XP))" -d dc=mydomain,dc=com

Or even all workstations running Windows XP and Vista:

ldifde -f output.txt -r "(&(objectClass=computer)((operatingSystem=Windows XP)(operatingSystem=Windows Vista)))" -d dc=mydomain,dc=com

And workstations running Windows 2000, XP, and Vista:

ldifde -f output.txt -r "(&(objectClass=computer)(((operatingSystem=Windows XP*)(operatingSystem=Windows 2000 Pro*)(operatingSystem=Windows Vista))))" -l "cn,operatingSystem" -d dc=mydomain,dc=com

"But Aaron," you ask, "LDIFDE returns a lot of fields I don't need. How can I control the output?" Glad you asked.

You can use the -l switch to do just that:

ldifde -f output.txt -r "(&(objectClass=computer)(operatingSystem=Windows Server*))" -d dc=mydomain,dc=com -l "cn,operatingSystem"

Will return an output like this:

dn: CN=SERVERA,OU=Servers,DC=mydomain,DC=com
changetype: add
cn: SERVERA
operatingSystem: Windows Server 2003


You can swap out LDIFDE for the tool CSVDE to generate the output in a CSV format.

Friday, July 31, 2009

How to Schedule Recycling an IIS Application Pool

We have a customer with an IIS 6.0 application that crashes randomly--either the Application Pool worker process runs the server out of memory or hangs.

If you have a need to recycle the Application Pool between scheduled maintenance intervals, there are a couple of available solutions.

Windows 2003 (IIS 6)


IISApp.vbs
This script is part of the Windows 2003 Platform. Windows 2003 SP1 introduced the ability to recycle application pools. The syntax is pretty easy:

IISApp /a /r

Save this into a batch file and drop it into the task scheduler.

Application Pool Recycling through IISAdmin
1. On the taskbar, click Start, point to Administrative Tools, and then click Internet Information Services (IIS) Manager.
2. Expand the server name, and then click Application Pools.
3. Right-click > Properties on the Application Pool you wish to recycle.


4. Set the appropriate properties for recycling.


5. For example, to recycle the worker processes at 6AM, select the "Recycle worker processes at the following times" checkbox and enter the appropriate time (24-hour format).


6. Click OK.

Windows 2008 (IIS 7)


1. On the taskbar, click Start, point to Administrative Tools, and then click Internet Information Services (IIS) Manager.
2. In the Connections pane, expand the server name, and then click Application Pools.
3. In the Application Poolspane, select the application pool you wish to edit.
4. In the Actions pane, click Recycling...


5. On the Recycling Conditions page of the Edit Application Pool Recycling Settings Wizard, select at least one of the options in the Fixed Intervals section, select the checkboxes and enter values for "Regular time intervals" or "Specific Times" as necessary, and then click Next.
6. Click Finish.

Thursday, July 30, 2009

Obama Drinks to Race Relations

Sometimes a man just can't catch a break.

The blogosphere buzz from the Right is downright crazed about how Obama sat down to share beers with William Gates and the police officer who arrested him. Reading the tweets and Facebook replies to a recent NRP segment with Ken Rudin shows how so many people missed the boat:

Dear Mr. President: Stop wasting your time and acting "stupidly" in things that you should NOT be involved, stop giving your opinion for the actions of a "cranky old friend with a minority complex", and stop solving your verbal diarrhea with beer happy hours at the expense of Tax Payers. ...Ah, and stop walking like John Travolta in Saturday Night Fever ..."Not Cool"...


Oh yeah... drinking beer is the answer to all our problems today... why don't we smoke a joint while we are at it... or now how did Bob Dylan put it... Tellin' me he loves all kinds-a people. He's eatin' bagels. He's eatin' pizza. He's eatin' chitlins.


I think everyone should take a step back and think about how you would resolve a situation involving inflammatory remarks and strong disagreements. Maybe duke it out in the parking lot? That doesn't seem very productive.

I think I have to vote with the President on this one. Go grab a couple of beers and sit around and talk about what happened. That one-on-one personal communication works in any number of situations. I think the world would be a lot better off if we followed Obama's lead and talked out our problems instead of gossiping or backstabbing or lashing out in some other way.

One of the most powerful properties of social drinking is the socialization aspect. Alcohol tends to remove the inhibitions we have in our normal lives, which if not controlled, can have disastrous consequences. But, it can also be an excellent catalyst for very frank discussions.

To put the Biblical spin on it, Jesus presents it this way in Matthew 18:15-17:

Moreover if thy brother shall trespass against thee, go and tell him his fault between thee and him alone: if he shall hear thee, thou hast gained thy brother. But if he will not hear thee, then take with thee one or two more, that in the mouth of two or three witnesses every word may be established. And if he shall neglect to hear them, tell it unto the church: but if he neglect to hear the church, let him be unto thee as a heathen man and a publican.


The admonition is clear--get the parties in a room and talk about it. If everyone makes up, then you've gained an ally. If you can't come to an agreement, get another trusted person involved.

For all of you asking WWJD, I think Obama is on-track here.

I would challenge anyone this:

The next time you have a serious disagreement with someone at work, be the bigger person. Invite them out for a few drinks, talk about what's bothering you, explain how you feel. And then pay for the drinks. See how much that changes your relationship with that person, and consequently, your standing in the office. You have nothing to lose and everything to gain.

Bottoms up to that.

Sunday, July 19, 2009

My Favorite Whisky Sour

Sometimes, you just need a good whisky. Or whiskey. Take your pick. And sometimes, you need a good whisky sour.

Whisky Sour
2 oz Maker's Mark Bourbon
1 oz fresh squeezed lemon
1 oz water
Splash of Southern Comfort 100
1 tsp sugar

Combine in a shaker with ice. Shake vigorously for about 15 seconds and strain into a double old-fashioned filled with ice. Good to the last drop.

Friday, July 3, 2009

Longhorn Steak House "Perfect Margarita"

The Longhorn Steak House in Sterling, Virginia makes a great margarita. So great, in fact, that I decided to try to make it myself. No mixes here--only the real deal.

Longhorn Steak House Perfect Margarita
1 1/2 oz 1800 Reposado Tequila
1/2 oz Cointreau orange liqueur
1/2 oz Grand Marnier orange liqueur
1/2 oz pulp-free orange juice
2 1/2 oz fresh-squeezed lime juice
1/2 oz fresh-squeezed lemon juice
1 oz water
2 tsp sugar

Combine all ingredients in a shaker with cracked ice. Shake vigorously for 10-15 seconds and strain into salt-rimmed glasses.

Delicioso!

Sunday, June 21, 2009

Best Damn White Russian. Ever.

A few months ago, I posted this most excellent recipe for a White Russian.

This one is even better.

The Dude would be proud.

Best Damn White Russian
2 oz Kahlua Coffee Liqueur
1 oz Stoli Vanil (vanilla Vodka)
2 oz Bailey's Irish Cream
1 oz milk or cream

Add all ingredients to a double-old fashioned glass with ice. Stir gently and enjoy.