-
-
Notifications
You must be signed in to change notification settings - Fork 10.9k
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
scrcpy-noconsole as command line option #2167
Comments
This is not possible: #1988 (comment)
As soon as you run a .bat, it will open a console (possibly closing it immediately).
That does not work either. If run from a console,
Yes, the minimal "third party tool" I found was using a vbs script. An alternative would be to compile a separate .exe ( |
I get it, thanks for the explanation. I already assumed problems with the implementation and I'm not familiar with the particularities in windows. I assumed one could just redirect every output to a internal "terminal" which can be shown on demand. Mainly I wanted to point out, that the vbs script is getting blocked by, at least some, security tools. If you want to close this issue, it's fine with me. This additional cmd windows is not such a big deal, just cosmetics. |
Among other things, I have also blocked VBS scripts on my PC. nircmd execmd scrcpy.exe [...] |
@steff75 Hi. The parameter that you indicate, how can I use it inside a .bat file so that it's executed at system startup? |
@Dhyfer1 I'm not quite sure if this is what you mean but I have it like this in a bat file: |
@steff75 hello. With the commands in your bat file:
I see that you use scrcpy to connect wirelessly to your phone, but first you have to plug it into your PC for your bat file to work, right?
In another issue in this repository I learned how to configure the task scheduler so that scrcpy starts automatically when the device is plugged in, and I discovered that there is a tool called autoadb from the same developer to achieve the same purpose. But what I need to know is how to use autoadb to start scrcpy automatically every time I plug in my phone and without using the task scheduler? Is it possible? I can start scrcpy with autoadb manually from the command line, but I don't know how to make autoadb run automatically. |
Yes, connect the device over USB, then run:
Unfortunately I can't help you there, because I haven't dealt with autoadb yet. I currently use scrcpy only wireless with desktop shortcuts. I just have to connect the smartphone again via USB after a reboot and repeat the above command. |
Is your feature request related to a problem? Please describe.
I want to point out that scrcpy-noconsole.vbs, which is already merged #1988, will be blocked in many corporate environments. Leaving those user with no option to start the application without console.
Describe the solution you'd like
It would be really great to have a command line option "--noconsole" for the scrcpy.exe itself. Then we only would need one additional batch file scrcpy-noconsole.bat using this option. Or even turn the logic around and start scrcpy.exe always without console and add an option "--console".
Describe alternatives you've considered
I have looked for other ways in Windows batch to hide the console which doesn't seam to be possible. You always need third party application like https://ritchielawrence.github.io/cmdow/ which also get blocked by corporate security tools.
The text was updated successfully, but these errors were encountered: