Windows RT & Temp & 8.3 File Names = Trouble

One of the advantages of working at Microsoft is that sometimes you get a hold of super cool pre-release software. It’s not always fun and games, and sometimes, it’s more trouble than it’s worth.

Earlier this year, I found out about a new E-Mail client for Windows RT being produced by the Outlook team, and wanted to try it out. I got the link to the internal distribution site and tried to install the package. Turns out that the installation mechanism for the Modern Store App was via a PowerShell script.

The PowerShell script failed, and the application was *not* installed.

I dug down and found out that there were several *assumptions* being made that made the script fail.
The script tried to copy files down locally to the %temp% directory before Sideloading the *.appx files into Windows 8.

Assumption #1 – On Windows RT, profile paths will not contain spaces. Fact: That’s not true, on my machine, the profile path for my local account was somehow set to “c:\users\Keith Garner” I don’t recall how I set this up, but it that way now.

Assumption #2 – Scripts don’t need to use Quotation Marks around the target %temp% path in the script. Fact: It’s true as long as you can fall back to DOS 8.3 file names. For the %temp% variable, Windows will automatically change the variable to the compatible DOS 8.3 file name for compatibility reasons. If you want to see how these names are generated, run the cmd.exe console window, and type: “dir /x c:\” See how “c:\Program Files” shows an alternative name, most of the time it’s Progra~1.

Assumption #3 – You can assume that Dos 8.3 files names will be available. Fact: it is possible to disable 8.3 file name generation using a registry setting, See KB121007. Why do this? for performance reasons. It takes extra storage and CPU cycles to generate 8.3 file names. I guess the Windows RT folks decided that they could do away with the legacy 8.3 file names for performance.

Add these three assumptions together, and you get my problem. I submitted a bug to the appropriate team asking them to place quotations around the %temp% path in the powershell script.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s