Yearly Archives: 2007

Feliz Ano Novo!!!

Ok, este ser√° meu √ļltimo post de 2007. At√© 2008!


Desejo um excelente ano a todos meus leitores. Que consigamos atingir todas nossas metas e até mesmo superá-las no ano vindouro, além de nos mantermos atualizados nas tecnologias que são lançadas a todo momento.


S√≥ para n√£o perder o h√°bito… [H] Aqui voc√™s encontram o Language Pack do SP1 do Visio 2007! Havia esquecido de incluir ele no post anterior: http://www.microsoft.com/downloads/details.aspx?familyid=b109187e-6fee-48b7-b822-9d9143a2891a&displaylang=en&tm


Agora, abaixo seguem uns links do ano novo:


1. Reveillon 2007 Ilha Bela, Fogos de artifício, Fad Garcia


2. Fogo de artificio, espectacular, pyrocantanhede


3. Japanese fireworks!!! 2


4. sydney fireworks
Superb Top Floor View: Sydney New Years Eve 06/07 Fireworks


5. Royal Fireworks part 1
√Äqueles que quiserem assistir mais algumas apresenta√ß√Ķes



6. Festival Piromusicado, Fogos de artifício, Fad Garcia


7. Nago Okinawa Japan Hanabi Taikai


8. Nagaoka Hanabi (Fireworks) 2006, ‚ÄúPhoenix‚ÄĚ (Japan)


9. Japanese fireworks„ÄÄHANABI

Microsoft Office SharePoint Designer 2007 Service Pack 1 (SP1)

Quem usa o SharePoint Designer 2007 já pode instalar o SP1 dele. Não percam tempo, pois ele melhora em muito a estabilidade e performance do produto, além de trazer melhorias de segurança.


http://www.microsoft.com/downloads/details.aspx?familyid=b57c805d-2821-4625-a6f1-80725267f887&displaylang=en&tm

December 2007 Security Releases ISO Image

Voc√™ gostaria de obter todas atualiza√ß√Ķes de seguran√ßa em uma forma que possa usar em seus clientes, pois fa√ßa o download desta ISO de DVD, que ter√° isso:


http://www.microsoft.com/downloads/details.aspx?familyid=450fffce-9b87-411c-8147-c17f33590f96&displaylang=en&tm

Exchange Server e Lotus Notes

Voc√™ usa os dois em sua empresa? Certo, ent√£o aqui seguem uns links para download muito √ļteis para seu caso:


Exchange 2003 Connector para Lotus Notes: http://www.microsoft.com/downloads/details.aspx?familyid=d9f3a35e-1046-47b5-b09b-bda9de60cd9d&displaylang=en&tm


Exchange 2003 Calendar Connector para Lotus Notes: http://www.microsoft.com/downloads/details.aspx?familyid=c14932a1-55f4-4256-af7e-617639d46024&displaylang=en&tm


 

Checklist de férias e feriado

Achei interessante postar aqui uma pequena check list para ser utilizado antes de nossas férias e dos feriados prolongados, para evitar transtornos no retorno:


  1. Rejeite ou transfira compromissos de seu calendário que estejam no período em que estará ausente. Parece óbvio, mas se não nos lembrarmos de fazer isto, sempre haverá alguém para reclamar;
  2. Atualize a mensagem de sua secret√°ria eletr√īnica, pois o assim que poss√≠vel entraremos em contato n√£o combinar√° com o per√≠odo de aus√™ncia. Use algo no estilo: Estarei impossibilitado de retornar sua liga√ß√£o at√© 31/01/2008. Se precisar de uma resposta urgente, favor entrar em contato com Igor, atrav√©s do celular 9999-9999;
  3. Certifique-se que n√£o exceder√° o tamanho de sua Caixa de Mensagens. Claro, mesmo avisando previamente que estar√° fora, seus amigos continuar√£o enviando aquelas mensagens pesadas, cheias de fotos e apresenta√ß√Ķes. Sim, se alguma delas voltar por falta de espa√ßo, provavelmente nada se perder√°, mas e se a que voltar for de um cliente? Certifique-se de que isto n√£o ocorrer√° esvaziando sua caixa, ativando filtros por tipos de anexos ou aumentando o tamanho dela;
  4. Bloqueie o seu calend√°rio. A cada dia, mais e mais pessoas compartilham seus calend√°rios com colegas de trabalho, permitindo que eles agendem reuni√Ķes. Pois de nada ter√° adiantada o passo 1, se algum colega agendar algo para voc√™, portanto, bloqueie sua agenda;
  5. Garanta que sua senha n√£o ir√° expirar neste per√≠odo. Se estiver em d√ļvida sobre quanto tempo ainda falta para ela expirar, altere-a hoje mesmo. Sim, desta vez √© interessante anot√°-la e guard√°-la em um local seguro. N√£o, n√£o pode deixar na sua gaveta na empresa. De prefer√™ncia, nme no pr√©dio dela. Desta forma, n√£o ter√° esquecido dela na volta, nem ela ser√° encontrada por pessoas que n√£o deveriam conhec√™-la;
  6. Se você usa o SharePoint e possui algum arquivo que fez check-out dele, lembre-se de fazer o check-in, senão ninguém mais poderá trabalhar nele enquanto estiver fora e isto pode gerar um transtorno bem grande;
  7. Proteja seu notebook. Se não vai levá-lo, coloque-o em um lugar seguro, para que não seja acessado por pessoas não autorizadas. Claro que se usa o Windows Vista e possui o BitLocker ativo, esta é uma preocupação a menos;
  8. Ative o assistente Fora do Escritório do Outlook, assim mensagens automáticas serão enviadas para as pessoas, orientando-as sobre como proceder. Para fazer isto vá em: Ferramentas РAssistente de ausência temporária.

