Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: Bat File to Manage Windows (help needed)  (Read 14131 times)

0 Members and 1 Guest are viewing this topic.

Windows User

    Topic Starter


    Greenhorn

    • Experience: Familiar
    • OS: Windows 10
    Bat File to Manage Windows (help needed)
    « on: March 21, 2022, 04:38:06 PM »
    I am working on a bat file to change important windows settings for me so that i dont have to manually do it.
    Next time when reinstalling windows i want to execute a single bat-file that will handle things for me.
    Probably i will still have to change a few settings manually but it should be reduced to a minimum.

    I want to learn how to change the following settings via bat/cmd

    • Taking Ownership or full-control-permissions of C:\Drive (already have a bat-file for that)
    • Change DNS server                                                           (already have a bat-file for that)
    • delete and disable preinstalled-bloatware                          (already have a bat-file for that)
    • disable all unnecessary services                                       (already have a bat-file for that)
    • disable telemtry and other shady features                         (O&Oshutup10 will do that for me)
    • File Explorer, change fast-access to This PC
    • Remove the checkmark from this setting: hide files and file extensions for known file types
    • Use the maximum cursor-blink-rate for mouse and keyboard
    • Import a Firewall Rule via command
    • Under Powerplan Settings disable hybernate, and set screen-timeout to 15 minutes
    • Under msconfig enable all cpu cores for boot/power-on
    • disable locking function that appears when pressing shift 5 times in a short amount of time
    • optimise hard drive once when executing this bat-file
    • create a desktop shortcut for C:\Users\User\AppData and C:\Users\User\AppData\Local\Temp
    • Under Optionalfeatures disable internet explorer 11
    • Under Optionalfeatures enable netframework 3.5 and directplay+legacy components
    • import specific registry keys including sub-keys and dword32bitvalue or create them if needed

    Thanks for helping!

    Windows User

      Topic Starter


      Greenhorn

      • Experience: Familiar
      • OS: Windows 10
      Re: Bat File to Manage Windows (help needed)
      « Reply #1 on: March 22, 2022, 02:17:32 AM »
      Update:

      • enable msconfig-all-cpu-cores on system boot
      • export/import nvidia controlpanel settings  or registry
      • create a desktop shortcut for C:\Users\User\AppData
      • disable automatic updates from SystemPropertiesComputerName.exe > Hardware
      • disable remote access SystemPropertiesComputerName.exe > Remote
      • if not, how can i import/export registry keys including sub-keys and dword32bit-value?
      • import-export specific task-scheduler-tasks
      • for example: Task-Scheduler > Microsoft > Windows > deactivate ALL triggers for Application Experience
      • import-export, group policy editor > administrative templates > windows components > deactivate Biometry, Datacolletion

      DaveLembke



        Sage
      • Thanked: 662
      • Certifications: List
      • Computer: Specs
      • Experience: Expert
      • OS: Windows 10
      Re: Bat File to Manage Windows (help needed)
      « Reply #2 on: March 22, 2022, 07:17:25 PM »
      If you are working with the same build, why not just set the registry up as you want and make a backup copy of the registry and after a new clean build copy over the backed up registry stomping out the default. Then the batch stuff can be just  forcing the registry overwrite and then copying of shortcuts etc.

      Windows User

        Topic Starter


        Greenhorn

        • Experience: Familiar
        • OS: Windows 10
        Re: Bat File to Manage Windows (help needed)
        « Reply #3 on: March 23, 2022, 12:41:40 PM »
        • Since i can't edit the original post i will just UPDATE here.

        • disable telemtry and other ridiculous features (O&Oshutup10 will do that for me)
        • delete and disable preinstalled-bloatware (already have a bat-file for that)
        • disable all tasks regarding telemtry (already have a bat-file for that)
        • disable all unnecessary services (already have a bat-file for that)
        • Taking Ownership of C:\Drive (already have a bat-file for that)
        • Import-Export registry keys (already have a bat-file for that)
        • Change DNS server (already have a bat-file for that)
        • Import a Firewall Rule (already have a bat-file for that)
        • Import-Export powerplan-settings
        • Under Optionalfeatures enable netframework 3.5 and directplay + legacy components
        • Under Optionalfeatures disable internet explorer 11
        • And a few more "Uncathegorized" Settings



        • Update



        ➤ Having problems with exporting reg keys:
        reg export HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options Image File Execution Options.reg
        reg export HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Multimedia\SystemProfile SystemProfile.reg
        Error Invalid Syntax



        ➤ When i edit the below settings, is there a reg-key that will change it's value at the same time?
        ➤ In that case i can export the reg-keys. If not, is there a cmd-command to turn them on or off?
        SystemProperties (SystemPropertiesComputerName.exe)
          > Hardware > Device Settings > Device Installation Settings > Automatic Updates > Off
          > Remote > Allow remote support on this computer > Off



        ➤ The below command adds a defender exclusion but it must be executed with powershell, is there an alternative for cmd?
        powershell -Command Add-MpPreference -ExclusionPath "D:\"




        ➤ How can i change the blow settings with cmd-command without any manual-user-interaction? Is there a command?
          > Press shift 5 times in a short period of time - Disable locking function

          > File explorer
          > Change fast access to this PC
          > Select view
          > Enable hide files and file extensions for known file types



        ➤ How can i change the blow settings with cmd-command without any manual-user-interaction? Is there a command?
          > Windows Optional-Features
          > Enable Netframework 3.5
          > Enable Directplay + Legacy Components
          > Disable Internet Explorer 11
        For example i already found a working command on how to disable internet-explorer-11
        Disable-WindowsOptionalFeature -FeatureName Internet-Explorer-Optional-amd64 –Online
        Can anyone please share the command to enable netframework 3.5 and directplay including the sub-option legacy components?



        ➤ How can i change the blow settings with cmd-command without any manual-user-interaction? Is there a command?
          > Windows Explorer
          > Rightklick on Network
          > Properties
          > Advanced sharing settings
          > Disable Network Discovery for Guest and Privat Profile

          > Windows Explorer
          > Rightklick on Network
          > Properties
          > Edit Adapter Settings
          > Rightklick on Ethernet
          > Properties
          > Remove all checkmarks expect IPv4

        patio

        • Moderator


        • Genius
        • Maud' Dib
        • Thanked: 1769
          • Yes
        • Experience: Beginner
        • OS: Windows 7
        Re: Bat File to Manage Windows (help needed)
        « Reply #4 on: March 23, 2022, 03:25:55 PM »
        Wgat are you using for editing/nackup of registry keys ? ?

        I would suggest Erunt.
        " Anyone who goes to a psychiatrist should have his head examined. "