none
Running a reg.exe in a Task Sequence RRS feed

  • Question

  • Still fairly new to MDT but am learning. I am trying to add a Reg delete to the task sequence. The command line I have is:

    reg.exe delete HKLM\Software\Policies\Microsoft\Windows\WindowsUpdate /f

    This does not work but if I enter it in the command prompt afterwards it works fine.

    I have tried looking through the logs and searching for reg.exe but cannot find any trace of it. Everything else in my TS works fine but this. Do I have to specify C:\Windows\System32? I thought I had tried that but could try it again. I just didn't know if there was anything obvious I am missing.

    Where can I look for my problem at?

    Thanks,

    Scott

    Monday, November 14, 2016 6:17 PM

All replies

  • CMD /C reg blah blah blah

    Many questions such as where do I find logs and what logs are interesting are found in: MDT TechNet Forum - FAQ & Getting Started Guide Please take the time to read it. Also if you don't post logs your problem won't be easily solved.

    Monday, November 14, 2016 9:07 PM
    Moderator
  • I had tried cmd /c and cmd.exe /c and this time I actually got the error screen in MDT. Before it looked like it went through with no error but just didn't do anything. Thanks, Scott
    Monday, November 14, 2016 11:22 PM
  • is set startin to %windir%\system32 in the properties section of the ts step ?


    Monday, November 14, 2016 11:31 PM
  • Hi Scott,

    What about this, in a 'Run Command Line' step:

    reg.exe delete "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" /f

    Tuesday, November 15, 2016 5:27 AM
  • I have two entries I remove in the registry. I made a notepad text file that states:

    reg delete "HKLM\Software\etc\etc" /f
    reg delete "HKLM\Software\Wow6432Node\etc\etc" /f

    Then I simply changed it to a .bat file, added it as an application in MDT TS and that's it.

    Saturday, November 19, 2016 9:46 PM
  • Hi i had same case earlier and packaging the Exe file into mis file made it worked like a breeze. Once you have packaged the file run this this command from Application properties msiexec /i "product.msii" /n Only use /n if there is no GUI required Then on OS tas sequence I add this to the Install Application on post install. Just my fifty cents might be related to your case or not.
    Sunday, November 27, 2016 9:22 AM
  • Hi i had same case earlier and packaging the Exe file into mis file made it worked like a breeze. Once you have packaged the file run this this command from Application properties msiexec /i "product.msii" /n Only use /n if there is no GUI required Then on OS tas sequence I add this to the Install Application on post install. Just my fifty cents might be related to your case or not.

    Will try this out as everything else has not worked so far. Any tips on what to use to convert to MSI?

    Thanks,

    Scott

    Tuesday, December 6, 2016 6:09 PM