Howto and Microsoft27 Oct 2009 03:00 pm

After installing an unsigned kernel driver, I noticed that I got an error with playing DRM content on my Zune.  After some digging, I found:

http://blogs.technet.com/askperf/archive/2009/02/24/windows-7-zune-and-the-case-of-the-mysterious-debugger.aspx

It took awhile as when I was searching for Zune C00d2767, nothing came up, but hopefully somebody somewhere will find this useful.

Development and Microsoft27 Aug 2009 08:06 pm

So I came across a rather interesting problem today.  Basically, I need to embed a Microsoft Cabinet file into an executable.  This is done in an automated type of way, so in order to verify that it got embedded correctly, I used Resource Hacker to open the EXE, and export the resource.  Looking at what Resource Hacker spit out seems like it got embedded OK.

ResHacker-1  

I then exported the resource to disk to ensure that the cabinet archive contained the file I embedded into it.  When I went to open the .cab file, it didn’t seem to have any entries in it, and WinRar gave an error when trying to open the file.  Weird, I thought.  So, for fun, I opened the file in Notepad to only notice that it literally saved the text as it was shown in the hex editor. 

 ResHacker-2

What a weird bug!

I ended up opening the exe in VS2008, exporting the resource from there and verifying it.  Here is what opening it in notepad looks like.

ResHacker-3

Howto03 Aug 2009 03:26 pm

When attempting to run a virtual machine using Hyper-V on an HP xw4600, if you get the following message “Hypervisor is not running”, then hardware-assisted virtualization is probably not enabled.

The way to enable it is to go to:
BIOS Menu (f10 on boot)
Security->System Security
Data Execution Prevention (Enabled)
Virtualization Technology (VTx) (Enabled)

Development and Microsoft05 May 2009 01:34 am

I have been wanting to get back into developing my big project I did in my college years, which was basically a LAMP application.  This time, I wanted to set it up as a WIMP environment (har har harrrr, wimp).  All went pretty well until I tried to install SQL Server 2008 Express Edition.

Prerequisites

When I started the installation, I was informed that I needed .net 3.5 SP1.  So I went and got it, rebooted my machine, then re-ran the installation.  Then I was told I needed Windows Installer 4.5.  Once again, I got the installation, rebooted, and started the installation.  A third time, during the installation, I was notified that I needed PowerShell!  Although the UI for showing me I needed PowerShell was much nicer, it was extremely annoying to have to run the installer three times and reboot my machine twice before I finally had all of the prerequisites.

Installing

My machine is running out of space on my C:\ drive, so I wanted to install on my D:\ drive.  So I change the drive and find the following errors:

 image image

 

What the hell are these errors? I mean, I realize that when I told the installer to create a directory it may not have the attributes the installer wants, but can’t the installer set those attributes?  And INSTANCESHAREDWOWDIR? Wow, that’s an ambiguous error.  So I decide to bite the bullet and install in the default directory.  I cancel out and low and behold!

image

The installation link has become disabled!  So now I have to close the entire installer and reopen it, how fun!  But wait, there’s more!  When I attempt to reopen the installer, I get another friendly error!

image 

I assume it has something to do with the eight setup processes that are running, consuming over 250MB of RAM

image

I finally get to run the installer, I give up and let it try to install on the C:\ drive, so finally I am at “Server Configuration” where I am told to enter my service accounts.  Again, I get another error

image

For some reason it says I have invalid credentials, but let’s take a look at the install window. (My emphasis highlighted in the below picture)

image

Very nicely done SQL Server 2008.  Tell me to click help for more information… WHEN THERE IS NO HELP LINK.  Apparently I had to set up the account in the upper dialog, and not the lower one.

So now I’m just one step away from “ready to install”.  My nightmare will be over!  And guess what happens? You guessed it, ANOTHER ERROR!

image

Apparently, there was another prerequisite that I needed to install that it failed to tell me about!

In the end, I just ended up installing MySQL.

Development and Howto and Microsoft29 Apr 2009 10:06 pm

I spent (most) of the day at work today trying to figure out why my IHTMLDocument2’s hyperlinks were opening in new windows, instead of the current window it was in. Finally, I stumbled upon this:
Resolving Hyperlinks.

