locked
batch winpe detection RRS feed

  • Question

  • Hello,

    Is there a way to detect I'm in Winpe with a batch script.

    I want my script to run only in winpe, not under Windows

    I need you'r help.

    scuz my english

    • Edited by Mike-eul Friday, January 31, 2020 7:44 AM
    Friday, January 31, 2020 7:20 AM

Answers

  • If you are booting into WinPE by a boot.wim you could try copying the batch file to the wim and capturing again and run it soon as you boot into WinPE or configure it to run automatically .

    You can use this for reference
    https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/wpeinit-and-startnetcmd-using-winpe-startup-scripts


    Website: www.walshamsolutions.com Technical Blog: https://www.walshamsolutions.com/technical-blog Personal Blog: https://www.walshamsolutions.com/personal-blog Twitter: Dwalshampro

    • Marked as answer by Mike-eul Tuesday, February 4, 2020 7:54 AM
    • Unmarked as answer by Mike-eul Tuesday, February 4, 2020 7:54 AM
    • Marked as answer by Mike-eul Tuesday, February 4, 2020 7:55 AM
    Monday, February 3, 2020 7:33 PM