Run oscdimg.exe from a batch file?


  1. Posts : 15,898
    Windows10
       #1

    Run oscdimg.exe from a batch file?


    OK, I have a batch file that copies files from a mounted windows 10 installation file and updates drivers in boot.wim and install.wim.

    The thing I cannot work out is how to automatically run oscdimg.exe (command from deployment and imaging environment) in a batch file so I can create an iso included updated boot.wim and install.wim.

    I can do it manually by pasting a command into the D&I environment.

    It must be possible but how?

    EDIT: I sussed it - I needed to navigate to folder containing oscdimg.exe and then use CALL i.e.

    CALL OSCDIMG.EXE...…... etc.

    You can also use START
    OSCDIMG.EXE...…..etc. but CALL has the advantage of returning control back to the parent batch file and it only continues when the child command is completed.

    I now have a batch file which takes any iso, mounts install/boot.wim, injects drivers not in standard MS iso and creates a custom iso, all done automatically.

    I have to do this as my hardware will not boot using standard iso, and just spins those circles for ever.

    I go fed up manually injecting the key drivers I needed, so I decided to automate the process.
    Last edited by cereberus; 01 Oct 2018 at 16:35.
      My Computer


  2. Posts : 5,492
    Windows 11 Home
       #2

    cereberus said:
    You can also use START
    OSCDIMG.EXE...…..etc. but CALL has the advantage of returning control back to the parent batch file and it only continues when the child command is completed.
    Would not wait command have the same effect?
    Code:
    start "" /wait "E:\Software\Temp\Setup\1.exe"
      My Computer


  3. Posts : 5,477
    2004
       #3

    cereberus said:
    EDIT: I sussed it - I needed to navigate to folder containing oscdimg.exe and then use CALL
    Or you can specify the path on the call. For example :
    Code:
    $ADK = 'D:\Windows Kits\10\Assessment and Deployment Kit'
    $PEArch = 'amd64'
    
    # etc etc
    
    # Make ISO
    $command="$ADK\Deployment Tools\$PEArch\Oscdimg\oscdimg.exe"
    Write-Host "Creating $ISOPath ..."
    
    &$command  -l:$ISOLabel -h -m -o -u1 -bootdata:$bootdata "$WorkDir\media" "$ISOPath"
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 06:51.
Find Us




Windows 10 Forums