Table of Contents

Windows Live Messenger

Pls note: This installation script do not include any kind of configuration of Windows Life Messenger. If needed, install it on a textcomputer first, configure it and export the registry-entries from the registry. Then import these entries in the script or do an import by the script after installing Windows Life Messenger.

Tested with opsi 4.0.1
requiredWinstVersion >= 4.10.8.6
Files can be downloaded at Microsoft

By Thomas_H 2012/10/04 11:35

[b]Tree:[/b]

CLIENT_DATA
 ├ delsub.ins
 ├ setup.ins
 ├ uninstall.ins
 ├ windowslivemessengerW7.jpg
 ├ windowslivemessengerXP.jpg
 ├ winessentials2012-all.exe
 └ wlsetup-all8117.exe

* For the jpg look here

  1. Download the actual Windows Life Messenger-Version for Windows XP and/or Win7 from Microsoft
  2. Copy to CLIENT_DATA

optional:

  1. Install Windows Life Messenger on a test-system
  2. Configure Windows Life Messenger as you like (especially the language!)
  3. Close Windows Life Messenger
  4. extract the Windows Life Messenger-Settings from the registry to a <filename>.reg
  5. copy the reg-file to the CLIENT_DATA-folder, too

setup.ins

; Copyright (c) uib gmbh (www.uib.de)
; This sourcecode is owned by uib
; and published under the Terms of the General Public License.
; credits: http://www.opsi.org/credits/
; modified by Thomas_H
 
[Initial]
SetLogLevel=9
;  Log Errors in Logfile but don't abort:
ExitOnError=false
; Show syntax errors in the script:
ScriptErrorMessages=on
; Dont trace step by step through the script:
TraceMode=off
; let started programs run in front of the winst window
StayOnTop=false
 
 
[Actions]
requiredWinstVersion >= "4.10.8.6"
 
DefVar $LogDir$
DefVar $ProductId$
DefVar $MinimumSpace$
DefVar $InstallDir32$
DefVar $InstallDir64$
DefVar $ExitCode$
DefVar $LicenseRequired$
DefVar $LicenseKey$
DefVar $LicensePool$
DefVar $INST_SystemType$
DefVar $INST_architecture$
DefVar $Version$
DefVar $Inst_CmdXP$
DefVar $Inst_CmdW7$
DefVar $Inst_PrgXP$
DefVar $Inst_PrgW7$
DefVar $Uninst_CmdXP$
DefVar $Uninst_CmdW7$
DefVar $Uninst_PrgXP$
DefVar $Uninst_PrgW7$
DefVar $Uninst_Prg$
DefVar $BitmapXP$
DefVar $BitmapW7$
DefVar $NTVersioninfo$
 
Set $INST_SystemType$ = GetSystemType
set $INST_architecture$ = GetProductProperty("install_architecture","system specific")
 
 
Set $LogDir$ = "%SystemDrive%\tmp"
 
; ----------------------------------------------------------------
; - Please edit the following values                             -
; ----------------------------------------------------------------
;$ProductId$ should be the name of the product in opsi
; therefore please: only lower letters, no umlauts,
; no white space use '-' as a seperator
Set $ProductId$       = "Windows Live Messenger"
Set $Version$         = "2012"
Set $MinimumSpace$    = "150 MB"
; the path were we find the product after the installation
Set $InstallDir32$      = "%ProgramFiles32Dir%\Windows Live\Messenger\"
Set $InstallDir64$      = "%ProgramFiles64Dir%\Windows Live\Messenger\"
Set $LicenseRequired$ = "false"
Set $LicensePool$     = "p_" + $ProductId$
Set $Inst_PrgXP$      = "wlsetup-all8117.exe"
Set $Inst_PrgW7$      = "winessentials2012-all.exe"
Set $Uninst_PrgXP$      = "%System%\MsiExec.exe"
Set $Uninst_PrgW7$      = "$InstallDir32$\Windows Live\Installer\wlarp.exe"
Set $Inst_CmdXP$        = '/q /NOToolbarCEIP /NOhomepage /nolaunch /nosearch /AppSelect:Messenger /silent'
Set $Uninst_CmdXP$      = '/X{AED2DD42-9853-407E-A6BC-8A1D6B715909} /qn'
Set $Inst_CmdW7$        = '/q /NOToolbarCEIP /NOhomepage /nolaunch /nosearch /AppSelect:Messenger /silent'
Set $Uninst_CmdW7$      = ''
Set $BitmapXP$          = "windowslivemessengerXP.jpg"
set $BitmapW7$          = "windowslivemessengerW7.jpg"
Set $NTVersioninfo$     = GetMsVersionInfo
; ----------------------------------------------------------------
 
