Author Archives: Code Monkey - Page 2

Introducing Web Based Test Case Management

 

The Visual Studio 2012 tools (both Visual Studio Clients and Team Foundation Server) have seen a new delivery cadence introduced so that customers will get additional features on a regular basis (roughly quarterly).

The great thing about this is that you will see great new features on a regular basis. You will see these updates referred to as a 2012.x release. At the current time we have shipped two versions of these updates delivering a range of new features and bug-fixes that you can read about here and here.

Specifically one of the really great examples of a completely new are of functionality introduced in the 2012.2 release of Team Foundation Server 2012 was the ability to work with our Test Case Management tools through a web based environment. You can find more details on this great new feature area here.

Developing a Windows Store Business App using C#, XAML, and Prism

About patterns & practices

The Microsoft patterns & practices team is responsible for delivering applied engineering guidance that helps  Software architects, developers, and their teams take full advantage of Microsoft’s platform technologies in their  application development project.

They have a simple goal of helping software development teams be more successful with the Microsoft application platform.

They do this by delivering guidance that:

?     Helps to simplify the Microsoft application platform.
?     Provides solution guidance to common problems.
?     Helps development teams grow their skills and learn.

For more information: http://www.microsoft.com/practices

Guidance on how to create a Windows Store business app using C#, XAML and the Prism library.

Ever wanted to know how to start building Windows Store Business app take a look at the AdventureWorks Shopper reference implementation and the Prism for Windows Runtime library.

clip_image002

The AdventureWorks Shopper reference implementation uses the Prism library to demonstrate modern development practices such as the Model-View-ViewModel (MVVM) pattern with navigation and app lifecycle management. Additionally the reference implementation demonstrates validation, application data management, accessibility, localizability, touch, search, tiles, tile notification, and multiple view states. It also provides guidance on testing your app and tuning its performance.

Similar to the Prism library for WPF and Silverlight or “Prism Classic,” Prism for Windows Runtime makes it easier to design and build flexible and easy-to-maintain Windows Store business apps using modern development practices.

These apps are “built to last” and “built to change.” They use design patterns that embody important architectural design principles, such as separation of concerns and loose coupling.

What’s in the Box?

?     Reference Implementation (RI) – the Adventure Works Shopper RI demonstrates validation, application data management, accessibility, localizability, touch, search, tiles, and tile notification.

?     Quickstarts:

Hello World – demonstrates how to create a Hello World app for the Windows Store using the Prism library. Event Aggregator – demonstrates how to send loosely coupled messages between components.Validation – demonstrates how to validate data on forms in a Windows Store app.

?     Prism library

Model-View-ViewModel (MVVM) with app lifecycle management and navigation
Event Aggregator in a Portable Class Library
Validation
Delegate Command
Flyout, Search, and Settings

?     Guide – Developing a Windows Store business app using C#, XAML, and Prism for the Windows Runtime” is designed to help developers create Windows Store business apps using the Prism library.

clip_image003

How to Get It?

The Prism library source code is available with the AdventureWorks Shopper reference implementation on the MSDN Code Gallery at http://aka.ms/prism-winrt-code. The Prism binaries are available on NuGet. Search for prism.storeapps and prism.pubsubevents.

You can view the documentation at http://aka.ms/prism-winrt-doc or download a PDF version at http://aka.ms/prism-winrt-pdf.

Videos

Introducing Prism for Windows Store Apps:

clip_image004

ZipApp Perfect tool for non-programmers to build Windows 8 apps quickly.

This post was originally posted at The Developer Movement , I wanted to share this with UK educators and students to demonstrate how easy it is to get started as a Windows 8 app publisher. http://www.zipapp.co.uk The promise : “Quick, simple and faster than hell”, “You don’t need to be a programmer” The reality : Yes, a non-programmer can build a useful app in an afternoon. What will the app be able to do? ZipApp supports creating apps with the following types of content Static content (hardcoded…(read more)

Guest post: Utilizzare gli SMS per l’autenticazione nelle app Windows Store

Questo post è stato scritto da Giancarlo Lelli (@itsonlyGianca), Microsoft Student Partner di Cagliari.

