I want to automatically start rails when I log in to windows

Asked 2 years ago, Updated 2 years ago, 74 views

I installed Bash on Ubuntu on Windows 10 and I use rails.
After starting Windows, I changed the directory every time and started rails. I'd like to start rails automatically when I log in to windows, is there any way?
The following commands have been executed by the time the rails are started:

[Operating Environment]
·Windows 10
·ruby: 2.4.1
·rails: 5.1.2
·Bash on Ubuntu on Windows

Execute Commands

 C:\Users\username\Desktop>cd C:\Users\username\rails\rails_app
C:\Users\username\rails\rails_app>bash
username@TEST1:mnt/Users/username/rails/rails_app$rails

bash windows-10

2022-09-30 10:46

1 Answers

I think it would be better to register the command I run every time with the startup.
PowerShell

start "${env:APPDATA}\Microsoft\Windows\Start Menu\Programs\Startup"

Run to open the startup folder, so create a new shortcut here
bash-c" (commands running) "
Yes, if you have more than one command, connect it with ; and put it all in a double quote


2022-09-30 10:46

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.