Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drag and Drop of .Bat file to terminal #3014

Closed
NikolaGrujic91 opened this issue Oct 1, 2019 · 5 comments
Closed

Drag and Drop of .Bat file to terminal #3014

NikolaGrujic91 opened this issue Oct 1, 2019 · 5 comments
Labels
Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing.

Comments

@NikolaGrujic91
Copy link

Drag and drop .bat file to Windows PowerShell/CMD and start execution of script. This will make running of .bat scripts much more convenient.

DropScript

@NikolaGrujic91 NikolaGrujic91 added the Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. label Oct 1, 2019
@ghost ghost added Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Needs-Tag-Fix Doesn't match tag requirements labels Oct 1, 2019
@zadjii-msft
Copy link
Member

This almost certainly won't be possible, since the Terminal doesn't really know anything about what application is running in it. If the application is cmd.exe, sure this is easy. Even powershell isn't that hard. But what about WSL? Or the Azure Cloud Shell Connector / ssh, which could be connected to anything, what do we do then?

Plus, with the auto-executing of these commands, that seems like it might be a bit of a security risk to me. malicious-code.exe could always just fake a drag-and-drop notification to Windows Terminal, and autorun its malicious batch file.

There's also #904 which will probably get you 90% of the way there.

@HBelusca
Copy link
Contributor

HBelusca commented Oct 1, 2019

Definitively #904 seems to be what is actually wanted there. This is also what happens in the regular console: dragging & dropping a file in a console/terminal just simulates keypresses corresponding to the letters of the full path to the file.

@JushBJJ
Copy link

JushBJJ commented Oct 4, 2019

Maybe instead of auto executing, a text editor like vim or notepad could be executed editing the file?

For instance in WSL:
-> User Drags file into terminal
-> Terminal receives file and checks what's the current selected tab type? (Example: Tab 3 [Selected] is currently running WSL).
-> Check's if any process is running that aren't background for example, matrix.sh is currently running
-> If it's a valid type and no processes are running, it will proceed to execute vim within the shell.

That's my brief idea on it. Though I can see multiple problems with it already so I'm pretty neutral.

@DHowett-MSFT
Copy link
Contributor

This is a more dangerous way to suggest /dup #904 😄
Thanks!

@ghost
Copy link

ghost commented Oct 7, 2019

Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!

@ghost ghost closed this as completed Oct 7, 2019
@ghost ghost added Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing. and removed Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Needs-Tag-Fix Doesn't match tag requirements labels Oct 7, 2019
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing.
Projects
None yet
Development

No branches or pull requests

5 participants