In questo articolo vedremo come implementare un’autenticazione SMS nelle nostre app Windows Store, ovvero come Windows 8 permette questo tipo di procedura, quali sono le classi che permettono di interfacciarsi ad un dispositivo mobile broadband e soprattutto i prerequisiti hardware e a livello di ambiente di sviluppo necessari per usufruire di tutte le potenzialità di questo particolare metodo di autenticazione.

Prefazione

Prima di addentrarci nell’argomento preciso che le procedure riportate in questo articolo non si possono applicare a coloro cha hanno intenzione di sviluppare app per operatori di telefonia mobile, ma solamente a coloro che vogliono utilizzare all’interno della loro field application (per cui mi riferisco a coloro che svilupperanno app del tipo LOB) questo tipo di layer di sicurezza. Gli esempi di codice forniti in questi articolo saranno in C#

Background

Il supporto alla tecnologia mobile broadband non è qualcosa di nuovo al dir la verità, infatti era già presente ai tempi di Windows 7, tuttavia la maniera in cui poteva essere utilizzata risultava piuttosto problematica, dovuta alla necessità di installare software e driver di terze parti per rendere operativo il nostro mobile broadband device. In Windows 8 queste problematiche sono state risolte, introducendo delle funzionalità che ad oggi permettono all’ utente di avere un esperienza utente sempre connessa, permettendo di considerare le connessioni a consumo come qualcosa (in certi casi) analogo al Wi-Fi. A questo proposito è stato fatto un lavoro di re-ingegnerizzazione dello stack di wireless networking che ha portato una serie di interessanti novità, due delle principali sono:

Introduzione del Mobile Broadband Interface Model (MBIM) ovvero sia una nuova specifica hardware che i produttori potranno adottare nei loro dispositivi garantendo così un hardware experience di gran lunga superiore a quella a cui eravamo abituati. Infatti all’ interno di Windows 8 la specifica MBIM viene fornita come qualcosa out of the box, ovvero già nativamente supportata, infatti il class driver che è destinato a supportare questo particolare tipo di device è già nativamente disponibile all’ interno del SO, quello che dobbiamo fare noi è semplicemente connettere il dispositivo al nostro pc/tablet, senza nemmeno preoccuparci di eventuali aggiornamenti perché è tutto gestito da Windows Update.

Introduzione di due nuovi namespace strettamente collegati:

· Windows.Device.Sms: che espone classi e metodi gestiti e fruibili da tutti i linguaggi supportati da WinRT per interfacciarsi ai dispositivi mobile broadband connessi al nostro pc/tablet.

· Windows.Networking.Connectivity: permette di ottenere informazioni sulla connettività, l’uso e il piano dati per la connessione a consumo attiva. I dati ottenuti tramite questi metodi possono essere usati per evitare il cosiddetto bill-shock, ovvero costi superiori al normale dovuti a sfori sul piano dati.

In questo articolo ci concentreremo soprattutto sul primo del due namespace illustrati sopra.

Windows.Device.Sms – Features

Le funzionalità messe a disposizione a noi developer da questo namespace sono innumerevoli, le principali, e quelle che consumeremo noi negli esempi di questo articolo sono elencato di seguito:

· Invio e ricezione di SMS in formato di testo

· Interfacciamento con il dispositivo mobile broadband

· Letture, scrittura e cancellazione di sms dal message store (memoria della sia card)

· Enumerazioni di tutti i dispositivi mobile broadband connessi

· Nuovo event trigger per background task

Ovviamente molti dei metodi di questo spazio dei nomi rispettano la filosofia asincrona di Windows 8 perciò supportano pienamente le due nuove keyword async/await, tuttavia alcune operazioni sono ancora collegate al vecchio concetto di callback associati ad un evento, a questo proposito mi riferisco agli eventi che riguardano la ricezione di un nuovo SMS e al cambiamento di stato del nostro mobile broadband device.

Per facilitare l’integrazione di un app mobile broadband con il sistema operativo è stato introdotto anche un nuovo event trigger che potrà essere usato nella definizione di nuovi background task per permettere ad un app la cui funzione è strettamente di messaggistica di potersi svegliare qualora venga ricevuto un sms, sganciandosi così dal vincolo dei callback che ovviamente vengono eseguiti solo quando l’app è in esecuzione.

Operazioni preliminari