Agora, bom feriado ou boas férias!

Acronis Disk Director Suite x Partition Magic

Certo, n√£o fiz propriamento um teste comparativo entre os dois produtos, mas me surpreendi com o Acronis ent√£o desejei postar aqui.


Alguns dias atr√°s redimensionei um disco com o Partition Magic. Para alterar o tamanho de duas parti√ß√Ķes e mov√™-las ele levou quase 3 minutos.


Hoje, precisei repetir o processo em outra m√°quina com as mesmas especifica√ß√Ķes de hardware, mas como estava sem o Partition Magic e possuia um Acronis Disk Director, decidi usar ele.


Qual n√£o foi minha surpresa. Ele realizou o processo inteiro em menos de 30 segundos! Sim, isso mesmo. 30 segundos!


Nem acreditei e fui testar. Rebootei e tudo estava perfeito. Realmente ele se mostrou MUITO superior, na minha opini√£o.


De agora em diante, nunca mais usarei o Partition Magic, apenas o Acronis Disk Director.


Eu recomendo este!

A Hobby Mark, could you let uncle SAM know please, he thinks it’s profitable business and taxes me

This morning I read Mark’s diatribe on why you have to be a major msp player or you don’t deserve to exist, OK maybe I paraphrased it a bit. While I was trying to come up with a catching comeback to defend myself and the downtrodden SPF’s of the world, as Vlad likes to refer […]

Production Virtualization for SMB

I’m a big fan of virtualization. Most of you know that. But you probably don’t know that we use SBS + SCVMM together very successfully around here.



Recently I wrote a post over on Microsoft Canada’s TechNet IT Pro blog about Production Virtualization for SMB – SC-VMM, Server 2008 and Virtual Server 2005 R2 SP1.



When I show people how cool SCVMM is, the first thing I hear is about how expensive it must be. It’s not. Microsoft is coming out with a SMB version in the new year which they are calling “Workgroup Edition”. That allows you to manage 5 hosts and as many guests as you like, for about $100 a physical box. Great value for the money when you consider the centralized management and great visualization. Never mind the VM checkpoints which makes patch management much easier to manage.



So check out the post. And then give SCVMM a try. You might be pleasantly surprised how well it works in the SMB space.


Exciting Content for the 1st Meeting of 2008

Turns out that my IT Pro Groups first meeting in 2008 falls on 1/1/2008 and not only do we have a great dual presentation lined up by Chuck Traywick on Virtualization and Sharepoint 3.0, the one and only Eric Ligman is going to be breaking some important news for us to discuss as well.
Let me share the […]

The Vista bugs that bug me the most

Vista has had some pretty bad press this year, some people blame Microsoft for initially overhyping but eventually poorly marketing the OS, some blame the “I’m a Mac” commercials, and some blame the security features. As for me, I just find it to be too rough around the edges.
While I am often tempted to ditch […]

Disable UAC Prompt for a Single Application

A useful KB (946932) just got posted on support.microsoft.com. It describes how to disable the User Account Control (UAC) prompt for a specific application, without disabling it for the machine as a whole. Now THAT’s useful. There’s no way I’m ever going to run with UAC off. But there are definitely a couple of applications where I find the UAC prompt really annoying, since I use them pretty often.


