(HELP) with Autounattended and setupcomplete

Discussion in 'Windows 7' started by illeach1, Sep 27, 2013.

  1. illeach1

    illeach1 MDL Novice

    Jan 16, 2013
    11
    0
    0
    #1 illeach1, Sep 27, 2013
    Last edited by a moderator: Apr 20, 2017
    hey.

    I have sussusfully used cerberus modified OEM and Daz loader. but having another issue wich is very complex to me because I am not fimiliar with coding etc..

    Problem is that I want to use autounattended for unattended installation of windows 7 but I also want to install some applications with etupcomplete.cmd I was able to do this but problem is that I need to install application on the base of architecture of installed OS I mean setup1x32.exe should be installed on 32 bit OS while setup1x64 could be installed on 64 bit OS.

    then I want to run DAZ loader and at the end I want to call WPi

    cant post autounattended because if low post counts it contains links :rolleyes:

    here is my setupcomplete.cmd

    Code:
    @ECHO OFF
    %~dp0"Windows loader.exe" /silent /preactivate
    cd %~dp0
    attrib -r -a -s -h *.*
    SHUTDOWN /R /T 5
    RMDIR /S /Q "C:\Windows\Setup\Scripts"
    exit 
    problem is that I am not coder but afraid if I copy paste codes from thousand other threads it wont help me because in every command it will delete the particular directory
    [/CODE]

    like
    Code:
    attrib -r -a -s -h *.*SHUTDOWN /R /T 5
    RMDIR /S /Q "C:\Windows\Setup\Scripts
    
    thaks in advance
     
  2. Mr Jinje

    Mr Jinje MDL Expert

    Aug 19, 2009
    1,770
    1,101
    60
    #2 Mr Jinje, Sep 27, 2013
    Last edited by a moderator: Apr 20, 2017
    from setupcomplete.cmd you can use the %processor_architecture% variable checking it against the string "AMD64" inside an if else statement (if AMD64, do one thing, if not it installs x86).

    Code:
    if %processor_architecture% == AMD64  (setup-x64.exe) else (setup-x32.exe)
     
  3. illeach1

    illeach1 MDL Novice

    Jan 16, 2013
    11
    0
    0
    #3 illeach1, Sep 28, 2013
    Last edited by a moderator: Apr 20, 2017
    (OP)
    Mr Jinje thank you, could explain more please? I have other issues too for example including loader pre-activation and calling WPI at the end,

    could you please complete the code

    Code:
    if %processor_architecture% == AMD64  (setup-x64.exe) else (setup-x32.exe)
     
  4. nobodyin

    nobodyin MDL Novice

    Aug 21, 2011
    31
    6
    0
    #4 nobodyin, Oct 1, 2013
    Last edited by a moderator: Apr 20, 2017
    Something like this should work:
    Code:
    IF /i %PROCESSOR_ARCHITECTURE% == AMD64 GOTO 64bit 
    
    setup-x32.exe
    command1.exe
    command2.exe
    GOTO DONE 
     
    :64bit
    setup-x64.exe
    command1.exe
    command2.exe
    
    :DONE
    
     
  5. illeach1

    illeach1 MDL Novice

    Jan 16, 2013
    11
    0
    0
    #5 illeach1, Oct 5, 2013
    Last edited by a moderator: Apr 20, 2017
    (OP)
    thank you both.

    it works, but problem is still there. after these commands I want to call Daz Loader and WPI, but if I Run Daz Loader it will delete the directory then how would the etupcomplete call the WPI?

    Code:
    %~dp0"Windows Loader.exe" /silent /preactivate
    attrib -R -A -S -H *.*
    SHUTDOWN /R /T 5
    rem RMDIR /S /Q "%WINDIR%\Setup\Scripts"
    
    the I want this

    Code:
    @ECHO OFF
    SETLOCAL
    (SET DRIVE=)
    FOR /F "USEBACKQ TOKENS=2 DELIMS==" %%# IN (`WMIC DATAFILE WHERE^
     "PATH='\\WPI\\' AND FILENAME='WPI' AND EXTENSION='exe'"^
     GET Name /VALUE^|FIND "="`) DO SET "DRIVE=%%~d#"&SET "FPATH=%%#"
    
    
    START "" "%DRIVE%\WPI\WPI.exe"
    exit
    
     
  6. illeach1

    illeach1 MDL Novice

    Jan 16, 2013
    11
    0
    0
    bump.. i've completed my dvd but stuck in here
     
  7. redroad

    redroad MDL Guru

    Dec 2, 2011
    5,326
    6,043
    180
    You can use audit mode also
     
  8. illeach1

    illeach1 MDL Novice

    Jan 16, 2013
    11
    0
    0
    how should i do this
     
  9. illeach1

    illeach1 MDL Novice

    Jan 16, 2013
    11
    0
    0
    doesn't it make my win image larger in this case? I have created an AIO Windows 7 DVD, everything works great I just want to run wpi after Windows Loader, I mean when Daz Loader reboots the syte,m wpi should come up immitiately after boot like it does in normal mode but this coomand will delete scripts directory isn't it?

    SHUTDOWN /R /T 5
    rem RMDIR /S /Q "%WINDIR%\Setup\Scripts"