if not(HasMinimumSpace ("%SystemDrive%", $MinimumSpace$))
        LogError "Not enough space on %SystemDrive%, " + $MinimumSpace$ + " on drive %SystemDrive% needed for " + $ProductId$
        isFatalError
        ; Stop process and set installation status to failed
else
 
        if FileExists("$InstallDir32$")
                comment "Start uninstall sub section"
                Sub "%ScriptPath%\delsub.ins"
        endif
        if FileExists("$InstallDirW7$$Uninst_PrgW7")
                comment "Start uninstall sub section"
                Sub "%ScriptPath%\delsub.ins"
        endif
 
        if $LicenseRequired$ = "true"
                comment "Licensing required, reserve license and get license key"
                Sub_get_licensekey
        endif
 
        comment "Installiere "+$ProductID$+"..."
 
        if ( $NTVersioninfo$ = "5.1" )
                comment "Show product picture"
                ShowBitmap "%ScriptPath%\" + $BitmapXP$ $ProductId$
                Message "Installiere " + $ProductId$+" (32 Bit)"
                comment "Start setup program"
                Winbatch_install_32
                Sub_check_exitcode
        endif
 
        if ( $NTVersioninfo$ >= "6" )
                comment "Show product picture"
                ShowBitmap "%ScriptPath%\" + $BitmapW7$ $ProductId$
                Message "Installiere " + $ProductId$+" (64 Bit)"
                comment "Start setup program"
                Winbatch_install_64
                Sub_check_exitcode
        endif
 
endif

uninstall.ins

; Copyright (c) uib gmbh (www.uib.de)
; This sourcecode is owned by uib gmbh
; and published under the Terms of the General Public License.
; credits: http://www.opsi.org/credits/
; modified by Thomas_H
 
[Initial]
LogLevel=9
;  Log Errors in Logfile but don't abort:
ExitOnError=false
; Show syntax errors in the script:
ScriptErrorMessages=on
; Dont trace step by step through the script:
TraceMode=off
; let started programs run in front of the winst window
StayOnTop=false
 
[Actions]
requiredWinstVersion >= "4.10.8.6"
 
DefVar $UninstallProgramXP$
DefVar $LogDir$
DefVar $ExitCode$
DefVar $ProductId$
DefVar $InstallDir32$
DefVar $InstallDir64$
DefVar $LicenseRequired$
DefVar $LicensePool$
DefVar $INST_SystemType$
DefVar $INST_architecture$
DefVar $Uninst_CmdXP$
DefVar $Uninst_CmdW7$
DefVar $Uninst_PrgXP$
DefVar $Uninst_PrgW7$
DefVar $BitmapXP$
DefVar $BitmapW7$
DefVar $NTVersioninfo$
 
Set $INST_SystemType$ = GetSystemType
set $INST_architecture$ = GetProductProperty("install_architecture","system specific")
 
 
Set $LogDir$ = "%SystemDrive%\tmp"
 