BTW, there’s another way I like to use as well. I open a PowerShell window, as administrator, at the beginning of every session. I have my Profile.ps1 set to change the background colour to a dark red whenever I’m running from an elevated prompt, just so I don’t use it unintentionally, and I have aliases set up in PowerShell to start some key applications that I know need elevation. Since I’m already elevated, I don’t get prompted again. :)


Here’s the code for my prompt and window colours, if you’re interested:


if ($p.IsInRole([System.Security.Principal.WindowsBuiltInRole]::Administrator) -and ( $build -eq 6000 ))
{
$effectivename = “Administrator”
$host.UI.RawUI.Backgroundcolor=”DarkRed”
clear-host
}else
{
$effectivename = $id.name
$host.UI.RawUI.Backgroundcolor=”White”
$host.UI.RawUI.Foregroundcolor=”DarkBlue”
clear-host
}


function prompt
{
    $host.ui.rawui.WindowTitle = ” [” + $HostName + “] (” + $effectivename + “)”
    if ( $effectivename -eq “Administrator” ) {
    write-host (“[“) -nonewline -foregroundcolor red
    write-host ($Hostname) -nonewline -foregroundcolor Magenta
    write-host (“]”) -nonewline -foregroundcolor Red
    Write-Host ([string]$(get-location) +”:”) -foregroundcolor Green
    write-host (“PS >” ) -nonewline -foregroundcolor White
    } else
    {
    write-host (“[“) -nonewline -foregroundcolor red
    write-host ($Hostname) -nonewline -foregroundcolor Magenta
    write-host (“]”) -nonewline -foregroundcolor Red
    Write-Host ([string]$(get-location) +”:”) -foregroundcolor DarkGreen
    write-host (“PS >” ) -nonewline -foregroundcolor DarkBlue
# write-host (” >” ) -nonewline -foregroundcolor White
    }
    return ” “
}


Charlie.

Publishing ISA Reports, they said it couldn’t be done

A while ago I wrote an article for my how to site about creating the ISA Report. I got a number of request for instructions on how to publish them and everyone I asked said it could not be done.
Well recently I got an e-mail from David Houston of Dame Computers with a link to […]

Como usar el TimeSpan?… ejemplo práctico con un Cronómetro…

Hummm…


El otro d√≠a jugando con un Cubo Rubik me quise tomar el tiempo de cuanto me demoraba, para esto sol√≠a usar el cron√≥metro del celular… jejeje… pero en un momento quise tener uno en mi portatil… encontr√© en internet unos instaladores, pero me propuse hacer uno yo mismo… jejeje nada del otro mundo.


Lo primero fue como sumar y restar Horas… para eso encontr√© el tipo de datos TimeSpan que me sirvi√≥ notablemente para esto.


Puedes descargar el ejemplo completo desde aqui —>> Download   CLAVE ZIP: msmvps.com/jvargas


Para comenzar cree un formulario windows con un label, dos botones y un control timer.


El formulario es el siguiente:



El label se llama lblTiempo, el boton “>” se llama btnIniciarPausar, el bot√≥n “O” se llama btnDetener y el timer se llama tmrTiempo.


Ahi les adjunto los eventos correspondientes..

    Dim FechaInicio As DateTime, _
        TiempoActivo As TimeSpan

    Private Sub btnIniciarPausar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnIniciarPausar.Click

        If btnIniciarPausar.Text = “||” Then
            ‘PAUSA
            btnIniciarPausar.Text = “>”
            tmrTiempo.Stop()
        Else
            ‘REINICIAR
            Dim FechaActiva As DateTime
            FechaActiva = lblTiempo.Text
            TiempoActivo = FechaActiva.TimeOfDay

            FechaInicio = Now
            btnDetener.Enabled = True
            btnIniciarPausar.Text = “||”
            tmrTiempo.Start()
        End If

    End Sub

    Private Sub btnDetener_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnDetener.Click
        btnDetener.Enabled = False
        btnIniciarPausar.Text = “>”
        lblTiempo.Text = “00:00:00.000″
        tmrTiempo.Stop()
    End Sub

    Private Sub tmrTiempo_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles tmrTiempo.Tick

        Dim Tiempo As TimeSpan

        Tiempo = Now.Subtract(FechaInicio).Duration
        Tiempo += TiempoActivo

        lblTiempo.Text = Microsoft.VisualBasic.Right(“00″ & Tiempo.Hours, 2) & “:” & _
                         Microsoft.VisualBasic.Right(“00″ & Tiempo.Minutes, 2) & “:” & _
                         Microsoft.VisualBasic.Right(“00″ & Tiempo.Seconds, 2) & “.” & _
                         Microsoft.VisualBasic.Right(“000″ & Tiempo.Milliseconds, 3)

        Me.Refresh()

    End Sub


