Windows 10: How do i execute batch script via key combinations?

Discus and support How do i execute batch script via key combinations? in Windows 10 Software and Apps to solve the problem; I made a batch script that just shuts down my pcWorks well with win 10 but for win 11 the key combinations doesnt seem to workI check the properties i... Discussion in 'Windows 10 Software and Apps' started by Chizzzt, Feb 16, 2025.

  1. Chizzzt Win User

    How do i execute batch script via key combinations?


    I made a batch script that just shuts down my pcWorks well with win 10 but for win 11 the key combinations doesnt seem to workI check the properties i tried resetting with the same combinations, it shuts down the computer, turned pc on and tried the key combinations again, it doesnt workWhat the hell is wrong with win 11?

    :)
     
    Chizzzt, Feb 16, 2025
    #1

  2. Running PowerShell script as a batch file

    Hello Baldo,



    Thank you for writing to Microsoft Community Forums.



    I understand that you want to execute the PowerShell commands as a batch file.



    I tried executing the batch file on my machine but I was unable to execute it as the command was incomplete. However, after making some changes in the command I was able to execute the batch file.



    You can try the following command by saving it in a batch file and check if that helps.



    powershell –Command Get-AppxPackage Microsoft.3dBuilder | Remove-AppxPackage



    Also, as the query is related to running a PowerShell script using a batch file, I suggest you to post the issue on

    TechNet
    forums where we have professionals who have more knowledge about the issue.



    Hope it helps.



    Regards,

    Prakhar Khare

    Microsoft Community – Moderator
     
    Prakhar_Khare, Feb 16, 2025
    #2
  3. Key combinations confusion

    Maybe it would help if I illustrate my question with an example.

    Currently, if I press Win+Up on my laptop, a MaximizeWindow is executed. However:

    • If I execute Win+/ (to display all key combinations involving the Windows key), Win+Up says "No action" (which isn't correct, because it executes MaximizeWindow).
    • And, if I go into PowerToys / Keyboard Manager, Keyboard Manager is enabled but there are no key combinations listed under either Remap A Key or Remap a shortcut.
    So, how was Win+Up remapped? And where should I remap it, if I want it to do something else? Any why isn't it showing up when I press Win+/?
     
    DavidPaulNZ, Feb 16, 2025
    #3
  4. yegorsw Win User

    How do i execute batch script via key combinations?

    Run the audio troubleshooter from a batch script

    I have an automated home theatre setup - a batch script that enables my TV as a display, and changes the TV to be my primary display (so games and apps open on my TV instead of my monitor).

    The same script also changes my default audio device to be the TV.

    The problem is every time I turn off my TV, it disappears from the list of audio output devices in Windows 10, and even when I turn it back on, it does not appear in the list. However, if I RIGHT CLICK on the audio icon and select "troubleshoot sound problems"
    and immediately cancel/close the troubleshooter, the TV is automagically added to my list of output devices.

    My question is - is there any way to have this troubleshooter be launched from a batch script and instantly closed? Alternatively, is there a way to force a refresh of the audio devices through a batch script?
     
    yegorsw, Feb 16, 2025
    #4
Thema:

How do i execute batch script via key combinations?

Loading...
  1. How do i execute batch script via key combinations? - Similar Threads - execute batch script

  2. How do i execute batch script via key combinations?

    in Windows 10 Gaming
    How do i execute batch script via key combinations?: I made a batch script that just shuts down my pcWorks well with win 10 but for win 11 the key combinations doesnt seem to workI check the properties i tried resetting with the same combinations, it shuts down the computer, turned pc on and tried the key combinations again, it...
  3. Batch scripting

    in Windows 10 Software and Apps
    Batch scripting: Hi, here's the code that I used for 3 DISM commands to start automatically after pressing a key:Code and result:Code:@echo off echo You are going to use DISM. echo 1. To check the image. echo 2. Scan your PC's health echo 3. Restore your PC'S health. echo To continue, press...
  4. Batch scripting

    in Windows 10 Gaming
    Batch scripting: Hi, here's the code that I used for 3 DISM commands to start automatically after pressing a key:Code and result:Code:@echo off echo You are going to use DISM. echo 1. To check the image. echo 2. Scan your PC's health echo 3. Restore your PC'S health. echo To continue, press...
  5. Batch scripting

    in Windows 10 Network and Sharing
    Batch scripting: Hi, here's the code that I used for 3 DISM commands to start automatically after pressing a key:@echo off echo You are going to use DISM. echo 1. To check the image. echo 2. Scan your PC's health echo 3. Restore your PC'S health. echo To continue, press any key. echo Before...
  6. PageFile.sys batch script

    in Windows 10 Virtualization
    PageFile.sys batch script: Hello, I need help writing a batch script that would configure Windows Virtual Memory based on the amount of RAM installed If you have 4 GB of RAM, set virtual memory to 8 GB (Custom size: set both initial and maximum size to 8192) If you have 8 GB of RAM, set virtual memory...
  7. How to undo a batch script

    in Windows 10 Network and Sharing
    How to undo a batch script: I decided it would be a good idea to download and run a random batch script from the internet to get the ability to move files around freely, rather than sticking to the presets. Microsoft, if you see this, please allow us to move and organize files as we wish and not have to...
  8. Batch Scripts / Programs.

    in Windows 10 Performance & Maintenance
    Batch Scripts / Programs.: The members and quests who use this forum know how professional, informative and helpful it is! In order to help members solve their problems/issues we often ask them to run certain programs and perform certain tasks and then upload [ post ] the results to the forum for us...
  9. Batch Script to execute in Win 10 pro

    in Windows 10 Support
    Batch Script to execute in Win 10 pro: I'm looking for a batch script that can: Pull the single row taskbar to a 3 row taskbar and lock it in place in its default location (bottom). Change the time format at the bottom right corner from default to have e.g. "2:00 AM" in the first row, "Saturday" in the second...
  10. Batch script question

    in Windows 10 Support
    Batch script question: Hello, I want make a batch script to delete a spefic folder on the C disk, but how can I get only that spefic folder? I got this: Code: FOR /D %%p IN ("C:\USERS\%USERNAME%\Downloads\*.*") DO rmdir "%%p" /s /q cd C:\USERS\%USERNAME%\Downloads\ del *.* /q /s timeout /t 5...