setupcomplete

Discussion in 'Windows 10' started by NICK@NUMBER11, Dec 12, 2015.

  1. murphy78

    murphy78 MDL DISM Enthusiast

    Nov 18, 2012
    7,389
    11,614
    240
    #21 murphy78, Dec 14, 2015
    Last edited by a moderator: Apr 20, 2017
    I started using a separate script with a runonce command to delete the scripts directory.
    I found that it was unreliable to use the rmdir method.

    Try this in setupcomplete.cmd:
    Code:
    :CLEANUP
    reg add HKLM\Software\Microsoft\Windows\CurrentVersion\RunOnce /f /v "CLEANUP" /d "C:\Windows\Setup\Scripts\Post-Setup.cmd"
    and just move the rmdir stuff to Post-Setup.cmd in the scripts directory.

    There's something about the setupcomplete portion of setup that is just causing problems with deletion and program running sometimes.
    I think it's because they are starting a lot of the services and installing apps and such.