Espero les sirva este ejemplo en el uso de TimeSpan al igual que Datetime.

Saludos,

Jhonny Vargas P.

BetaNews | Loss of HP puts end to Wal-Mart’s video download store

By Ed Oswald, BetaNews

December 28, 2007, 12:10 PM

The retailer decided to silently walk away from its planned video download service after HP ended its participation.

BetaNews | Loss of HP puts end to Wal-Mart’s video download store

 

Look, another video service going down and once your computer crash’s or you format, your videos are lost forever. Your stuck with multi-gig files (from backup) with no key to run it.

Windows Installer Xml 3.0 Extension for managed installers

The Windows Installer technology unfortunately lacks support for managed custom actions or the System.Configuration.Install.Installer class. Rob Mensching posted an article on his blog a while back why Microsoft considers custom action in general and managed custom action in particular a bad idea. While he makes some valid points (some technical and some strategic), I think managed custom installers are not a bad thing:

  • While they add a dependency on the .NET Framework at setup time, for applications using a windows service written in managed code, the Framework must be installed on the target computer at the setup time because Windows Installer will start the service during setup. And for all other managed applications you’ll need the framework right after the application has been installed (to run it). Since the Framework cannot be installed using a Merge module, it must be installed before the actual setup of the application.
  • I consider myself a fairly good software developer when it comes to managed code. But my C or C++ knowledge is minimum at best. So I can either write solid managed custom actions (where I have a well-tested BCL at hand) or¬†create¬†spooky and unreliable custom actions in C. I prefer the former option.
  • He mentions a problem with managed custom actions using different versions of the CLR. While this may be a problem, you’ll mostly write custom actions using .NET 2.0 these days. And .NET 3.0 and 3.5 both use the same CLR as 2.0.
  • What remains of his technical problems is the fact that Windows Installer on Windows 2003 will try to load the .NET Framework 1.1 into the deferred-custom action server when it tries to register assemblies into the Global Assembly Cache, which will fail if you force the .NET 2.0 runtime into the process with a managed custom action.
  • All those strategic reasons might be ok for the Windows Installer team, but I can’t wait a few years until the Windows Installer team bakes all the actions I need into the core of the product. And when they do, you’ll need Windows 2015 at the very least‚Ķ. Not an option.

Apparently, the Visual Studio Team doesn’t consider managed custom actions to be harmful – otherwise they wouldn’t give you the option to run managed installers in those Visual Studio deployment projects. But these installers do lack a serious feature: The Windows Installer context. It’s not that the installer context isn’t propagated to the runtime (You may have wondered what the IManagedInstaller interface is meant for :-) ).

Windows Installer Xml also doesn’t support managed custom actions out of the box. You have to do this yourself. One option is to decompile a Visual Studio Deployment project and see what Visual Studio does to call a¬†managed custom action. While this will certainly work, you’ll end up with a managed installer which has the same limitations as the Visual Studio deployment project: No access to the installer context. Additionally, these installer classes are always called as deferred custom actions. This means that they neither work in the immediate phase of the InstallExecuteSequence nor in the InstallUISequence.

Reinventing the wheel…

To call managed code in-process from the Windows Installer process, an intermediate unmanaged DLL must be called which in turn loads the .NET Framework into the process, spawns an AppDomain and finally runs the managed code inside this AppDomain. This is actually what the Visual Studio Deployment Project does.

The approach I’m using here is based on the article “WiX – Managed Custom Actions” by ForestWalk, which in turn is based on two other aricles: “Wrapping the Windows Installer 2.0 API” by Ian Marino and ¬†‚ÄúHosting the CLR within a custom action‚ÄĚ by Pablo M. Cibraro (aka Cibrax). The code in the article make it possible to call managed code in every part of the sequence. But the usage is not very intuitive to use, especially managed installer classes.

Since deferred custom actions can only access one property (CustomActionData), all information needed by be managed installer must be placed in this property. And since the CustomActionData is only an unstructured simple string property, some form of serialization is needed to put multiple properties into it.