Prima di buttarci nei meandri di Visual Studio ci sono alcuni step preliminari da eseguire, che permettono alla nostra app di avere i privilegi di accesso al MB device, ovvero, definire il metadata package per il nostro dispositivo MB e impostare le capabilities nella nostra solution di VS2012.

I requisiti software sono i seguenti:

· PC con Windows 8 (preferibilmente Pro) installato

· Visual Studio 2012

· Windows Driver Kit installato

I requisiti hardware invece:

· Dispositivo mobile broadband che sfrutta lo standard MBIM collegato al pc/tablet. [List]

Completati questi step strettamente preparatori, la prima cosa che dobbiamo fare (se non lo abbiamo già fatto) è collegare il nostro MB device al nostro pc/tablet. Non appena il device verrà collegato, il sistema operativo riconoscerà che si tratta di un dispositivo che sfrutta il MBIM e quindi attraverso il Device Metadata Retrieval Client (DMRC) controllerà in primis che all’interno del nostro computer non ci sia già un metadata package relativo a quella periferica (device metadata cachedevice metadata store), qualora non esistesse o ha bisogno di essere aggiornato il DMRC farà una query al Windows Metadata and Internet Services website (WMIS) per determinare l’esistenza di un package per tale dispositivo, qualora esistesse il DMRC lo scarica lo scompatta e lo memorizza all’ interno della cartella che contiene la cache dei metadati. (%PROGRAMDATA%\Microsoft\Windows\DeviceMetadataStore\). Arrivati a questo punto possiamo aprire VS2012, subito noteremo che nella barra dei menù è apparsa una nuova voce ovvero “Drivers”. Navighiamo come mostra la figura uno sino ad arrivare al menù relativo ai MB device metadata.

clip_image002

Una volta aperto quel menù ci ritroveremo davanti il wizard per l’authoring di service metadata, noi per comodità sceglieremo di modificarne uno già esistente (quello scaricato dal DMRC) e una volta che verrà aperto muoviamoci nella scheda “Applications” e andiamo a riempire i campi raggruppati nelle sezioni Metro Style device app e privileged application. Una volta fatto andiamo nella scheda finish e salviamo il newly edited package sostituendolo a quello già esistente. Con questa procedura abbiamo aggiunto la nostra app alla whitelist di tale dispositivo. Una feature collegata ai metadata package è la possibilità di specificare degli URL di app già nello store di modo che una, volta fatto il deploy del pacchetto, quando verrà connesso un dispositivo qualsiasi che abbia dei metadati già definiti, Windows 8 scaricherà automaticamente l’app indicata dallo store.

Il prossimo step sta nel definire le capabilities nella nostra solution di VS2012, questo step è abbastanza banale ma leggermente diverso da quello a cui siamo abituati poiché il file *.appxmanifest non permette l’aggiunta di tale feature tramite interfaccia grafica. Per cui dovremmo aprire tale file in modalità di testo e inserire il seguente codice:

clip_image004

Adesso siamo pronti a sviluppare la nostra app.

Code snippet per app di Windows Store C#

Presupponendo l’aggiunta di questi namespace e la dichiarazione di queste tre variabili:

clip_image006

Inizializziamo il MB device

clip_image008

Il codice sopra riportato è abbastanza autoesplicativo, ovvero per prima cosa creiamo un grande blocco try-catch, poi inizializziamo la variabile mai device con l’istanza del dispositivo Mb di default, se non vengono sollevate eccezioni utilizziamo una messagebox per far visualizzare alcune info sulla periferica collegata, altrimenti visualizziamo il tipo di errore. Le info base che visualizzeremo sono: il numero di telefono della sim inserita, la classe cellulare della scheda lo stato del device e la capienza della memoria della sim.

Enumerazione di tutti i dispositivi mobile broadband

clip_image010

Tralasciando la parte identica allo snippet precedente notiamo come il metodo .GetDeviceSelector() permetta di utilizzare una stringa AQS per identificare all’ interno del nostro pc/tablet tutti i dispositivi mobile broadband, dopodiché con un semplice ciclo for visualizziamo tutte le info base per ogni device, identificando il singolo device attraverso il suo Id univoco utilizzato il inizializzare ad ogni ciclo la variabile di tipo SmsDevice a meno di eventuali eccezioni.

