Windows 10: How to run .sh or Shell Script file in Windows 10

Discus and support How to run .sh or Shell Script file in Windows 10 in Windows 10 News to solve the problem; [ATTACH] [ATTACH]Shell Scripts or .SH files are like batch files of Windows which can be executed in Linux or Unix. It is possible to run .sh or Shell... Discussion in 'Windows 10 News' started by WinClub, Jul 16, 2019.

  1. WinClub New Member

    How to run .sh or Shell Script file in Windows 10

    WinClub, Jul 16, 2019
    #1
  2. Alex Sim Win User

    Associating linux shell (.sh) scripts on Windows 10 to Bash or WSL

    EDIT: the registry key and information below is OBSOLETE, please refer to the new version provided here: Can I drag and drop files to an .sh script using Bash on Ubuntu on Windows or Windows Subsystem for Linux (WSL)?

    This can be done by editing a single registry key (or more for extra functionalities).

    I will of course link a .reg file (actually three zipped reg files) to quickly install the workaround (along with icon association and (optional) nano edit enabler) without having to edit the registry yourself, if you download and install it, you must only follow step 1;

    FILE (only follow step 1, then download and install): ShellBashScriptOpen_v3

    But to satisfy your healthy mistrust, here is how you can do it yourself:

    .

    1) Set bash.exe as default program for .sh files

    Just right-click an sh file, go to properties, locate "open with", change > more_apps > find_an_app_in_this_PC and select C:\Windows\System32\bash.exe;

    Apply and you are good to go.

    .

    2) Actual double-click to open key

    create the following registry key with regedit

    a) If you want to keep bash open after script finished

    set the (Default) value to

    b) If you want to close bash after script finished

    set the (Default) value to

    .

    3) Open as admin option

    create the following registry key with regedit

    a) If you want to keep bash open after script finished

    set the (Default) value to

    b) If you want to close bash after script finished

    set the (Default) value to

    .

    4) Assign default icon key (optional [but cooler])

    create the following registry key

    and set the (Default) value to

    .

    5) Add right-click > edit option (with nano editor) (optional)

    create the following registry key

    and set the (Default) value to

     
    Alex Sim, Jul 16, 2019
    #2
  3. Ahhzz Win User
    Windows 10 Tweaks

    Pressing “Windows+Pause Break” (it’s up there next to scroll lock) opens the “System” Window.

    Windows 10: In the new version of Windows, Explorer has a section called Quick Access. This includes your frequent folders and recent files. Explorer defaults to opening this page when you open a new window. If you’d rather open the usual This PC, with links to your drives and library folders, follow these steps:

    • Open a new Explorer window.
    • Click View in the ribbon.
    • Click Options.
    • Under General, next to “Open File Explorer to:” choose “This PC.”
    • Click OK


    credit to Lifehacker.
     
    Ahhzz, Jul 16, 2019
    #3
  4. How to run .sh or Shell Script file in Windows 10

    Any1 ever create a shell script for a cyclades ACS 6000? Could use help

    I created a shell script with #!/bin/bash style. The idea is it is supposed to boot up a cli prompt using

    cli << EOF

    Then run the corresponding cli commands. I am following a script that works for an ACS classic unit. This however does not work for the ACS 6000. It does not recognize the cli commands after running cli << EOF.

    Any ideas, suggestions?
     
    Hybrid_theory, Jul 16, 2019
    #4
Thema:

How to run .sh or Shell Script file in Windows 10

Loading...
  1. How to run .sh or Shell Script file in Windows 10 - Similar Threads - run Shell Script

  2. Script for either a .bat file, or a CMD shell or Power Shell script, to automate running a...

    in Windows 10 Network and Sharing
    Script for either a .bat file, or a CMD shell or Power Shell script, to automate running a...: Windows 10Hello Is it possible to write a script for either a .bat file, or a CMD shell or Power Shell script, to automate running a single small .exe Snap2HTML.exe over and over again while stating the program parameters. I wish to use a small program called Snap2html...
  3. Script for either a .bat file, or a CMD shell or Power Shell script, to automate running a...

    in Windows 10 Gaming
    Script for either a .bat file, or a CMD shell or Power Shell script, to automate running a...: Windows 10Hello Is it possible to write a script for either a .bat file, or a CMD shell or Power Shell script, to automate running a single small .exe Snap2HTML.exe over and over again while stating the program parameters. I wish to use a small program called Snap2html...
  4. Script for either a .bat file, or a CMD shell or Power Shell script, to automate running a...

    in Windows 10 Software and Apps
    Script for either a .bat file, or a CMD shell or Power Shell script, to automate running a...: Windows 10Hello Is it possible to write a script for either a .bat file, or a CMD shell or Power Shell script, to automate running a single small .exe Snap2HTML.exe over and over again while stating the program parameters. I wish to use a small program called Snap2html...
  5. Unknown Power shell script running

    in Windows 10 Gaming
    Unknown Power shell script running: Hi,I usually get a brief pop-up for a script that runs at random times as far as I can gather. Its only for a split second, but its a nuisance if I am gaming as my controller is just disabled until I swap out and back to the game window again.I can see that there are several...
  6. Unknown Power shell script running

    in Windows 10 Software and Apps
    Unknown Power shell script running: Hi,I usually get a brief pop-up for a script that runs at random times as far as I can gather. Its only for a split second, but its a nuisance if I am gaming as my controller is just disabled until I swap out and back to the game window again.I can see that there are several...
  7. SH File .sh properties

    in Windows 10 Network and Sharing
    SH File .sh properties: HiI have accidentally changed the properties of a ".sh" file and it opens with Adobe Acrobat Reader now. Can someone suggest me, what is to be done in order to restore the file to its original form.Thanks and regardsSabu G...
  8. SH File .sh properties

    in Windows 10 Gaming
    SH File .sh properties: HiI have accidentally changed the properties of a ".sh" file and it opens with Adobe Acrobat Reader now. Can someone suggest me, what is to be done in order to restore the file to its original form.Thanks and regardsSabu G...
  9. SH File .sh properties

    in Windows 10 Software and Apps
    SH File .sh properties: HiI have accidentally changed the properties of a ".sh" file and it opens with Adobe Acrobat Reader now. Can someone suggest me, what is to be done in order to restore the file to its original form.Thanks and regardsSabu G...
  10. Power shell script

    in Windows 10 Support
    Power shell script: Not sure where to post this. Can anyone tell me what this does. C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe -ExecutionPolicy UnRestricted function IJ($A) {$L = $Null;Get-ChildItem $A -Recurse -Depth 1 -ErrorAction 'SilentlyContinue' | ? {$_.extension -eq '.lnk'}...