To support all four methods of the managed installer class, you’ll have to create and sequence eight custom actions: For each of the four methods (Install, Commit, Rollback, Uninstall) one action for the parameters (CustomActionData) and one action to run it.

Multiple managed installers will seriously degrade the readability of your Windows Installer XML file. That’s why a took the code from the article and put it into a Windows Installer Xml Extension. I also created a small framework to simplify the development of managed installers.

Here is a simple example setup file:

    1 <?xmlversion=1.0encoding=UTF-8?>

    2 <Wixxmlns=http://schemas.microsoft.com/wix/2006/wi

    3     >

    4   <ProductId=4ed3ff4f-7b33-4915-9801-a0fdd5515647

    5     UpgradeCode=d4bacea3-a59a-4d44-b95b-1e144edfb88b

    6     Name=Acme Sample ApplicationLanguage=1033Version=1.0.0.0

    7     Manufacturer=Acme Software Ltd.

    8   >

    9     <PackageInstallerVersion=300Compressed=yes   />  

   10     <MediaId=1Cabinet=Sample.cabEmbedCab=yes />

   11     <DirectoryId=TARGETDIRName=SourceDirFileSource=.>

   12       <ComponentId=ProductComponentGuid=865018ca-dc6f-4987-9766-cffe792cb937>

   13         <FileId=f1Name=ManagedCustomAction.dllSource=IncludeManagedCustomAction.dll >

   14           <ManagedInstallerxmlns=http://schemas.infinitec.de/wix/MCAExtension>

   15             <ParameterName=TargetDir>[TARGETDIR]</Parameter>

   16             <ParameterName=AssemblyFile>Assembly is run from [#f1]</Parameter>

   17           </ManagedInstaller>

   18         </File>

   19       </Component>

   20     </Directory>

   21     <FeatureId=ProductFeatureTitle=Main FeatureLevel=1>

   22       <ComponentRefId=ProductComponent />

   23     </Feature>

   24     <UIRefId=WixUI_Minimal/>

   25     <BinaryId=ManagedCustomActionSourceFile=IncludeManagedCustomAction.dll />

   26     <ManagedCustomActionId=testBinaryKey=ManagedCustomActionType=ManagedCustomAction.CustomActionExecute=immediatexmlns=http://schemas.infinitec.de/wix/MCAExtension />

   27     <ManagedActionSequencexmlns=http://schemas.infinitec.de/wix/MCAExtension>

   28       <ManagedAction=testAfter=CostFinalizeSequenceTable=InstallUISequence />

   29     </ManagedActionSequence>

   30   </Product>

   31 </Wix>

Managed Installers

The extension makes it very easy to call managed installers or managed custom action.

Just put the tag ManagedInstaller into a File tag and the installer will be called during setup. If you need context information stored in other MSI properties, add a Parameter tag into the ManagedInstaller tag with an appropiate name and the value. From your managed installer, you can use the Parameters dictionary from the InstallContext class. Here is a sample implementation for the Install method of a System.Configuration.Install.Installer class:

    1 publicoverridevoid Install(IDictionary stateSaver)

    2 {

¬†¬†¬†¬†3¬†¬†¬†¬† string targetDir = Context.Parameters[“TargetDir”];

    4 

¬†¬†¬†¬†5¬†¬†¬†¬† for (int i = 3 – 1; i >= 0; i–)

    6     {

¬†¬†¬†¬†7¬†¬†¬†¬† ¬†¬†¬† InstallerContext.Current.StartAction(“ManagedCustomAction”, string.Format(“Install: Waiting {0} seconds…”, i), “”);

    8         Thread.Sleep(1000);

    9     }

   10     base.Install(stateSaver);

   11 }

In line 5, the property TargetDir is accessed. This property contains the value as specified in line 15 of the Windows Installer XML file. But far more interesting are the lines 7 and 11: These lines access the Windows Installer process and report details about what the custom action is doing. The two function wrap two flavors of the MsiProcessRecord function. The StartAction method reports the start of a major action (such as “Copying files” or “Creating registry values”). Additionally, a format string for details is specified, in this case “Waiting [1] more seconds”). The ReportDetails now just take the replacement values for the format string, in this case the number of seconds remaining).

Another important method of the InstallerContext class is the LogMessage method which¬†writes¬†directly to¬†the¬†Windows Installer log. Note that¬†you don’t¬†have to¬†use this method to log data.¬†You can also use InstallContext.LogMessage or Trace.WriteLine or Console.WriteLine.¬†The output of all those methods is captured and written to the log.