By the time anyone reads this, MSDN will probably have changed the link structure, so I’ll also explain it here:
If a user clicks a link within an HTML page viewed in MSHTML, MSHTML calls the HlinkNavigate function (after implementing an IHlink interface). If the host does not implement IHlinkFrame, this function launches a separate application to follow the hyperlink.

Wow, that was frustrating!

Howto and Microsoft28 Jan 2009 07:41 pm

A work-around to a bug in Windows Live Messenger 2009 was recently brought to my attention.  If somehow the background picture in your Groups conversation window has changed, and you want it to be removed, here’s how.

1. Open the Background picker in the 1:1 conversation window
2. Click "Show all…"
image 
3. Select the blank background
4. Click the "Set default" button

image

Development12 Jan 2009 07:40 pm

Without a doubt, reading Secure Coding in C and C++ made me quite scared of coding securely.  In particular, all the ways you can mess up integer security.  Ever since I had read that book, it has given me a whole new perspective on things to look out for and security problems that can arise.  Lets take a look at what’s going to be a future interview question I’m going to ask people.

// Returns true if set, false if not set
bool ToDecimal(char* string, unsigned long* pdw)
{
    char* end = NULL;
    unsigned long dw = strtol(string, &end, 10);
    if ( dw == LONG_MAX || dw == LONG_MIN
     || (dw == 0 && wzEnd=string) )
    {
        return false;
    }
    *pdw = dw;
    return true;
}

Find the bug!

So what’s wrong with this code? Hint: many things are wrong (which is why I like it), but I’m speaking of what’s relevant to my post. Well, strtol happens to return a signed integer, not an unsigned integer.  What happens if –1 is passed in?  Well, strtol will return –1 (and on most machines it’s represented as 0xffffffff).  The compiler will then stick it into the unsigned long and away they go!

int main()
{
    //Sploits!
    unsigned long age = 25;
    unsigned long brosAge = 0;
    char* theInput = "-1000" //Nasty input
    if (ToDecimal(theInput, &brosAge))
    {
        printf("My age + my brothers age = %d",
		(age+brosAge)); //4294966320
    }
}

In my theoretical program, it’s hardly a problem, but what happens if I reserved a buffer, was doing pointer arithmetic, or something else that could cause serious damage?  This could have just become an entry point into a security hole.  So please, check your signs!

Development and Microsoft08 Jan 2009 01:51 am

Over the past six months, I have been working on the Windows Live Installer, and I thought some readers of my blog would like to know some of the technical details that are involved in creating our installer.

Overview

For those that use Linux, our installer is similar to a package manager. Each product team creates a package (usually installed via MSI), and a collection of packages is described in the catalog.

Some of the cooler features include the following:

  • Completely data driven by the catalog and configuration.
  • Full rule engine to exclude or include packages and products given a condition (os, service pack, specific software version installed, etc…)
  • Robust downloading of packages.
  • Transactional installation of packages and dependencies.
  • Reducing the number of reboot’s necessary.

Catalog, Configuration, and Rule Processing

What I have worked on the most was the catalog, configuration and rule processing.  When the installer starts up, the first thing that it does is process the catalog and determine which products are applicable for installation or upgrade.  Rules are processed which determine weather or not a product can be installed.

Part of the catalog processing is to load the configuration.  This was the first thing that I worked on when I started.  If you look at the resources inside of the executable, you will notice items such as CONFIG0, CONFIG1, etc… Each of these configurations will be loaded at runtime in the order listed, with newer configuration files overriding the previous settings.  This allows us to easily change some settings for different languages or builds, without having to change anything in the code.  These may include reversing the text for right-to-left languages, choosing which products from the catalog to be displayed, or not having a checkbox checked by default due to privacy laws.

For the beta, users of Windows XP may see long startup times.  This is due to one of the products needing to find out if a certain hotfix is installed.  In order to check and see if these hotfixes are installed, we must make a WMI query, which for some reason or another is very, very slow on certain machines.  For the final release, the product was able to check for this information itself and we were able to remove the queries.

Part of our installer was to introduce a robust downloader that can download packages in the background and be resistant to network connectivity issues.  We also wanted to make sure that if we have partially downloaded a product, we can resume from where we left off.  Although the number of 56k users has dwindled in the US, there are still many people with slow connections, or pay per-kilobyte that we need to create a good user experience.

Transactional Installation

