Batch Script AIO x86-x64 in ONE iso

Discussion in 'Scripting' started by TeamOS, Dec 31, 2014.

  1. TeamOS

    TeamOS MDL Guru

    May 27, 2013
    3,036
    1,739
    120
    I'm sure in that batch script i have alot fails i want

    @ECHO OFF
    for %%i in (C D E F G H I J K L M N O P Q R S T U V W X Y Z) do if exist %%i:\sources\install.wim set CDROM=%%i:
    if not defined CDROM goto :eof
    echo Detected CDROM as drive %CDROM%
    cd\

    Title Silent Installation by:WhiteDeath
    Color F0

    @echo ********** SOFTWARE ***********

    :Microsoft Office_Professional_Plus_2010_SP2_AIO_Greek

    echo Installing Microsoft Office_Professional_Plus_2010_SP2_AIO

    IF EXIST %SystemRoot%\SysWOW64 start /wait %CDROM%\WinReducerPI\officex64.exe
    IF NOT EXIST %SystemRoot%\SysWOW64 start /wait %CDROM%\WinReducerPI\officex86.exe

    :Microsoft Toolkit Activation Office

    echo Installing Microsoft Toolkit Activation

    IF EXIST %SystemRoot%\SysWOW64 start /wait %CDROM%\WinReducerPI\Microsoft Toolkit.exe" AutoKMS.exe /EZActivator
    IF NOT EXIST %SystemRoot%\SysWOW64 start /wait %CDROM%\WinReducerPI\Microsoft Toolkit.exe" AutoKMS.exe /EZActivator

    :Windows Loader Activation

    echo Installing Windows Loader Activation

    IF EXIST %SystemRoot%\SysWOW64 start /wait %CDROM%\WinReducerPI\Windows Loader.exe" /silent /preactivate >nul
    IF NOT EXIST %SystemRoot%\SysWOW64 start /wait % %CDROM%\WinReducerPI\Windows Loader.exe" /silent /preactivate >nul


    is possible tell me if that works for both or if is possible Show me how detect x86 or x64 when make first log on thanks!!!
     
  2. Compo

    Compo MDL Member

    Mar 29, 2011
    136
    106
    10
    #2 Compo, Jan 1, 2015
    Last edited by a moderator: Apr 20, 2017
    Code:
    @Echo Off
    SetLocal
    Rem Detecting Installation Drive
    For /F %%A In ('MountVol^|FindStr [C-Z]:\\') Do (
    If Exist %%Asources\install.wim (
    Pushd %%AWinReducerPI && Call :Installs))
    Exit/B
    
    :Installs
    Rem Setting OS Architecture Variable
    Set xNN=x%Processor_Architecture:~-2%
    If %xNN% Equ x86 (If Defined Processor_ArchiteW6432 Set xNN=x64)
    Rem Installing Office [Detected Architecture Version]
    Start /W  Office%xNN%.exe
    Rem The rest of your installs below here
    Rem Examples - [WinReducerPI is your Current Directory]
    ::Start "" /W "Microsoft Toolkit.exe" AutoKMS.exe /EZActivator
    ::Start "" /W "Windows Loader.exe" /Silent /PreActivate>Nul
     
  3. TeamOS

    TeamOS MDL Guru

    May 27, 2013
    3,036
    1,739
    120
    #3 TeamOS, Jan 1, 2015
    Last edited: Jan 1, 2015
    (OP)
    thanks alot!!! about
    Rem Examples - [WinReducerPI is your Current Directory] is there i put my apps for make installation or my Batch.script?

    example: my apps is insde %CDROM% application Folder
     
  4. Compo

    Compo MDL Member

    Mar 29, 2011
    136
    106
    10
    My script was only for the three items you intended, (office toolkit and loader), I have no interest whatsoever in any further 'apps' you intend to install.

    I have no interest in, nor knowledge of, the toolkit or loader and therefore left their use and parameters as you had and commented them out. If you are sure about their correctness etc. just remove the first two characters from the last two lines.
     
  5. TeamOS

    TeamOS MDL Guru

    May 27, 2013
    3,036
    1,739
    120
    thanks !!!!