All unhandled exceptions from an Installer class are catched by the framework and cause an error message to be displayed. Unhandled exceptions in the Install, Commit and Rollback methods cause the installation to be aborted. If an exception occurs in the Uninstall method, an error dialog is displayed, but the uninstall will continue.

The four methods are sequence in the InstallExecuteSequence at the following positions:

  • Install, Commit, Rollback: Before InstallServices

  • Uninstall: Before UnpublishComponents

The installer will only be invoked if the component the file is associated with is installed.

Managed custom actions

To run a managed custom action, two things have to be done: Create a ManagedCustomAction tag under the Product tag and fill in the blanks:

  • Id: The name of the custom action
  • BinaryKey: If you want to run the custom action in the immediate sequence or in the InstallUISequence table, add the assembly to the binary table (via the Binary tag) and enter its key here.
  • FileKey: If you want to run this custom in the deferred sequence, add the assembly to the file table (via the File tag) and enter its key here.
  • Type: Name full qualified name of the type you want to run (Namespace + type name)
  • Execute: Either commit, deferred, firstSequence, immediate, oncePerProcess, rollback or secondSequence. These are the same options you have with normal Custom actions (Cutom tag)
  • Impersonate: Yes to run the custom action in the security context of the logged on user. False otherwise. The default is true. Only valid for deferred custom actions.
  • Return: asyncNoWait, asyncWait, check or ignore. These are the same options you have with normal Custom actions (Cutom tag)

Unfortunately Windows Installer XML does not allow extensions in the sequence tables, so I had to create my own: ManagedActionSequence. Add a Managed tag for each custom action you want to schedule. The Managed tag has these attributes:

  • Action: The name of the managed custom action to run.
  • After: The name of the action the managed custom action should be executed after.
  • Before: The name of the action the managed custom action should be execute before.
  • Sequence: The absolute sequence where the managed custom action should run.
  • SequenceTable: The name of the sequence table where the managed custom action should be scheduled: Either InstallUISequence, InstallExecuteSequence, AdminUISequence, AdminExecuteSequence.

The managed custom action must be a class which implements the InfiniTec.Configuration.Install.ICustomAction interface, like in this example:

    1 publicclassCustomAction: ICustomAction

    2     {

    3         publicvoid Execute()

    4         {

¬†¬†¬†¬†5¬†¬†¬†¬† ¬†¬†¬† ¬†¬†¬† string targetDir = InstallerContext.Current.GetProperty(“TARGETDIR”);

    6 

¬†¬†¬†¬†7¬†¬†¬†¬† ¬†¬†¬† ¬†¬†¬† InstallerContext.Current.StartAction(“ManagedCustomAction”, “Running custom action…”, “Waiting [1] seconds…”);

¬†¬†¬†¬†8¬†¬†¬†¬† ¬†¬†¬† ¬†¬†¬† for (int i = 3 – 1; i >= 0; i–)

    9             {

   10                 InstallerContext.Current.ReportDetails(i.ToString());

   11                 Thread.Sleep(1000);

   12             }

   13 

   14 

   15         }

   16     }

This implementation has full access to the MSI properties (see line 5, if scheduled as immediate action) and of course access to the Installer log via InstallerContext.Current.LogMessage.

Other useful classes

Since the custom actions can be executed in the immediate sequence of the install process, it has full access to all properties and tables of the installer. The rows of a view can be accessed via the View class:

¬†¬†¬†¬†1¬†using (View view = InstallerContext.Current.OpenView(“SELECT * FROM Binary”))

    2 using (RecordCollection records = view.Execute())

    3 {

    4     foreach (Record record in records)

    5     {

    6         string name = record[1].GetString();

    7     }

    8 }

The view returns a RecordCollection which in turn provides access to it’s Record instances. Each record consists of one or more fields. Note that if you create a record with the Record.Create(int columnCount) method, the resulting record will have columnCount+1 fields – 0 to the specified value.

Modifications to the original source code

Apart from the newly added code, I made significant changes to the existing code:

To load the .NET runtime into the process I use the CLRHosting project from the article mentioned above. I have replaced all dangerous API calls (strcat, sprintf) with secure ones. But my C and C++ knowledge is VERY limited. I would appreciate it if someone with more knowledge could take a look at the code….

I have also made significant changes to the managed part of the solution. Mainly, I have encapsulated all unmanaged MSI handles in a custom SafeHandle class.

