- Put the path to Windows executable you wish to execute in
path-to-app.txt - Running
cargo runwill run that executable. - Protip: copy the exe from
target\debug\launch-application.exeandpath-to-app.txttoC:\Windows\System32Then you can edit the filename oflaunch-application.exeto whatever you want. This will allow you to be able to run the executable inpath-to-app.txt's path by simply typing the filename oflaunch-application.exein Windows Terminal!
I wrote this to solve a very specific problem I have :
- My keyboard have calculator button that when pressed , launch Windows calculator (It link to C:\Windows\System32\calc.exe by default)
- I want to make it launch Qalculate instead.