Part of the installation of the products includes a feature that allows us to install packages using transactions.  In the past (and in early internal releases of the installer), if a user had cancelled the installation, then we could only rollback the current package that is being installed.  So for Windows Live Messenger, if it installed a dependency and then started to install messenger, then the user cancelled it, we would only rollback the installation of messenger and leave the dependency.  With our transactional installer, we are able to have the rollback chain go as many packages back as we need to for the transaction.  This ensures that the user does not have incompatible dependencies after installation.

Reboot Reduction

Everybody hates to reboot their computer after installing a product.  Unfortunately in a lot of cases and the current state of Windows, we must live with the fact that reboots are necessary.  One of the items we worked on in this release was to reduce the number of people who needed to reboot their computer.  Through closing certain applications while installing the Windows Live products, we are able to prevent reboot’s.

One major change to this feature between the beta and the final release was the UI associated with it.  For the beta, the installer would check for files in use when the user selected the applications to install.  This may have lead to a long pause where the user would believe that the applications was frozen.

Select Programs BETA 

After checking for files in use, the installer did not give the option for users to leave their applications open, it only showed a list of applications it was going to close.

Files In Use BETA 

For the final release, we implemented a progress bar while checking for files in use (with the option to skip the check), and allowed the user to manually close the applications which have files in use.

Files In Use RELEASE Files In Use RELEASE

Questions?

That’s about all that I can think of to cover.  What do you want to know about the installer? Any features you want to see implemented?

Opinion04 Nov 2008 04:30 am

When looking on Facebook the other day, I noticed something peculiar.

Some Poser

That is NOT me.  Seriously, how many Logan Buesching’s are there on the internet?  Windows Live tells only knows about one.

I just hope that some day he never becomes famous.

Opinion10 Sep 2008 04:20 am

I am usually a fan of open source software, but the latest two that I have downloaded are sore on my eyes and a real pain to use!  The first is Media Coder, while the second is JJ MP3 Renamer.  It has been my findings that open source software in general is much more difficult to use than their commercial counterparts.  Maybe someday I will do a comparison of open source to commercial software and the usability between them.

Background

I recently purchased a 120gb Zune player when I used to have an Apple IPod.  I want to transfer all of my IPod stuff over to my Zune player.  I was able to get songs I ripped from CD to work properly, but songs I purchased on ITunes don’t work.  I am currently working on stripping the DRM from those purchased songs to add to my Zune.  I realize this is illegal, but hey, I legally paid for these in the first place, so I don’t feel bad about doing it.

Media Coder

Lets start with the program (that I hope?) can convert the DRM laden files to non-DRM formats.  I haven’t quite used the program yet, but on the first look I immediately said WTF.  This is UI hell.

BadUI-1

1.) I’m given a transcode option in the menu bar.  I could pretend like I’m not an idiot, and say that my grandma won’t know what “transcode” means, but in reality I don’t know what it means. I will assume that “Convert” would have been a better choice. (Hell, even Windows Live Writer doesn’t have transcode in its dictionary!)

2.) They have some weird icons to show, one of which being the “Skip” icon which looks like someone is getting ready to soccer kick something.  This reminded me of wanting to physically kick the software, which is what you see my little stick figure doing!

3.) Why is there a “…” and an “Open” button next to the folder? This is confusing.

4.) Why the hell are there so many tabs?

5.) WHY THE HELL ARE THERE SO MANY TABS!!???

6.) Why would I want to refresh rss? Do you really think I keep this application open for long enough for you to post something new? And even if I did, do you think I would want to refresh the rss feed to find out new information?

7.) WHY THE HELL ARE THERE SO MANY TABS?!?!?!

JJ MP3 Renamer

As if the first UI design wasn’t bad enough, here is another gem.  This was used to rename and move around files from my IPod’s crazy directory layout into a more human readable format.  Overall this wasn’t as bad as the last one, but it did take me about 5 minutes to actually figure it out.

BadUI-2

1.) The item that has “click” next to it is actually clickable! Wow, who would know that?  There is absolutely no indication that it can be clicked.  In fact, there are no visual indications that anything on the screen can be clicked.

2.) Why do I have to be shown the difference between idv2 and idv3? Is there really any reason why I would still want idv2?

Next Page »

Buy fake rolex watch for sale replica watches replica rolex womens. Quality furniture furniture baby furniture.