Open issues

  • Deferred custom actions with assemblies in the Binary table are not yet supported
  • Immediate custom actions with assemblies in the File table are not supported (And I don’t see how this could work)
  • Managed installers do not have an immediate part
  • Managed custom actions and managed installer classes don’t add ticks to the progress bar.
  • A much cleaner approach is to call the custom action in a separate process and provide access to the Windows Installer context via remoting. This approach is dicussed in more detail in the article A New Approach to Managed Custom Actions¬†by Christopher Painter. Unfortunately he didn’t release any source code and I’m lacking the necessary C and C++ skills right now.

Installation

Just copy the zip file to a directory and decompress it. In your WIX Project add a reference to the ManagedInstallerWixExtension.dll. In your setup file add the namespace http://schemas.infinitec.de/wix/MCAExtension to the list of namespace definitions.

Requirements

The extension is compiled against WIX 3.0.361 (build from December 21, 2007) using .NET 2.0.

License

The authors of the original articles haven’t lost a word about the license, so I assume it’s freely available. To keep this stuff freely available I publish this work under the Common Public License, the same license Windows Installer XML is published under.

Downloads

ManagedInstallerWixExtension.zip (637,678 Bytes)
Source files and binaries

New Year + New Laptop = Better Productivity?

Body:

I’ve spent some time between Christmas and New Years resting up and enjoying being with my family – in the background I’ve been building up my new laptop.¬† I decided before Christmas to take the plunge and buy myself a new laptop.¬† I settled on the Toshiba Portege R500 with the 64GB Solid State Disk.¬† This little beauty claims to have a 12 hour battery life – something I plan to test out.¬† It also weighs in at around 800grams – that’s about the same as a dozen eggs!

In the past, I’ve been used to purchasing big / heavy / grunty laptops so that I can run virtual machines on them whenever I want.¬† Now with the availability of high speed broadband over 3G and HSDPA, I’ve changed things around.¬† I now have a nice big HP Proliant ML350G5 at the data centre that I use to do my virtual machine work.¬† Combine that with the new laptop and I can be doing virtual machine demos from the beach if I really want to.¬† Ok so I’m loading up the new laptop and I thought I’d give you an idea of the suite of software that I consider to be mandatory for me on a day to day basis.

Windows Vista Business – well – it came with the laptop and I’ll probably upgrade it to Vista Ultimate later so I can get Bitlocker on the drive.

Vista Gadgets – Digital World Clock, Multi meter, Server Ping

Office 2007 Ultimate – this does everything I need and more (yes I know – I didn’t like the ribbon at first but I got over it)

Outlook 2007 with BCM 2007 – I use BCM to manage all my contact tracking, time tracking, opportunities, mail outs and the like.¬† It’s very cool indeed and it’s integration with the Office suite is very tight.

Visio Professional 2007 – for network diagrams, flow charts and the like

Sharepoint Designer 2007 – for the work I do with Sharepoint v2.0 and V3.0

FrontPage 2003 – even with SPD 2007 above, I still find that there are things I can do faster in FrontPage with the FrontPage Server support that I’ve not been able to do in SPD 2007.

Trend CSM 3.6 Client – to protect me from the bad stuff out there.

Windows Home Server Connector – ensures my laptop is backed up each night when I’m at home

StorageCraft Shadow Protect – ensures my laptop is backed up to a portable USB hard drive when I’m travelling.

Adobe 8.0 Professional РI use this to PDF the writing work that I do, and to produce training manuals and the like.  Yes there are cheaper alternatives out there, but to be honest, this is one area where I would like to go with the flow and use the original product.

Skype 3.5 – my main Australian and USA phone numbers come to be via Skype – it allows me to redirect to my mobile when I’m offline and gives me huge flexibility when I travel.

Windows Live Writer – which I use to do these blog posts.¬† It’s nice and simple and I love its simplicity.¬† I used Word 2007 to do this before, but live writer is simpler and faster than word.

Windows Mobile Device Center – to connect my Windows Mobile Devices up.

Windows Mobile Office 6.1 Upgrade – for the ultimate in flexibility and gives me the chance to review Office 2007 documents on my HTC TyTnII phone when I’m really on the go.

Colligo Contributor 2.2 – this is a real gem for me.¬† I use WSS 3.0 to store all my info for SBSfaq.com and this gives me easy access to my content offline.¬† Without this I don’t think it would be as easy for me as it now is to take this on the road.

Feedghost – my RSS reader of choice, allows me to quickly skim through the various tech and business feeds that I watch.

RoyalTS – allows me to group my RDP connections together in various groups and makes it dead easy to see which servers I have active connections to when I’ve logged into a number of sites at a time.

