views:

351

answers:

1

Problem: After uninstalling a replacement GINA I get logged off immediately after logging on if I use the WIX 3.0 installer.

I have a replacement login process (GINA) for windows XP. It consists of a single file placed in the system directory C:\windows\system32\NewGina.dll and a registry entry (HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WindowsNT\CurrentVersion\Winlogon\GinaDLL=NewGina.dll) and I have no trouble manually installing it, running it, manually uninstalling it and logging in normally.

I can also create an installer using the Microsoft installer package in VS2008 and install, login, uninstall, login still works properly.

The problem I have is when I use the Wix installer, and I install, login, uninstall, and login, I get logged out immediately after login. After immediate logout, I was able to connect a remote regedit and dump the registry. I tried diffing before and after registries and I tried process monitor hoping to discover what the Wix installer was doing but the actions and changes (about 35,000) were a bit extensive to analyze. The registry line (listed above) was gone and windows should revert to the original msgina.dll

Since the rest of the project uses the Wix Installer, I'm hoping to use it.

Any ideas on how to get this to work and avoid the auto logoff?

Thanks

APB

My Wix script looks like

<Package InstallerVersion="200" Compressed="yes" />

<Condition Message="This application is only supported on Windows XP">
  <![CDATA[(VersionNT = 501)]]>
</Condition>

<InstallExecuteSequence>
  <ScheduleReboot After="InstallFinalize"/>
</InstallExecuteSequence>

<Media Id="1" Cabinet="NewGina.cab" EmbedCab="yes" />

<Directory Id="TARGETDIR" Name="SourceDir">
  <Directory Id="SystemFolder">
    <Component Id="NewGina" Guid="cdbdfbe9-8137-4305-98cb-a05618ea0ade" > 
      <File Source="..\NewGina\Release\NewGina.dll" Checksum="yes" />     
    </Component>
    <Component Id="RegistryEntries" Guid="cdbdfbe9-8137-4305-98cb-a05618ea0adf" >
      <RegistryKey Root="HKLM" Key="SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" Action="createAndRemoveOnUninstall">
        <RegistryValue Type="string" Name="GinaDLL" Value="NewGina.dll" />
      </RegistryKey>
    </Component>
  </Directory>
</Directory>

<Feature Id="NewGina" Title="NewGina" Level="1" >
  <ComponentRef Id="NewGina" />
  <ComponentRef Id="RegistryEntries" />
</Feature>

+1  A: 

This line is a little disturbing:

<RegistryKey Root="HKLM" Key="SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" Action="createAndRemoveOnUninstall">

If my memory serves correctly that says create the Winlogon key during install (probably a noop) then remove the entire Winlogon key during uninstall. In you dump can you see if that registry key exists any longer? If my memory is correct, it might be all gone.

The correct authoring in any case, would be to just remove the RegistryKey/@Action attribute. You just want the RegistryValue installed and uninstalled. No special actions necessary.

Rob Mensching
Thanks - You are correct.Removing Action="createAndRemoveOnUninstall" solved the problem