Invio SMS

clip_image012

Lettura messaggi dalla memoria della sim

clip_image014

In questo snippet vediamo come è possibile legge gli SMS dallo store della sim, vale la pena evidenziare due cose, ovvero, l’enumerazione SMSMessageFilter permette di identificare la tipologia di msg da leggere (inviati, ricevuti, eliminati, bozze, tutti) e il fatto che all’ interno del ciclo i messaggi sono convertiti dal formato binario al formato testo con il metodo della classe SmsTextMessage .FromBinaryMessage().

Cancellazione messaggi dal message store

clip_image016

Tralasciando il codice già spiegato nello snippet precedente, le righe 6-7 mostrano come sia possibile cancellare in massa più messaggi semplicemente specificandone il tipo grazie all’ enumerazione spiegata prima, oppure come cancellare un singolo messaggio specificandone l’id al’ interno della lista instanziata in riga 3. La sottile differenza dei due metodi sta nel fatto che uno è singolare e l’altro è plurale!

Sottoscrizione e cancellazione ad eventi (messaggio ricevuto, stato device cambiato)

clip_image018

L’Intellisense provvederà creare i metodi di callback, nel primo caso un parametro del metodo sarà una variabile che permetterà di ottenere info sull’ SMS appena ricevuto, mentre nel secondo caso si potrà capire in che modo il dispositivo ha cambiato stato tramite la proprietà .DeviceStatus

Autenticazione via SMS concetti e algoritmi

Ora che abbiamo visto come poter sfruttare un MB device in Windows 8 per poter fare inviare sms alla nostra app, vediamo che tipo di approccio dobbiamo avere per essere sicuri dell’ efficacia di questo metodo. In questo articolo vedremo l’implementazione .NET degli algoritmi più usati in questi casi ovvero quelli definiti nei documenti RFC4226 e l’ RFC6238. Il primo fornisce una autenticazione basata su contatore mentre il secondo una basata su un determinato time span calcolato sul tempo UNIX. In questo articolo vedremo nel dettaglio il primo algoritmo (dato che per il secondo l’unica differenza sta nel primo valore fornito in input, che varia da un intero, ad un valore intero random dipendente dalla seguente formula calcolato su un intervallo di 30 secondi)

Y = (Now-UNIX_time) /30

 

 

 

Algoritmo RFC4226

L’algoritmo è definite come segue:

1. Prendi in input il numero di volte che è stato eseguito l’algoritmo + 1 insieme alla secret key

2. Incapsula tutto in un array di byte e calcola il SHA1 HMAC

3. Esegui delle operazioni bitwise e calcola il modulo del risulta dividendolo per 10^x dove X è il numero di cifre che vogliamo abbia il nostro codice di verifica.

4. Nel caso in cui il risultato dello step 3 abbia meno cifre di X fai un padding con zero

Code snippet dell’ algoritmo e chiamata del metodo

clip_image020

Il codice appena riportato è inserito dentro una Task<T> poiché proviene da un cloud service hostato su Windows Azure.

clip_image022

Questo snippet mostra la chiamata a tale funzione e l’invio del codice via sms. La classe SmsAuthServiceClient esiste perché deriva da una service reference che punta al cloud service dove è definito l’algoritmo della pagina precedente

Per quanto riguarda l’algoritmo RFC6238 il metodo avrà un parametro ovvero la chiave segreta e il resto sarà tutto definito a run time. Sotto è riportato l’algoritmo.

clip_image024

Grazie per avere letto questo articolo e per ora è tutto, se hai suggerimenti dubbi o domande contattami pure all’ indirizzo email: gcarlo.lelli@outlook.com

ZipApp – Create your own Windows 8 App

Got an idea for a Windows 8 app for your class or institution but don’t know where to start? ZipApp can help.

image

ZipApp gives you the ability to simply add some data or hook up one of your existing online services, such as Twitter or an RSS feed, to create a Windows 8 app that complies with store rules, without the need for in-depth coding knowledge or experience.

To get started, and build an app in only 10 minutes, firstly go to ZipApp.co.uk and sign in with a Twitter, Google, Facebook or Microsoft Account. Once you are signed in you will be able to create a new app. It will ask for some basic information such as the App Name, and a description etc. You are then on your way to being able to share your app in the Windows Store.

