Installation silencieuse de Firefox
Bonjour à toutes et à tous,
Je n'arrive pas à installer silencieusement Firefox.
Pour Firefox il suffit de préciser l'argument /S ou un fichier conf.ini
Voici mon bout de script :
Code:
1 2 3 4 5 6 7 8 9
| If ((Test-Path "conf.ini") -eq $true) {
If ((Test-Path "firefox31.2.0esr.exe") -eq $true) {
$setup = Start-Process "firefox31.2.0esr.exe" -ArgumentList "/INI=conf.ini" -Wait
If ($setup.ExitCode -eq 0) {
Write-Host "Installation terminée"
}
}
} |
en BATCH, ça fonctionne très bien avec
Code:
START /WAIT "TITLE Installation" "firefox31.2.0esr.exe" /INI="conf.ini"
Malheureusement avec PowerShell, une fenêtre UAC s'ouvre pour autoriser le programme "Firefox Installer"...
Je pense à un souci d'emplacement mais je ne sais pas comment vérifier cela... :roll:
Avez-vous une idée de mon problème ?
Merci d'avance
POWERSHELL Installer silencieusement n'importe quel logiciel sur Windows
#################################################################################
# Propos : Pour installer silencieusement n'importe quel logiciel sur Windows #
# Description: Placez le fichier csv et logiciels dans un partage #
# ou un support USB, faites des recherches pour vos applications #
# options silencieuses et ajoutez-les au fichier csv. #
#################################################################################
# Défini l'emplacement d'exécution
$PSScriptRoot
$softwares = import-csv "Install.csv" -Delimiter "," -Header 'Installer','Switch' | Select-Object Installer,Switch
foreach($software in $softwares){
$softexec = $software.Installer
$softexec = $softexec.ToString()
$pkgs = Get-ChildItem $path$softexec | Where-Object {$_.Name -eq $softexec}
foreach($pkg in $pkgs){
$ext = [System.IO.Path]::GetExtension($pkg)
$ext = $ext.ToLower()
$switch = $software.Switch
$switch = $switch.Tostring()
if($ext -eq ".msi"){
mkdir c:\Temp\Softwares -Force
Copy-Item "$path$softexec" -Recurse c:\Temp\Softwares -Force
Write-host "Installing $softexec silently, please wait...." -foregroundColor Yellow
Start-Process "c:\Temp\Softwares\$softexec" -ArgumentList "$switch" -wait
Remove-item "c:\temp\softwares\$softexec" -Recurse -Force
Write-host "Installation of $softexec completed" -foregroundColor Green
}
else{
mkdir c:\Temp\Softwares -Force
Copy-Item "$path$softexec" -Recurse c:\Temp\Softwares -Force
Write-host "Installing $softexec silently, please wait...." -foregroundColor Yellow
Start-Process "c:\Temp\Softwares\$softexec" -ArgumentList "$switch" -wait -NoNewWindow
Remove-item "c:\temp\softwares\$softexec" -Recurse -Force
Write-host "Installation of $softexec completed" -foregroundColor Green
}
}
}
Puis dan le fichier "Install.CSV" lister les logiciels que vous voulez installer avec les switch
Installer,Switch
unchecky_setup.msi,/qn
Firefox Setup 90.0.2.msi,/qn
7z2103-x64.msi,/qn
vlc-3.0.16-win64.msi,/qn
pdfsam-4.2.6.msi,/qn
GoogleChromeStandaloneEnterprise64.msi,/qn
jre-8u301-windows-x64.exe,/s SPONSORS=0
Format_Factory_Setup5.7.1.0.exe,/S
KeePass-2.48.1-Setup.exe,/S
XnViewMP-win-x64.exe,/S
SumatraPDF-3.3-64-install.exe,/s
npp.8.1.2.Installer.x64.exe,/S
Les fichiers PS1, CSV et les setup doivent être dans les même dossier.
Voici les liens de téléchargement :
unchecky
https://unchecky.com/files/unchecky_setup.exe
7ZIP 7-Zip 19.00 21-02-2019
https://www.7-zip.org/download.html
WINRAR 602fr.exe 31 mars 2020
https://www.winrar-france.com/dwl-winrar
https://www.win-rar.com/fileadmin/wi...-x64-602fr.exe
https://sharewareonsale.com/s/glary-utilities-pro-sale
Adobe flash player: Version 32.0.0.371
fpdownload.macromedia.com/pub/flashplayer/latest/help/install_flash_player.exe
http://www.adobe.com/fr/products/fla...ribution3.html
adobe acrobat reader DC download offline:
ftp://ftp.adobe.com/pub/adobe/reader...00620042_fr_FR
Adobe shockwave:12.3.4.204
http://get.adobe.com/fr/shockwave/
PDF Creator:4.3.0
http://fr.pdfforge.org/download
http://download.pdfforge.org/downloa...table?download
PDFsam Basic 4.2.6
https://pdfsam.org/fr/download-pdfsam-basic/
Pdf-xchange-viewer 2.5.322.10
https://www.tracker-software.com/pro...oad?fileid=446
VLC: vlc-3.0.16
https://download.videolan.org/pub/videolan/vlc/last/
XnViewMP v0.98.4
https://www.xnview.com/fr/xnviewmp/
https://www.microsoft.com/fr-fr/edge/business/download
Mozilla:
https://www.mozilla.org/en-US/firefo...esktop-release
http://www.mozilla.org/en-US/firefox/all/ 90.0.1
https://www.mozilla.org/en-US/firefo...nizations/all/ 78.12
http://www.mozilla.org/en-US/thunderbird/all.html 78.12
https://ftp.mozilla.org/pub/firefox/releases/
https://ftp.mozilla.org/pub/thunderbird/
java Runtime:jre-8u301
https://www.java.com/fr/download/
Bonne Installation.