Win10 Tweaking Scripts

Discussion in 'Scripting' started by mdl052020, Jul 29, 2020.

?

Do you like these batch scripts?

Poll closed Dec 31, 2020.
  1. Yes

    38 vote(s)
    90.5%
  2. No

    4 vote(s)
    9.5%
Multiple votes are allowed.
  1. mdl052020

    mdl052020 MDL Senior Member

    May 31, 2020
    441
    435
    10
    To Generate AutoUnattend.xml file online For Win10 : https://www.windowsafg.com/win10x86_x64_uefi.html
    Just Unpack ISO - Copy Paste xml file to root of iso - Pack ISO Again that's all.
     
  2. mdl052020

    mdl052020 MDL Senior Member

    May 31, 2020
    441
    435
    10
    Added System Apps Removal to Win10-Debloater Script Using Same Registry Tweak with GUI Grid View for Removal & Working Fine At My END.
    Again Used Reg Ownership Script by @BAU to Take Ownership of System Apps Reg Hive So Again My Thanks Goes to Him for his Great Work.
    Shall i Update the main Win10-Debloater Link or Create a Separate Link So that Users have Choice for Debloater Script With System Apps Removal or Without System Apps Removal.
    What Say Please Suggest.
     
  3. ingviowarr

    ingviowarr MDL Member

    Dec 14, 2009
    226
    173
    10
    WOW!!! This is GREAT! Thanks!

    1. [+] With System Apps Removal
    : For me it's completely enough. It is also easier for your future support (only one bundle)...
    My proposition: Some kind of text WARNING or/and screenshot with red frames what do not touch NEVER.

    [-] Without System Apps Removal - After smb. request, this may have reason.

    2. I would be appreciated if you add a version numbering for your script.

    Thank you very much!
     
  4. mdl052020

    mdl052020 MDL Senior Member

    May 31, 2020
    441
    435
    10
    Reply 1. Ok Got it . Means i will let that old final working script as it is & update this new script with name [ Win10-DebloaterWithSystemAppsRemoval.cmd ]
    Reply 2 . I will Update Versioning When i will be satisfied with my own Script.
    Some More Things in Mind to be Updated ie : Disable Services From Offline Wim Plus Remove Hidden Scheduled Tasks Plus Complete Reg Hive Tweaks For Fully Debloated Final Win10 ISO .& etc etc .
     
  5. ingviowarr

    ingviowarr MDL Member

    Dec 14, 2009
    226
    173
    10
    #85 ingviowarr, Sep 30, 2020
    Last edited: Oct 1, 2020
    As a shorter variant: W10-Debloater+SysApps.cmd
    I will be very happy having universal template for cmd. That's would be cool... Of course, proposed tweaks by you would be also not bad for wide usage.
    But universal template (to insert my own commands) takes a 1-st place. As usual, this is only mine opinion, nothing more.

    Moreover. If you make a template, then users can choose proposed tweaks by you from the beginning of this thread and insert only those tweaks they want and skip other ones.
    Maximum flexibility.
     
  6. mdl052020

    mdl052020 MDL Senior Member

    May 31, 2020
    441
    435
    10
    #86 mdl052020, Sep 30, 2020
    Last edited: Sep 30, 2020
    (OP)
    That's Why i haven't Encoded the Script Coding Which is Open Coded . Anybody can change anything editing the Script.
    Please Cross Check if your tweaked ISO with your recommendations will install properly without any OOBE error i think no it won't.
     
  7. ingviowarr

    ingviowarr MDL Member

    Dec 14, 2009
    226
    173
    10
    #87 ingviowarr, Sep 30, 2020
    Last edited: Sep 30, 2020
    Yeah... But I'm not a programmer, not a coder, not my occupation at all. So I'm expecting the right place to put the commands I have.
    I'm not so brave to rework such things like scripts that change ISO, where I'm not have wide experience.
    As soon as you post a link with "SystemApps" version, I'll check, as well.
    (CloudExperienceHost & AccountsControl will be included also at 1-st attempt, as I reported in the MSMG thread).
    Anyway I beleive I'll find minimum acceptable configuration, sooner or later).
     
  8. AeonX

    AeonX MDL Addicted

    May 24, 2013
    682
    524
    30
    To insert what exactly? Give an example to make it clearer and more concrete. I think that a function to integrate .reg files would be enough.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  9. mdl052020

    mdl052020 MDL Senior Member

    May 31, 2020
    441
    435
    10
    #89 mdl052020, Oct 1, 2020
    Last edited: Oct 1, 2020
    (OP)
    Updated Second Download Link as W10-Debloater With System Apps Removal & First One Remains the Same W10-Debloater Without System Apps Removal

    Thanks a Lot to Somebody who has not liked the scripts at forum poll . He must suggest something to improve the scripts because he unliked the forums poll so that i will try to look at it & will improve the script to be more user friendly or if he found a bug will suggest to patch it too .
     
  10. ingviowarr

    ingviowarr MDL Member

    Dec 14, 2009
    226
    173
    10
    I'm exactly need cmd, not a reg, this is highly important. The same additional option I've proposed to @MSMG some time before.
    This may be realized in any suitable way. For example:
    - Or a special place just inside the script body (with clear header name for this block)
    - Or external *.cmd file connected to the script
    - Or other appropriate way. Make your proposition.
     
  11. ingviowarr

    ingviowarr MDL Member

    Dec 14, 2009
    226
    173
    10
    #91 ingviowarr, Oct 1, 2020
    Last edited: Nov 11, 2020
    1. Tested. OOBE works.

    2. CRITICAL

    You have "Microsoft.Windows.PowerShell.ISE" disabled (marked) on the 2-nd screenshot.
    When that Capability component disabled, then PowerShell itself becomes broken (including partial failure of your script).
    When it is enabled, PS is healthy and no issues with the script. That was tested on tree installations.

    3. In the last versions of the script I have this odd FAIL entry. Script works with that and produce a helthy ISO.
    But I don't know is it critical or not. Just inform you. What do you think?
    That because I have OneDrive already removed in the source ISO done by MSMG?
    [​IMG]
     

    Attached Files:

  12. mdl052020

    mdl052020 MDL Senior Member

    May 31, 2020
    441
    435
    10
    #92 mdl052020, Oct 1, 2020
    Last edited: Oct 1, 2020
    (OP)
    Please Don't Worry About That fail . Ignore it as it failed because we are tweaking offline registry via that tweaker as according to my consent. Nothing to Worry About.

    I am working on removing scheduled tasks from offline image using registry tweak to show user all the scheduled tasks & let them choose which task to be deleted or which to not because some are mandatory for OOBE Process to Complete. Deleting Services via same registry tweak with grid view already emerged in script & working great at my side.

    Yes You Are Absolutely Correct Powershell Integrated Scripting Engine is Required for my scripts to work as Grid View Output.Thanks a lot . Will Update the Image with the same unselected in next update.
     
  13. AeonX

    AeonX MDL Addicted

    May 24, 2013
    682
    524
    30
    #93 AeonX, Oct 1, 2020
    Last edited: Oct 1, 2020
    Most of the things that are done in an offline image are in the registry because of that I asked for a concrete example of what you need. Other than that it may be deleting a file I can't think of anything else. But in that case I think it would be easier to edit the script. Almost anywhere you place commands in the script they will be executed since this script is very simple and is executed in the order in which the commands are placed.

    You can also use SetupComplete.cmd. I use this to disable or remove scheduled tasks and to do other things that can only be done on a live system like disabling hibernation (powercfg.exe /h off), disabling audit policies (auditpol.exe) and disabling eventlog channels (wevtutil.exe).

    Yes the error is about not having found a reg key so it must have been removed.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  14. mdl052020

    mdl052020 MDL Senior Member

    May 31, 2020
    441
    435
    10
    No That Failed Error on Install Wim Tweak is about to check whether there's any pending packages removal key in registry & if tweaker find it will delete it that's why its showing an error key does not exist.
     
  15. ingviowarr

    ingviowarr MDL Member

    Dec 14, 2009
    226
    173
    10
    @AeonX
    If there will none command template included in the MSMG or W10-Debloater-SysApps, then I'll do everything I want trough "specialize.cmd" + "SetupComplete.cmd" and "AutoUnattend.xml".
    Thanks to @mdl052020 for the tips and @abbodi1406 for his kind answers and help, now I know how to do it.
    (I don't want to do everything directly from the ISO, but some things would be nice to have during the 1-st launch, yeah).
     
  16. AeonX

    AeonX MDL Addicted

    May 24, 2013
    682
    524
    30
    My mistake I read very quickly :p I confused I thought it was the Owners subkey.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  17. mdl052020

    mdl052020 MDL Senior Member

    May 31, 2020
    441
    435
    10
    #97 mdl052020, Oct 1, 2020
    Last edited: Oct 27, 2020
    (OP)
    Script Updated to First Page
     
  18. AeonX

    AeonX MDL Addicted

    May 24, 2013
    682
    524
    30
    @ingviowarr If you don't know where to place the commands I think a good place would be right after mounting the image. Search for Mount-WindowsImage in the script and place your commands just below the powershell and echo commands.

    I think that would be the best option.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  19. mdl052020

    mdl052020 MDL Senior Member

    May 31, 2020
    441
    435
    10
    #99 mdl052020, Oct 1, 2020
    Last edited: Oct 27, 2020
    (OP)
    Script Updated to First Page
     
  20. mdl052020

    mdl052020 MDL Senior Member

    May 31, 2020
    441
    435
    10
    #100 mdl052020, Oct 2, 2020
    Last edited: Oct 27, 2020
    (OP)
    Script Updated to First Page