When you build your app you get the source code so you can extend the application to your hearts content. Furthermore, with dozens of templates that are available, you can be confident that you will be able to find a design that compliments your institutions branding etc.

Additionally, you can sell your app, add advertising or give it away for free. Flexibility sits at the heart of ZipApp!

Get started today by visiting www.zipapp.co.uk. Let us know your ideas for an app or post a link to your app in the store in the comments below.

Unit Testing Delay Signed Assemblies on the Hosted TFS Build Service

Using the hosted build service available in the Team Foundation Service is great because you don’t have to build and manage build servers. You can even get the hosted build server to run your unit tests automatically. To help maintain quality on a project I am doing with the ALM Rangers, we use a gated checkin that runs all our unit tests, so we can’t check in code with any failing unit tests.

Of course, using a standardized build server can have its restrictions. One of these is that you can’t configure strong name verification skipping. So if your code has to be delay signed then your unit tests will not run because they will be unable to load the assemblies due to a “strong name validation failed” error. I want to show you here one way to get around this problem. It is not necessarily suitable for everyone, so please consider whether it can work for you before committing to this solution.

The Idea

The idea is to have two strong name key files, one for development only that contains both public and private keys, and one for production use that contains only the public key and requires delay signing. You then create a new solution configuration for signed builds that uses the production file, while still using the development file in Debug and Release builds, through the use of conditionals in the project files.

Your normal gated checkin will build a Debug or Release configuration. The builds you use for testing may also use the Release configuration, unless you actually deploy fully signed assemblies to the test environments. You need to create a new build definition that uses the Signed configuration to generate the assemblies that use the production strong name key file, this build cannot run the tests though because the strong name verification skipping cannot be configured.

Step 1: Create a New Solution Configuration

The new solution configuration will be used to build the assemblies using the production strong name key file with delay signing. To create the solution configuration open the Configuration Manager from the BUILD menu. In the Active solution configuration drop-down select <New…>, this will open the New Solution Configuration dialog where you can create the new solution configuration. I named the new configuration “Signed” and based it on the Release configuration, like this:

 

It is best to verify that your solution still builds using the new Signed configuration. Fix any build issues before proceeding.

Step 2: Add the Strong Name Key Files

If you haven’t already done so, make sure you have the development and production strong name key files in the solution and in source control.

In my projects I put these in the solution directory and refer to them by relative path from the individual projects in the solution. Visual Studio likes to always copy the strong name key files into the project directory, you can correct this while doing the next step below.

Step 3: Make the Strong Name Key Files and Delay Signing Conditional

In this step we are going to make the choice of strong name key file and delay signing conditional on the solution configuration. This step requires you to manually edit the project file (i.e. .csproj or .vbproj). Open the file in a text editor. You can also open it in the Visual Studio XML Editor if you wish, but you will need to unload the project first. You will need to edit the project file for each assembly that needs to be delay signed.

Strong Name Key File

Locate the <AssemblyOriginatorKeyFile> element. This will appear in a property group like this:

<PropertyGroup>

<AssemblyOriginatorKeyFile>..\Development.snk</AssemblyOriginatorKeyFile>

</PropertyGroup>

Replace this with the following:

<PropertyGroup Condition= ‘$(Configuration)’ != ‘Signed’ >

<AssemblyOriginatorKeyFile>..\Development.snk</AssemblyOriginatorKeyFile>

</PropertyGroup>

<PropertyGroup Condition= ‘$(Configuration)’ == ‘Signed’ >

<AssemblyOriginatorKeyFile>..\Production.snk</AssemblyOriginatorKeyFile>

</PropertyGroup>

This means that when building the assembly the Development strong name key file will be used in any build configuration that is not the Signed one, the Signed one will use the Production strong name key file. Notice that I have used relative paths at this point too so I can keep the strong name key files in a single location.

Sometimes the <AssemblyOriginatorKeyFile> element appears together with other settings, as in this example:

<PropertyGroup>

<Configuration Condition= ‘$(Configuration)’ == ” >Debug</Configuration>

<Platform Condition= ‘$(Platform)’ == ” >AnyCPU</Platform>

