This project is read-only.

Deployment Script: VLC player 2.1.5 (remove old version, install new version)

Topics: Archive - Deployment Scripts
Sep 4, 2014 at 9:40 PM
Probably need to change this to the portable version. As this version hijacks all your file extensions.

tries to remove the old version of VLC and removes all the shortcuts for VLC on the desktop

* PRE-INSTALLATION

If ($deploymentType -ne "uninstall") { $installPhase = "Pre-Installation"

*=============================================

# Show Progress Message (with the default message)
Show-InstallationProgress

$uninstall1=$envprogramfiles + '\VideoLAN\VLC\uninstall.exe'
$uninstall2=$envprogramfilesX86 + '\VideoLAN\VLC\uninstall.exe'Remove
$noicon1=$envallusersprofile + '\Desktop\VLC media player.lnk'
$noicon2=$envPublic + '\Desktop\VLC media player.lnk'

*===============================================

* INSTALLATION

$installPhase = "Installation"

*===============================================

 if (test-path -Path $uninstall1)
{execute-Process -filepath $uninstall1 -arguments '/S'}

if (test-path -path $uninstall2)
{execute-Process -filepath $uninstall2 -arguments '/S'}

sleep -seconds 20

execute-Process -filepath 'vlc-2.1.5-win32.exe' -arguments '/L=1033 /S' 

*===============================================

* POST-INSTALLATION

$installPhase = "Post-Installation"

*===============================================

# Perform post-installation tasks here

if (test-path -path $noicon1)
{remove-file -Path $noicon1}

if (test-path -path $noicon2)
{remove-file -Path $noicon2}

remove-file -path 'C:\Users\Public\Desktop\VLC media player.lnk' -erroraction SilentlyContinue

*===============================================

* PRE-UNINSTALLATION

} ElseIf ($deploymentType -eq "uninstall") { $installPhase = "Pre-Uninstallation"

*===============================================

*===============================================

* UNINSTALLATION

$installPhase = "Uninstallation"

*===============================================

if (test-path $uninstall1)
{execute-Process -filepath $uninstall1 -arguments '/S' -windowstyle Hidden}

if (test-path $uninstall2)
{execute-Process -filepath $uninstall2 -arguments '/S' -windowstyle Hidden}