Quantcast
Channel: psappdeploytoolkit Discussions Rss Feed
Viewing all articles
Browse latest Browse all 1769

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

$
0
0
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}

Viewing all articles
Browse latest Browse all 1769

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>