Jump to content

Script Office / Project / Visio 2013


Recommended Posts

Bonjour,

 

Aujourd'hui je suis motivé voilà ma seconde contribution.

Ce script permet le téléchargement et / ou l'installation d'office, visio, project 2013 automatiquement par rapport à l'architecture OS que vous avez.

 

Le zip contient tout ce qu'il vous faudra.

 

Je suis prenneur de vos remarques ou autres.

 

============================================================================

rem Script fait par Guillaume Jeanney ... faites vous plaisir.
@echo off
echo.
set curdir=%~dp0
if %processor_architecture%==AMD64 set archi=64
if %processor_architecture%==IA64 set archi=64
if %processor_architecture%==X86 set archi=32
echo Vous avez une version %archi% bits
goto %~n0
echo.
:OFFICE_VISIO_PROJECT
echo Creation du fichier de reponse
echo.
rem La suppression des guillemets non nécessaire se fera sur substitution"
echo substitution"<Configuration>substitution" > "%curdir%configuration.xml"
echo   substitution"<Add SourcePath="%curdir%" OfficeClientEdition="%archi%">substitution" >> "%curdir%configuration.xml"
echo    substitution"<Product ID="O365ProPlusRetail">substitution" >> "%curdir%configuration.xml"
echo      substitution"<Language ID="fr-fr"/>substitution" >> "%curdir%configuration.xml"
echo    substitution"</Product>substitution" >> "%curdir%configuration.xml"
echo    substitution"<Product ID="VisioProRetail">substitution" >> "%curdir%configuration.xml"
echo      substitution"<Language ID="fr-fr"/>substitution" >> "%curdir%configuration.xml"
echo    substitution"</Product>substitution" >> "%curdir%configuration.xml"
echo    substitution"<Product ID="ProjectProRetail">substitution" >> "%curdir%configuration.xml"
echo      substitution"<Language ID="fr-fr"/>substitution" >> "%curdir%configuration.xml"
echo    substitution"</Product>substitution" >> "%curdir%configuration.xml"
echo  substitution"</Add>substitution"   >> "%curdir%configuration.xml"
echo    substitution"<Updates Enabled="TRUE" UpdatePath="%curdir%Updates"/>substitution" >> "%curdir%configuration.xml"
echo    substitution"<Display Level="None" AcceptEULA="TRUE"/>substitution" >> "%curdir%configuration.xml"
echo    substitution"<Logging Name="OfficeSetup.txt" Path="%temp%"/>substitution" >> "%curdir%configuration.xml"
echo    substitution"<Property Name="AUTOACTIVATE" Value="1"/>substitution" >> "%curdir%configuration.xml"
echo substitution"</Configuration>substitution" >> "%curdir%configuration.xml"
goto SED

:OFFICE
echo Creation du fichier de reponse
echo.
rem La suppression des guillemets non nécessaire se fera sur substitution"
echo substitution"<Configuration>substitution" > "%curdir%configuration.xml"
echo   substitution"<Add SourcePath="%curdir%" OfficeClientEdition="%archi%">substitution" >> "%curdir%configuration.xml"
echo    substitution"<Product ID="O365ProPlusRetail">substitution" >> "%curdir%configuration.xml"
echo      substitution"<Language ID="fr-fr"/>substitution" >> "%curdir%configuration.xml"
echo    substitution"</Product>substitution" >> "%curdir%configuration.xml"
echo  substitution"</Add>substitution"   >> "%curdir%configuration.xml"
echo    substitution"<Updates Enabled="TRUE" UpdatePath="%curdir%Updates"/>substitution" >> "%curdir%configuration.xml"
echo    substitution"<Display Level="None" AcceptEULA="TRUE"/>substitution" >> "%curdir%configuration.xml"
echo    substitution"<Logging Name="OfficeSetup.txt" Path="%temp%"/>substitution" >> "%curdir%configuration.xml"
echo    substitution"<Property Name="AUTOACTIVATE" Value="1"/>substitution" >> "%curdir%configuration.xml"
echo substitution"</Configuration>substitution" >> "%curdir%configuration.xml"
goto SED

:VISIO
echo Creation du fichier de reponse
echo.
rem La suppression des guillemets non nécessaire se fera sur substitution"
echo substitution"<Configuration>substitution" > "%curdir%configuration.xml"
echo   substitution"<Add SourcePath="%curdir%" OfficeClientEdition="%archi%">substitution" >> "%curdir%configuration.xml"
echo    substitution"<Product ID="VisioProRetail">substitution" >> "%curdir%configuration.xml"
echo      substitution"<Language ID="fr-fr"/>substitution" >> "%curdir%configuration.xml"
echo    substitution"</Product>substitution" >> "%curdir%configuration.xml"
echo  substitution"</Add>substitution"   >> "%curdir%configuration.xml"
echo    substitution"<Updates Enabled="TRUE" UpdatePath="%curdir%Updates"/>substitution" >> "%curdir%configuration.xml"
echo    substitution"<Display Level="None" AcceptEULA="TRUE"/>substitution" >> "%curdir%configuration.xml"
echo    substitution"<Logging Name="OfficeSetup.txt" Path="%temp%"/>substitution" >> "%curdir%configuration.xml"
echo    substitution"<Property Name="AUTOACTIVATE" Value="1"/>substitution" >> "%curdir%configuration.xml"
echo substitution"</Configuration>substitution" >> "%curdir%configuration.xml"
goto SED

:PROJECT
echo Creation du fichier de reponse
echo.
rem La suppression des guillemets non nécessaire se fera sur substitution"
echo substitution"<Configuration>substitution" > "%curdir%configuration.xml"
echo   substitution"<Add SourcePath="%curdir%" OfficeClientEdition="%archi%">substitution" >> "%curdir%configuration.xml"
echo    substitution"<Product ID="ProjectProRetail">substitution" >> "%curdir%configuration.xml"
echo      substitution"<Language ID="fr-fr"/>substitution" >> "%curdir%configuration.xml"
echo    substitution"</Product>substitution" >> "%curdir%configuration.xml"
echo  substitution"</Add>substitution"   >> "%curdir%configuration.xml"
echo    substitution"<Updates Enabled="TRUE" UpdatePath="%curdir%Updates"/>substitution" >> "%curdir%configuration.xml"
echo    substitution"<Display Level="None" AcceptEULA="TRUE"/>substitution" >> "%curdir%configuration.xml"
echo    substitution"<Logging Name="OfficeSetup.txt" Path="%temp%"/>substitution" >> "%curdir%configuration.xml"
echo    substitution"<Property Name="AUTOACTIVATE" Value="1"/>substitution" >> "%curdir%configuration.xml"
echo substitution"</Configuration>substitution" >> "%curdir%configuration.xml"
goto SED

:SED
rem La suppression des guillemets non nécessaire se fera sur substitution"
"%curdir%sed\sed_win.exe" -i -b "s/substitution\"//g" "%curdir%configuration.xml"
del sed*

:DLINST
cls
echo.
set /p DLINST="(T)elechargement ou (I)nstallation ? : "
if %DLINST%==T (
set action=download
goto ACTION
)
if %DLINST%==I (
set action=configure
goto ACTION
)
if not %DLINST%==I goto DLINST
if not %DLINST%==T goto DLINST

:ACTION
"%curdir%setup.exe" /%action% "%curdir%configuration.xml"

OFFICE365.zip

Link to post
Share on other sites
  • 2 weeks later...
  • 2 months later...
×
×
  • Create New...