; ----------------------------------------------------------------
; - Please edit the following values                             -
; ----------------------------------------------------------------
;$ProductId$ should be the name of the product in opsi
; therefore please: only lower letters, no umlauts,
; no white space use '-' as a seperator
Set $ProductId$         = "Windows Live Messenger"
Set $InstallDir32$      = "%ProgramFiles32Dir%\Windows Live\Messenger\"
Set $InstallDir64$      = "%ProgramFiles64Dir%\Windows Live\Messenger\"
Set $LicenseRequired$ = "false"
Set $LicensePool$     = "p_" + $ProductId$
Set $Uninst_PrgXP$      = "%System%\MsiExec.exe"
Set $Uninst_PrgW7$      = "$InstallDir32$\Windows Live\Installer\wlarp.exe"
Set $Uninst_CmdXP$      = '/X{AED2DD42-9853-407E-A6BC-8A1D6B715909} /qn'
Set $Uninst_CmdW7$      = '/cleanup:all /q'
Set $BitmapXP$          = "windowslivemessengerXP.jpg"
set $BitmapW7$          = "windowslivemessengerW7.jpg"
Set $NTVersioninfo$     = GetMsVersionInfo
; ----------------------------------------------------------------
 
    if ( $NTVersioninfo$ = "5.1" )
            comment "Show product picture"
            ShowBitmap "%ScriptPath%\" + $BitmapXP$ $ProductId$
 
            Message "Deinstalliere " + $ProductId$ + ". Bitte etwas Geduld..."
            comment "Start uninstall sub section"
            Sub "%ScriptPath%\delsub.ins"
 
            if $LicenseRequired$ = "true"
                comment "Licensing required, free license used"
                Sub_free_license
            endif
    endif
 
    if ( $NTVersioninfo$ >= "6" )
            comment "Show product picture"
            ShowBitmap "%ScriptPath%\" + $BitmapW7$ $ProductId$
            Message "Deinstalliere " + $ProductId$ + ". Bitte etwas Geduld..."
            comment "Start uninstall sub section"
            Sub "%ScriptPath%\delsub.ins"
 
            if $LicenseRequired$ = "true"
                comment "Licensing required, free license used"
                Sub_free_license
            endif
    endif

delsub.ins

; Copyright (c) uib gmbh (www.uib.de)
; This sourcecode is owned by uib gmbh
; and published under the Terms of the General Public License.
; credits: http://www.opsi.org/credits/
; modified by Thomas_H
 
 
if ( $NTVersioninfo$ = "5.1" )
        Message "Uninstalling " + $ProductId$ + " 32 Bit..."
        Winbatch_uninstall_XP
        comment "Removing "+$InstallDir32$
        Files_uninstall_XP
        sub_check_exitcode
Mendif
 
if ( $NTVersioninfo$ >= "6" )
        Message "Uninstalling " + $ProductId$ + " 64 Bit..."
        Winbatch_uninstall_W7
        comment "Removing "+$InstallDir64$
        Files_uninstall_W7
        sub_check_exitcode
endif
 
 
[Winbatch_uninstall_XP]
$Uninst_PrgXP$ $Uninst_CmdXP$
 
[Winbatch_uninstall_W7]
$Uninst_PrgW7$ $Uninst_CmdW7$
 
[Files_uninstall_XP]
delete -sf "$InstallDir32$\"
 
[Files_uninstall_W7]
delete -sf "$InstallDir64$\"
 
[Sub_check_exitcode]
comment "Test for installation success via exit code"
set $ExitCode$ = getLastExitCode
; informations to exit codes see
; http://msdn.microsoft.com/en-us/library/aa372835(VS.85).aspx
; http://msdn.microsoft.com/en-us/library/aa368542.aspx
if ($ExitCode$ = "0")
        comment "Looks good: setup program gives exitcode zero"
else
        comment "Setup program gives a exitcode unequal zero: " + $ExitCode$
        if ($ExitCode$ = "1605")
                comment "ERROR_UNKNOWN_PRODUCT  1605    This action is only valid for products that are currently installed."
                comment "Uninstall of a not installed product failed - no problem"
        else
                if ($ExitCode$ = "1641")
                        comment "looks good: setup program gives exitcode 1641"
                        comment "ERROR_SUCCESS_REBOOT_INITIATED 1641    The installer has initiated a restart. This message is indicative of a success."
                else
                        if ($ExitCode$ = "3010")
                                comment "looks good: setup program gives exitcode 3010"
                                comment "ERROR_SUCCESS_REBOOT_REQUIRED  3010    A restart is required to complete the install. This message is indicative of a success."
                        else
                                logError "Fatal: Setup program gives an unknown exitcode unequal zero: " + $ExitCode$
                                isFatalError
                        endif
                endif
        endif
endif