Techsmith Snagit 8 – gives me all the screen captures I need for the writing and documentation I am working on – a very nice tool indeed.

Techsmith Camtasia – I’m playing with this now and am planning to produce a number of informational videos on SBS Cougar and more advanced things in SBS 2003 R2.

VMWare Server Console – yes – I know – VMWare – well what can I say – it’s the only thing right now that I can run a 64 bit guest operating system on and I need to do that so I can test out SBS Cougar and the various bits of Windows Server 2008.

Live Messenger – just to stay in touch with everyone when on the go.¬† I’ve found that IM reduces my email chatter as it allows answers to quick questions faster than email chains.

Windows 2003 Admin Tools – from this I use the Remote Consoles application for some remote work as well as a number of the other Admin tools.

SQL 2005 Express Management Studio – to manage a few SQL instances on my laptop.

Firefox – I’ve found this works much better with the HP iLo remote management systems on the HP ML and DL100 servers than IE7 does.¬† It also allows me to test out web development work I’ve done with Firefox (even though only 12.5% of the people visiting my sites use it) for my sites.

ISO Recorder Рgreat lightweight tool that will turn a CD or DVD into an ISO very quickly.  I save these to an external USB hard drive to keep disk space under control on my laptop.

Slysoft VirtualCloneCD – mounts an ISO image as a virtual CD and allows me to install things on the laptop when I want.

 

That’s it for me.¬† I’m off to celebrate New Years with my family and a few close friends.¬† I hope that 2008 brings whatever you desire and that it’s not too hard to get those new Years Resolutions under control.

Drink responsibly and drive safe tonight.


Published: 31/12/2007 7:39 PM

New KB Articles At Microsoft 30 Dec 2007 – Weekly Summary

Internet Explorer 6.0 556050 SAP Help shows only empty sections or blank pages SQL Server 2005 946608 Cumulative update package 6 for SQL Server 2005 Service Pack 2 942680 FIX: The CREATE PROCEDURE statement…(read more

What’s new at Telerik

Telerik has announced the launch of its .NET component products. It contains RadControls “Prometheus” for ASP.NET, Silverlight 1.1 controls and enhancements to other .NET products.

Watch out Telerik’s Chief Technology Evangelist Todd Anglin’s WebCast at http://www.telerik.com/products/silverlight/overview.aspx

Do you want to learn Community Server, Why are you waiting. Buy my user friendly book today

http://www.amazon.com/exec/obidos/tg/detail/-/1847190871
http://www.amazon.co.uk/exec/obidos/ASIN/1847190871/

Advanced MooTree – Concept Proof

This is a sample I made for a recent project. The tree is based on Moro script with a few changes and a major improvement: a tools menu that enables add and remove actions directly on node.


Beside the tools menu its now possible to:


  • prevent a node from being dragged: drag:false
  • prevent a node from being a drop target: drop:false
  • prevent a node from being modified(keep structure intact): lock:true



The tools menu is render based in those flags:



  • if the node.parent is locked(lock:true) then the node is not electable for drag or for remove and the tools menu is empty
  • if the node is locked(lock:true) then isn't possible to add more nodes(either folder or file)

Remember this is just a concept proof, not a final release, but even so i believe it could be usefull.


MooTreeAdvanced.zip (67.92 kb)


kick it on DotNetKicks.com


Offline for 3 days; SiteAdvisor bug?; Happy New Year to All!

There’ll be no entry for 3 days.  I’ll be away for a New Year’s celebration.  Off to Hong Kong (that’s the plan since last week) in 2 more hours.

A HAPPY HAPPY NEW YEAR to ALL of you! If you are a Calendar of Updates visitor or member… here’s another New Year Message :) — Don’t worry… there’s no storm worm in my link ;)

BTW, There’s new version of McAfee SiteAdvisor.  Not sure the exact date it was released but the new version was released to fix a bug.  See calendar of updates entries here and here.

What happened:

Install SA for FF.  Install SA for IE.

Uninstall SA for IE only. Keep SA for FF.

Reboot the system.

The bug?  SiteAdvisor for Firefox has been removed even I did not remove it.  I kept it but the removal of SA for IE also removed the SA for FF.

So folks, if you removed SA for IE and noticed the SA for FF is gone… get it again at www.siteadvisor.com

If it’s not a bug then it means the uninstaller of SiteAdvisor will now REMOVE the program for whatever browser it is installed. 

Recent Comments

Archives

ÔĽŅ