<SchemaVersion>2.0</SchemaVersion>

<ProjectGuid>{792AC23B-5A04-4C5C-A7E5-70D22423CF4C}</ProjectGuid>

<ProjectTypeGuids>{82b43b9b-a64c-4715-b499-d71e9ca2bd60};{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>

<OutputType>Library</OutputType>

<AppDesignerFolder>Properties</AppDesignerFolder>

<RootNamespace>Microsoft.ALMRangers.GenerateUnitTest</RootNamespace>

<AssemblyName>GenerateUnitTest</AssemblyName>

<SignAssembly>True</SignAssembly>

<AssemblyOriginatorKeyFile>..\Development.snk</AssemblyOriginatorKeyFile>

<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>

</PropertyGroup>

In this case remove the element from this section and then use the two conditional property groups above.

Delay Signing

We do a similar thing for the <DelaySign> element. If you were already delay signing then locate this element and replace the property group it is in with the property groups below, otherwise just add the property groups:

<PropertyGroup Condition= ‘$(Configuration)’ != ‘Signed’ >

<DelaySign>false</DelaySign>

</PropertyGroup>

<PropertyGroup Condition= ‘$(Configuration)’ == ‘Signed’ >

<DelaySign>true</DelaySign>

</PropertyGroup>

As before, if the <DelaySign> element is in a property group with other settings then remove the element from the property group and add the conditional property groups above.

Step 4: Create Build Definition

The final step is to create a new build definition on the build service. The simplest thing to do is to clone an existing build definition and then in the Process section, under Items To Build set the Configurations to build to be Signed. You will want to disable the unit tests in the Automated Tests node as these will not work any more.

Limitations

This solution allowed me to build and unit test Debug builds on the hosted build service and also to build delay signed assemblies on it too.

However, I have not lived with this solution for long so there may be limitations that I am not yet aware of. One possible issue that comes to mind is when putting assembly references into configuration files. You will need to find a way to have configuration files change according to which solution configuration was built.

Windows 8 ?? DVD ??????

???????????????????????Windows 8 ???????DVD ????????????????Windows 8 Pro ??????? Windows Media Center Pack ?????????? Windows Media Center ?? DVD ??????????????Windows Media Center Pack ????????????Windows Media Player ??????????????Windows 8 RT ???????????Windows 8 Pro Pack ????????? Windows Media Center Pack ?????????????????

Windows 8 Pro ??? Windows RT ???????????DVD ???????? Store Application ?????????????????????????Windows 8 Pro ??????? DVD ??????????????????????????????? DVD ????????????????????????

 

????????????????????????

 

DVD playback options for Windows

http://windows.microsoft.com/en-us/windows/dvd-playback-help

 

Add Windows 8 Pro Pack or Windows 8 Media Center Pack to your edition of Windows

http://windows.microsoft.com/en-us/windows-8/feature-packs

 

Making Windows Media Center available in Windows 8

http://blogs.msdn.com/b/b8/archive/2012/05/03/10299686.aspx

GridView??????????????????????

XAML(C#?VB)?????Windows??? ??????????????????????GridView?ListView????????????Visual Studio?????????????????????????????????????????????????????????????????????????????????????ItemSource??????????????????????????????????????????????????GridView??????????????????????(??)???????????????????????????????GridView????????????????????????????????????????????????????????????????

????Visual Studio????????????????????????????????????????????????GroupdItemsPage.xaml???????????????GridView????????????????????????[???????????]-[????????? ????????]-[???????]????????????????????????????)?
1.Edit_ItemContainer

 

???????????????????????????????????[????????]?????????????????OK???????????(Visual Studio?Blend????????????????????[????????]?????????????????????????????????????????????????????)?
2.Copy_ItemContainer
?????????????????????????????????????
3.Editor_ItemContainer

????????????????OuterContainer\ReorderHintContent\ContentContainer\InnerDragContent\SelectionBackground??????????????????Fill?????????????????????????????????????????????????????????
4.SelectionBackground

???????????????????OuterContainer\ReorderHintContent\ContentContainer\InnerDragContent\SelectedBorder??????Stroke????????????????????????????????????????????????????????
5.SelectedBorder

???????????????????OuterContainer\ReorderHintContent\ContentContainer\InnerDragContent\SelectedCheckMarkOuter\SelectedEarmark??????Fill????????????????????????????????????????????????????????
6.SelectedEarmark

????OuterContainer\ReorderHintContent\ContentContainer\InnerDragContent\SelectedCheckMarkOuter\Path??????Stroke??????????????????????????????????????????????????????????
7.Path

SelectedCheckMarkOuter????????????????????????????????Grid??????????SelectedEarmark?Path???????????????????Path?Data???????????????????????????????????????????????
8.Running

??????????????????FocusVisual?????????????????????????????????????????????SelectionBackground??????????????????????????SelectionBackground?????????????????????????????????????????????????Opacity?????????????????????GridView?IsSwip?SelectionMode????????????????????(?????????????????????)?

?????????????????????????????????
9.Structure

??????????????????????????????????????

??? ??
PointerOverBorder ?????????????????????
FocusVisual ?????????????????
SelectionBackground ??????????????
SelectedBorder ?????????????
SelectedCheckMarkOuter ?????????????????????

?????????????????????????????????????????????????????????????????????????(????????????)??????????????????????????????????????????????????

Case Study: COM+ 1.5 Rollup Package 934016 Installation failure on Win2003 SP2

 

Recently we worked with on customer, who tried to install KB934016 on Windows 2003 server, however the Update.exe interestingly just crashed and failed to launch.

 

We went through below plan one by one till find the root cause and fix it. Share the detailed information as below:

 

Plan A: Manually extract the fix

===========================

Download the fix and save to disk, open a command window, navigate to c:\kb934016, run this command to extract the packages:

 

C:\kb934016\WindowsServer2003-KB934016-x86-ENU.exe /x

 

In c:\kb934016\update, execute the update.exe.

 

Checked the setup log files, no obvious clues:

 

1. c:\windows\kb934016.log

 

2. c:\windows\WindowsUpdate.log

 

Plan B: Apply hotfix for update.exe

==================================

Applied this hotfix but the issue persists:

 

928595  An access violation occurs, and the installation process stops responding for Windows XP SP2, Windows Server 2003 SP1 and SP2 when the installation process tries to migrate hotfixes

http://support.microsoft.com/kb/928595/EN-US

 

Plan C: Start the Update.exe without UI with Local System Account

=======================================================

 

1.   Download Microsoft PSEXEC:

http://technet.microsoft.com/en-us/sysinternals/bb897553

 

2.  Save it to “C:\tools\psexec.exe”.

 

3.  Run “PSEXEC -s cmd.exe”, it will open a command prompt under “Local System Account” which will not be impacted by antivirus.

 

4.  In the extract folder, run “Update.exe /Quiet /Norestart”

 

Update.exe now didn’t crash, and the error in setup log gives clue about some files missing in “C:\windows$hf_mig$\”

 

 

Root Cause

====================

For all the servers, we found most of the hotfix migration files missing.

 

1.  Before we found this problem, the system had many hotfixes installed, including below hotfixes.

KB950974, KB952004, KB956572,…

 

If we review the documents of these hotfixes, we will found that: They’re newer than KB934016, and they update some of the files which have been included in KB934016.

 

2.  When we installed those hotfixes, system put some “migration files” to “C:\windows$hf_mig$\KBxxxxxxx” folder.

Some times later, these folders was cleaned up by someone.

 

3.  When we install KB934016, it review the system file versions and found those hotfixes. It will try to call the “migration files” before it started the installation. But those “migration files” are missing.

 

Solution
=========
We recovered the files to $hf_mig$ and verified they include the migration files of those 7 hotfixes.  
KB950974, KB952004, KB956572,….. 
If we can’t find the necessary files from good servers, we can use this command to extract the files. (For example, download KB950974 and run ) 
KB956572.exe /x 
It will help to extract the hotfix files from the folder which you selected. 
 
Regards,
 
Freist Li from APGC DSI Team

 

Watch PandoDaily Founder Sarah Lacy Interview Silicon Valley Legend John Doerr

IT is with great pleasure that we bring BizSpark members a live stream of PandoDaily CEO Sarah Lacy ‘s interview with living legend John Doerr tonight. These always turn out to be great conversations and Microsoft BizSpark fully recommends joining the …read more…(read more)