-
Notifications
You must be signed in to change notification settings - Fork 61
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
noconsole option for Windows? #8
Comments
You can use nircmd. Start autoadb with a batch file and use |
Thank you, that worked perfectly |
Hi. Can you tell me how did you do it? how did you set autoadb as a startup process? I want scrcpy to run at system startup and when I connect my device it automatically runs scrcpy without opening a command line to call autoadb. Is this possible? |
To have it run at startup you can make a batch file to start autoadb and place it in Running with an invisible command line requires nircmd. The batch file should look something like
|
Hi @AdamWHY2K I still need some help, I have no experience creating .bat files. To start with, I have done the following:
I click on Ok, but then nircmd shows an error message indicating that nircmd could not copy the executable to the Windows directory, so I do it manually. Here I have a doubt, the nircmd file had to be copied to the Windows directory or I had to copy it to the Scrcpy directory?
What have I done wrong? what is missing here? As I said before, what I want is that every time I login to my PC and connect my phone, scrcpy opens automatically. |
Heyo @Dhyfer1 NirCmd just needs be in your %PATH% so moving it to But even without NirCmd the autoadb part should've worked, if you edit the .bat file you created to include a |
@AdamWHY2K Hi! As I said before, nircmd is in the Windows directory (C:\Windows), so there is no need to add it to %PATH%, except if I change its location. Well, I have edited the .bat file to include the pause line as you said, I edited it as follows, I hope it is ok:
But when I run the .bat file, (even before I add the Pause line), the command window appears with this message: Even with the bat file edit and after a system reboot, scrcpy still does not appear automatically when I plug in my phone. :( |
It looks like you need to add autoadb and scrcpy to path too |
Hmm. There is something I forgot to mention, when I downloaded nircmd 64bits it downloaded as a zip file, and inside it has 3 files: a help file, and two executables (nircmd.exe and nircmdc.exe), of these last two I only extracted the file nircmd.exe to C:\Windows. The other file, nircmdc.exe also has to be put in that directory? You say I need to add autoadb and scrcpy to path too. Are you serious? that would mean that I would also have to add all the files that come with scrcpy!? (adb, scrcpy-server, scrcpy-noconsole, scrcpy-console, all his dll files? etc). It would be easier if you tell me how you have configured your bat file and the directories where you have everything else. |
Hi buddy! First of all, thank you for your patience, your time and your help. :) Well, I have done what you say, I have added the scrcpy folder to the system variables and it does work. So the files for scrcpy to work at system startup are in the following paths:
When I restarted my computer, and after connecting my phone, scrcpy opened automatically as I wanted, thanks for that. But now I have two questions that I think it will be easy for you to answer:
My question is, is another bat file needed to hide the console window or does the bat file in your example need to be edited to also hide the console when scrcpy is opened manually? Thanks. 😊 |
No problem my man :)
To launch it from the taskbar without a console you need launch it using the same bat file, you can pin the bat file to taskbar by following this guide |
Thank you very much! I did the steps mentioned in the tutorial and it works. I now have a console icon pinned to the taskbar which when clicked opens a console window for a few seconds and then opens scrcpy. I think that editing the scrcpy-console.bat or scrcpy-noconsole.vbs file (both files come with scrcpy) will achieve the same result, i.e. hide the console window when scrcpy is opened by clicking on its icon in the taskbar, but I don't know how to edit those files. I think I will open a new issue about that later. That's all, thank you very much for your help my friend, and Merry Christmas.🎄 |
Is there a way to run autoadb.exe without the console opening?
I have autoaudb set as a startup process and set to run scrcpy-noconsole.exe when I plug in my phone. That works great, but of course I still end up stuck with the console window open from autoadb running.
Is there any way to just run it in the background, without the console having to stay open, or can you release a noconsole.exe version like you did with scrcpy?
Thank You,
Zeagar
The text was updated successfully, but these errors were encountered: