Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

Backed up the system lately?


devel / alt.msdos.batch / Re: Is there a way to put a command window in the background like Linux does (so that you can kill it)?

SubjectAuthor
* Is there a way to put a command window in the background like Linux does (so thaAndy Burnelli
+* Re: Is there a way to put a command window in the background likeKerr-Mudd, John
|`* Re: Is there a way to put a command window in the background like Linux does (soAndy Burnelli
| `* Re: Is there a way to put a command window in the background likeHerbert Kleebauer
|  `* Re: Is there a way to put a command window in the background like Linux does (soAndy Burnelli
|   +- Re: Is there a way to put a command window in the background like Linux does (soAndy Burnelli
|   `* Re: Is there a way to put a command window in the background likeHerbert Kleebauer
|    `* Re: Is there a way to put a command window in the background like Linux does (soAndy Burnelli
|     +* Re: Is there a way to put a command window in the background likeAndy Burns
|     |`* Re: Is there a way to put a command window in the background likeMikeS
|     | `- Re: Is there a way to put a command window in the background likeKerr-Mudd, John
|     `* Re: Is there a way to put a command window in the background likeHerbert Kleebauer
|      `* Re: Is there a way to put a command window in the background like Linux does (soAndy Burnelli
|       `* Re: Is there a way to put a command window in the background likeHerbert Kleebauer
|        `* Re: Is there a way to put a command window in the background like Linux does (soAndy Burnelli
|         `* Re: Is there a way to put a command window in the background likeHerbert Kleebauer
|          +* Re: Is there a way to put a command window in the background likeHerbert Kleebauer
|          |+- Re: Is there a way to put a command window in the background like Linux does (soAndy Burnelli
|          |`- Re: Is there a way to put a command window in the background like Linux does (soAndy Burnelli
|          +* Re: Is there a way to put a command window in the background likeHerbert Kleebauer
|          |`- Re: Is there a way to put a command window in the background like Linux does (soAndy Burnelli
|          `* Re: Is there a way to put a command window in the background like Linux does (soAndy Burnelli
|           `- Re: Is there a way to put a command window in the background like Linux does (soAndy Burnelli
+* Re: Is there a way to put a command window in the background like Linux does (soAndy Burnelli
|`- Re: Is there a way to put a command window in the background like Linux does (soAndy Burnelli
+* Re: Is there a way to put a command window in the background like Linux does (soRobert Roland
|+* Re: Is there a way to put a command window in the background like Linux does (soAndy Burnelli
||`* Re: Is there a way to put a command window in the background like Linux does (soRobert Roland
|| `* Re: Is there a way to put a command window in the background like Linux does (soAndy Burnelli
||  `- Re: Is there a way to put a command window in the background like Linux does (soAndy Burnelli
|`* The various kinds of Windows applications... (Was: Is there a way to put a commaKenny McCormack
| `- Re: The various kinds of Windows applications... (Was: Is there a way to put a cAndy Burnelli
+* Re: Is there a way to put a command window in the background likeMr. Man-wai Chang
|`- Re: Is there a way to put a command window in the background like Linux does (soAndy Burnelli
+* Re: Is there a way to put a command window in the background likeLori Fairhead
|`- Re: Is there a way to put a command window in the background likeHerbert Kleebauer
+- Re: Is there a way to put a command window in the background like Linux does (soAndy Burnelli
`* Re: Is there a way to put a command window in the background like Linux does (soAndy Burnelli
 `* Re: Is there a way to put a command window in the background like Linux does (soKenny McCormack
  `* Re: Is there a way to put a command window in the background like Linux does (soAndy Burnelli
   `* Re: Is there a way to put a command window in the background likeKerr-Mudd, John
    +- Re: Is there a way to put a command window in the background like Linux does (soAndy Burnelli
    `* Re: Is there a way to put a command window in the background like Linux does (soAndy Burnelli
     `- Re: Is there a way to put a command window in the background like Linux does (soAndy Burnelli

Pages:12
Re: Is there a way to put a command window in the background like Linux does (so that you can kill it)?

<t41j4u$17s$1@gioia.aioe.org>

 copy mid

https://www.novabbs.com/devel/article-flat.php?id=189&group=alt.msdos.batch#189

 copy link   Newsgroups: alt.comp.os.windows-10 alt.msdos.batch alt.comp.microsoft.windows
Path: i2pn2.org!i2pn.org!aioe.org!3PLzD/rb74ta/CXxNcmbeA.user.46.165.242.75.POSTED!not-for-mail
From: spa...@nospam.com (Andy Burnelli)
Newsgroups: alt.comp.os.windows-10,alt.msdos.batch,alt.comp.microsoft.windows
Subject: Re: Is there a way to put a command window in the background like Linux does (so that you can kill it)?
Date: Sat, 23 Apr 2022 20:13:49 +0100
Organization: Aioe.org NNTP Server
Message-ID: <t41j4u$17s$1@gioia.aioe.org>
References: <t3s52e$1ddc$1@gioia.aioe.org> <20220421204315.03ff044cdeef898a513382f1@127.0.0.1> <t3sgg5$j9f$1@gioia.aioe.org> <t3sk11$1snj$1@gioia.aioe.org> <t3sv4a$1489$1@gioia.aioe.org> <t3tfe4$1o5j$1@gioia.aioe.org> <t3tp6t$1njd$1@gioia.aioe.org> <t3u478$tfu$1@gioia.aioe.org> <t3v6h6$ol9$1@gioia.aioe.org> <t408to$pcd$1@gioia.aioe.org> <t40rr2$93a$1@gioia.aioe.org> <t414hd$1ncm$1@gioia.aioe.org> <t414n8$1prh$1@gioia.aioe.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Info: gioia.aioe.org; logging-data="1276"; posting-host="3PLzD/rb74ta/CXxNcmbeA.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.6.1
X-Notice: Filtered by postfilter v. 0.9.2
Content-Language: en-GB
 by: Andy Burnelli - Sat, 23 Apr 2022 19:13 UTC

Herbert Kleebauer wrote:

>> I post the usage of showwin.exe

Thanks for the showwin.{bat,exe} which ran the FOSS {adb,scrcpy} commands
omitting the scrcpy console (for efficiency and a clean user environment).
<https://i.postimg.cc/XqZsmVFM/scrcpy14.jpg> AppPath & shortcut TARGET

The only minor issue I had setting it up with shortcuts and AppPaths was
that you can't "directly" pin a batch file to the taskbar by default.

A. You can _not_ pin this shortcut to the taskbar
TARGET=C:\app\editor\android\scrcpy\showwin.bat

B. But you _can_ pin this shortcut to the taskbar
TARGET=%comspec% /c C:\app\editor\android\scrcpy\showwin.bat

Hence I added a "%comspec% /c% and _then_ I could pin the shortcut to the
batch file to the taskbar (and, once it's pinned, you can change it back).

Here is an illustration of the necessary change to pin the shortcut:
<https://i.postimg.cc/g2yNftw0/scrcpy15.jpg> Trick to pin batch shortcut

Re: Is there a way to put a command window in the background like Linux does (so that you can kill it)?

<u9t86h98c6vr3k2a6v5mvoanrl8sdb8i7m@4ax.com>

 copy mid

https://www.novabbs.com/devel/article-flat.php?id=190&group=alt.msdos.batch#190

 copy link   Newsgroups: alt.comp.os.windows-10 alt.msdos.batch alt.comp.microsoft.windows
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: fak...@ddress.no (Robert Roland)
Newsgroups: alt.comp.os.windows-10,alt.msdos.batch,alt.comp.microsoft.windows
Subject: Re: Is there a way to put a command window in the background like Linux does (so that you can kill it)?
Date: Sun, 24 Apr 2022 00:34:38 +0200
Organization: A noiseless patient Spider
Lines: 35
Message-ID: <u9t86h98c6vr3k2a6v5mvoanrl8sdb8i7m@4ax.com>
References: <t3s52e$1ddc$1@gioia.aioe.org> <k3v76h515r5cluk8hcpgnrgf1r05l63rkf@4ax.com> <t41480$1jiu$1@gioia.aioe.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Injection-Info: reader02.eternal-september.org; posting-host="924f39f610441d170a9560554a27b025";
logging-data="13904"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+VUETJblQcTT11L+RbiZcp"
Cancel-Lock: sha1:/9vxiTqRABsxUZNh7i1WS1ZdFlQ=
X-Newsreader: Forte Agent 4.2/32.1117
 by: Robert Roland - Sat, 23 Apr 2022 22:34 UTC

On Sat, 23 Apr 2022 15:59:27 +0100, Andy Burnelli <spam@nospam.com>
wrote:

>How can I tell the "scrcpy console" to be hidden?

I know VBScript and PowerShell can launch programs with the window
hidden. PowerShell's Start-Process cmdlet supports a "windowstyle"
parameter. This might be worth a try (single line):

powershell.exe -executionpolicy bypass -command "start-process
-filepath 'scrcpy' -argumentlist '--always-on-top
--tcpip=192.168.0.2:5555' -windowstyle 'hidden'"

If you want to hide or unhide a window "in-flight", I do not know of
any native way. There are ways to do it through the Windows API, and I
know PowerShell and VBScript can make API calls, but it is beyond my
abilities to write such a script.

If a third-party tool is acceptable, one of my favorites is AutoIt. It
is essentially a scripting language that has lots of built-in
functionality for manipulating the GUI. It can compile a script into a
standalone executable, which I really like. Take look here to get you
started:

https://www.autoitscript.com/autoit3/docs/functions/WinSetState.htm

Something like:

WinSetState ( "screencopy", "" , @SW_HIDE )

and

WinSetState ( "screencopy", "" , @SW_SHOW )
--
RoRo

Re: Is there a way to put a command window in the background like Linux does (so that you can kill it)?

<t42f1j$t0o$1@gioia.aioe.org>

 copy mid

https://www.novabbs.com/devel/article-flat.php?id=191&group=alt.msdos.batch#191

 copy link   Newsgroups: alt.comp.os.windows-10 alt.msdos.batch alt.comp.microsoft.windows
Path: i2pn2.org!i2pn.org!aioe.org!3PLzD/rb74ta/CXxNcmbeA.user.46.165.242.75.POSTED!not-for-mail
From: spa...@nospam.com (Andy Burnelli)
Newsgroups: alt.comp.os.windows-10,alt.msdos.batch,alt.comp.microsoft.windows
Subject: Re: Is there a way to put a command window in the background like Linux does (so that you can kill it)?
Date: Sun, 24 Apr 2022 04:09:54 +0100
Organization: Aioe.org NNTP Server
Message-ID: <t42f1j$t0o$1@gioia.aioe.org>
References: <t3s52e$1ddc$1@gioia.aioe.org> <k3v76h515r5cluk8hcpgnrgf1r05l63rkf@4ax.com> <t41480$1jiu$1@gioia.aioe.org> <u9t86h98c6vr3k2a6v5mvoanrl8sdb8i7m@4ax.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Info: gioia.aioe.org; logging-data="29720"; posting-host="3PLzD/rb74ta/CXxNcmbeA.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.6.1
X-Notice: Filtered by postfilter v. 0.9.2
Content-Language: en-GB
 by: Andy Burnelli - Sun, 24 Apr 2022 03:09 UTC

Robert Roland wrote:

>>How can I tell the "scrcpy console" to be hidden?
>
> I know VBScript and PowerShell can launch programs with the window
> hidden. PowerShell's Start-Process cmdlet supports a "windowstyle"
> parameter. This might be worth a try (single line):
>
> powershell.exe -executionpolicy bypass -command "start-process
> -filepath 'scrcpy' -argumentlist '--always-on-top
> --tcpip=192.168.0.2:5555' -windowstyle 'hidden'"

Thank you for that additional solution to the problem of hiding the console!

Woo hoo! That powershell Windows trick worked perfectly!
<https://i.postimg.cc/5NrK7jtg/scrcpy16.jpg> Powershell hide console trick

I always try all sensible purposefully helpful suggestions (if possible,
which is why I gravitate toward either native or FOSS solutions), where I
tried the following just now to see what it would do for me on my system:

Test sequence #1:
1. Run > cmd
2. ping 192.168.0.2 (just in case as my phone is set to not autoreconnect)
3. cd c:\app\editor\android\scrcpy (philosophically, I don't use $PATH)
4. adb kill-server (note that adb is, itself, it's own 'bridge' server)
5. adb connect 192.168.0.2:5555 (it's adb which does the TCP/IP connection)
6. powershell.exe -executionpolicy bypass -command "start-process -filepath 'scrcpy' -argumentlist '--always-on-top --tcpip=192.168.0.2:5555' -windowstyle 'hidden'"

Your powershell trick worked beautifully the first time!
<https://i.postimg.cc/5NrK7jtg/scrcpy16.jpg>

All I need now is to add the "&&" of the adb connection and the shortcuts
because all my customizations are always single-click one-command actions.

> If you want to hide or unhide a window "in-flight", I do not know of
> any native way. There are ways to do it through the Windows API, and I
> know PowerShell and VBScript can make API calls, but it is beyond my
> abilities to write such a script.

Thank you for that advice as if it's beyond your abilities, then it's out of
scope for mine since I'm not a coder. I'm a tweaker. I keep a clean system.

> If a third-party tool is acceptable, one of my favorites is AutoIt.

Funny you mention "AutoIt" since a _lot_ of the search results that came up
in my searches done before I had asked refer to solutions using that tool!
RUN > scrcpy

> It is essentially a scripting language that has lots of built-in
> functionality for manipulating the GUI. It can compile a script into a
> standalone executable, which I really like. Take look here to get you
> started:
>
> https://www.autoitscript.com/autoit3/docs/functions/WinSetState.htm
> Something like:
> WinSetState ( "screencopy", "" , @SW_HIDE )
> and
> WinSetState ( "screencopy", "" , @SW_SHOW )

Thanks for that kind-hearted purposefully helpful advice, where I, like you,
strive to provide the cross references necessary so that _others_ will
benefit simply by clicking on the links provided (as you kindly gave me).

To be sure, there are two automation apps I haven't adequately explored:
a. This helpful "autoit" PC automation suggestion of yours, and,
b. These "IFFT" & "Automate" Android free automation tools.
<https://i.postimg.cc/bvRXdbxg/scrcpy17.jpg> AutoIT & IFFT & Automate

For example:
*IFTTT - automation & workflow*, by IFTTT, Inc
free, ad free, requires GSF, rated 3.6, 5M+ installs
<https://play.google.com/store/apps/details?id=com.ifttt.ifttt>

*Automate* by LlamaLab
free, ad free, requires GSF, rated 4.4, 1M+ installs
<https://play.google.com/store/apps/details?id=com.llamalab.automate>

Note I gravitate to free tools because then the tutorials can be applied by
anyone since there is essentially no barrier to entry for others to test.

All three (AutoIT, IFFT & Automate) are on my "todo" learning-to-do list!
<https://i.postimg.cc/Y93b1z0n/scrcpy18.jpg> APKs at FOSS Google Play Store

Thanks!
--
Usenet is where kind-hearted people daily gather to voluntarily help others.

Re: Is there a way to put a command window in the background like Linux does (so that you can kill it)?

<af57ede2-0349-4806-9e39-124edb778822n@googlegroups.com>

 copy mid

https://www.novabbs.com/devel/article-flat.php?id=192&group=alt.msdos.batch#192

 copy link   Newsgroups: alt.msdos.batch
X-Received: by 2002:ac8:5cd4:0:b0:2f3:6401:9b81 with SMTP id s20-20020ac85cd4000000b002f364019b81mr2337760qta.186.1650779284318;
Sat, 23 Apr 2022 22:48:04 -0700 (PDT)
X-Received: by 2002:a05:622a:6115:b0:2f1:d8fa:84aa with SMTP id
hg21-20020a05622a611500b002f1d8fa84aamr8580787qtb.689.1650779284181; Sat, 23
Apr 2022 22:48:04 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: alt.msdos.batch
Date: Sat, 23 Apr 2022 22:48:03 -0700 (PDT)
In-Reply-To: <t3s52e$1ddc$1@gioia.aioe.org>
Injection-Info: google-groups.googlegroups.com; posting-host=87.112.250.40; posting-account=3b1IMQoAAABTaHj6KDu9rDX4VoUvTgIu
NNTP-Posting-Host: 87.112.250.40
References: <t3s52e$1ddc$1@gioia.aioe.org>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <af57ede2-0349-4806-9e39-124edb778822n@googlegroups.com>
Subject: Re: Is there a way to put a command window in the background like
Linux does (so that you can kill it)?
From: lorif32...@gmail.com (Lori Fairhead)
Injection-Date: Sun, 24 Apr 2022 05:48:04 +0000
Content-Type: text/plain; charset="UTF-8"
 by: Lori Fairhead - Sun, 24 Apr 2022 05:48 UTC

On Thursday, April 21, 2022 at 6:42:41 PM UTC+1, Andy Burnelli wrote:
> Is there a way to put a command window in the background like Linux does
> with the ampersand (so that you can kill the window but not the process)?
>
> The problem that I have is I run a lot of commands from the Run icon in my
> taskbar which bring up command windows to run scxripts but which leave
> the unnecessary command window sitting around (which can be iconified).
> <https://i.postimg.cc/Y00vx4yp/scrcpy04.jpg> Extraneous cmd window (&)
>
> As an example, for years I've been running commands from a shortcut target
> such as this target below which end up leaving an open command window in the
> taskbar after they call the process, which itself opens up its own window.
> %comspec% /k cd /d "c:\app\editor\android\scrcpy" && adb connect 192.168.0.2:5555 && scrcpy --always-on-top --tcpip=192.168.0.2:5555
>
> That reliably pops up the Android screen on Windows over Wi-Fi but then I
> have absolutely no need for the command window to remain around as clutter.
>
> Is there a way to get rid of the command Window and not kill the process?
>
> In UNIX, I used to use the ampersand (&) to background the process.
> The I could easily close the window & the background process would remain.
>
> Does Windows have that concept of putting the command in the background so
> that the window that called it can be closed (but the process remains)?
>
> I have the same issue with openvpn windows where I don't need the extraneous
> running open command window cluttering up what otherwise should be a clean
> Windows user experience. I never enter another command in those windows.
>
> And yet, I can accidentally interfere with the open window because it's
> there and you can't get rid of it (other than to iconify it with the (-),
> but it's still there on the otherwise clean taskbar, just waiting to be
> opened by accident (and the icon looks like all other cmd window icons).
>
> For those reasons...
>
> Is there a way to background a Windows command (e.g., "&") and then we can
> safely _close_ that extraneous running command window to reduce clutter?
> --
> Usenet is where kind-hearted people daily gather to voluntarily help others.

Can you do it with START /B

Perhaps?

LF

Re: Is there a way to put a command window in the background like Linux does (so that you can kill it)?

<t434jp$1im3$1@gioia.aioe.org>

 copy mid

https://www.novabbs.com/devel/article-flat.php?id=193&group=alt.msdos.batch#193

 copy link   Newsgroups: alt.msdos.batch
Path: i2pn2.org!i2pn.org!aioe.org!YM2KJ89VMY75KS+Sg0Obqw.user.46.165.242.91.POSTED!not-for-mail
From: kle...@unibwm.de (Herbert Kleebauer)
Newsgroups: alt.msdos.batch
Subject: Re: Is there a way to put a command window in the background like
Linux does (so that you can kill it)?
Date: Sun, 24 Apr 2022 11:17:45 +0200
Organization: Aioe.org NNTP Server
Message-ID: <t434jp$1im3$1@gioia.aioe.org>
References: <t3s52e$1ddc$1@gioia.aioe.org>
<af57ede2-0349-4806-9e39-124edb778822n@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Info: gioia.aioe.org; logging-data="51907"; posting-host="YM2KJ89VMY75KS+Sg0Obqw.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.8.0
X-Notice: Filtered by postfilter v. 0.9.2
Content-Language: en-US
 by: Herbert Kleebauer - Sun, 24 Apr 2022 09:17 UTC

On 24.04.2022 07:48, Lori Fairhead wrote:

> Can you do it with START /B
>
> Perhaps?

If you provide such a simple solution, we look like idiots.
Welcome back!

The various kinds of Windows applications... (Was: Is there a way to put a command window in the background like Linux does (so that you can kill it)?)

<t43gnh$3bm7l$1@news.xmission.com>

 copy mid

https://www.novabbs.com/devel/article-flat.php?id=194&group=alt.msdos.batch#194

 copy link   Newsgroups: alt.comp.os.windows-10 alt.msdos.batch alt.comp.microsoft.windows
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!xmission!nnrp.xmission!.POSTED.shell.xmission.com!not-for-mail
From: gaze...@shell.xmission.com (Kenny McCormack)
Newsgroups: alt.comp.os.windows-10,alt.msdos.batch,alt.comp.microsoft.windows
Subject: The various kinds of Windows applications... (Was: Is there a way to put a command window in the background like Linux does (so that you can kill it)?)
Date: Sun, 24 Apr 2022 12:44:33 -0000 (UTC)
Organization: The official candy of the new Millennium
Message-ID: <t43gnh$3bm7l$1@news.xmission.com>
References: <t3s52e$1ddc$1@gioia.aioe.org> <k3v76h515r5cluk8hcpgnrgf1r05l63rkf@4ax.com>
Injection-Date: Sun, 24 Apr 2022 12:44:33 -0000 (UTC)
Injection-Info: news.xmission.com; posting-host="shell.xmission.com:166.70.8.4";
logging-data="3528949"; mail-complaints-to="abuse@xmission.com"
X-Newsreader: trn 4.0-test77 (Sep 1, 2010)
Originator: gazelle@shell.xmission.com (Kenny McCormack)
 by: Kenny McCormack - Sun, 24 Apr 2022 12:44 UTC

In article <k3v76h515r5cluk8hcpgnrgf1r05l63rkf@4ax.com>,
Robert Roland <fake@ddress.no> wrote:
....
>In Windows, there are two types of programs: Console applications and
>pure GUI applications.
>
>It is not always easy to spot which is which, because a console
>application can also create graphical windows.

And note, just for completeness, that a "Pure GUI application" can create a
console window too. Using AllocConsole().

Or even "AttachConsole()".

--
"We are in the beginning of a mass extinction, and all you can talk
about is money and fairy tales of eternal economic growth."

- Greta Thunberg -

Re: Is there a way to put a command window in the background like Linux does (so that you can kill it)?

<t44omj$lmu$1@gioia.aioe.org>

 copy mid

https://www.novabbs.com/devel/article-flat.php?id=195&group=alt.msdos.batch#195

 copy link   Newsgroups: alt.comp.os.windows-10 alt.comp.microsoft.windows alt.msdos.batch
Path: i2pn2.org!i2pn.org!aioe.org!3PLzD/rb74ta/CXxNcmbeA.user.46.165.242.75.POSTED!not-for-mail
From: spa...@nospam.com (Andy Burnelli)
Newsgroups: alt.comp.os.windows-10,alt.comp.microsoft.windows,alt.msdos.batch
Subject: Re: Is there a way to put a command window in the background like Linux does (so that you can kill it)?
Date: Mon, 25 Apr 2022 01:06:59 +0100
Organization: Aioe.org NNTP Server
Message-ID: <t44omj$lmu$1@gioia.aioe.org>
References: <t3s52e$1ddc$1@gioia.aioe.org> <k3v76h515r5cluk8hcpgnrgf1r05l63rkf@4ax.com> <t41480$1jiu$1@gioia.aioe.org> <u9t86h98c6vr3k2a6v5mvoanrl8sdb8i7m@4ax.com> <t42f1j$t0o$1@gioia.aioe.org> <t43sjb$1o1p$1@gioia.aioe.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Info: gioia.aioe.org; logging-data="22238"; posting-host="3PLzD/rb74ta/CXxNcmbeA.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.6.1
X-Notice: Filtered by postfilter v. 0.9.2
Content-Language: en-GB
 by: Andy Burnelli - Mon, 25 Apr 2022 00:06 UTC

Herbert Kleebauer wrote:

>> Thank you for that additional solution to the problem of hiding the console!
>
> Did you read the simple solution given in alt.msdos.batch: START /B

It is pure genius, I agree... (and Lord knows, I _love_ simplicity!);
but for the life of me, I haven't gotten the shortcut syntax correct yet.
<https://i.postimg.cc/3R6nTz7s/scrcpy19.jpg> Start /b TARGET fails :(
<https://i.postimg.cc/Y9jbTtcN/scrcpy20.jpg> Start /b as a CMD works! :)

TEST #1 (shortcut target):
a. For whatever reason, when I added the "start /B scrcpy" to the TARGET,
b. Doubleclicking that shortcut opened the Android GUI as desired,
c. But it _also_ left an adb window in its wake.

TARGET=%comspec% /c cd /d "c:\app\editor\android\scrcpy" && adb connect 192.168.0.2:5555 && start /B scrcpy --always-on-top --tcpip=192.168.0.2:5555
STARTIN=c:\app\editor\android\scrcpy

Yet, if I run that exact line in the command window, it works just fine!

TEST #2 (command line):
a. The command runs inside the command window,
b. The Android GUI opens up,
c. And then the command window goes away.

I've been trying various syntax efforts (e.g., the aforementioned trailing
"&cls%exit" stuff), but I haven't figured out yet why the same command line
above pasted into the command window works differently than that same
command line above when it's pasted into a shortcut TARGET line.

Makes no sense to me why the shortcut isn't working.
And yet, the _same_ line pasted into a command window works as expected.
--
PS: I'll monitor alt.msdos.batch moving forward until this is resolved.

Re: The various kinds of Windows applications... (Was: Is there a way to put a command window in the background like Linux does (so that you can kill it)?)

<t4b8ic$h18$1@gioia.aioe.org>

 copy mid

https://www.novabbs.com/devel/article-flat.php?id=196&group=alt.msdos.batch#196

 copy link   Newsgroups: alt.comp.os.windows-10 alt.msdos.batch alt.comp.microsoft.windows
Path: i2pn2.org!i2pn.org!aioe.org!Gj+613xB9sVIQxAtFideEw.user.46.165.242.75.POSTED!not-for-mail
From: spa...@nospam.com (Andy Burnelli)
Newsgroups: alt.comp.os.windows-10,alt.msdos.batch,alt.comp.microsoft.windows
Subject: Re: The various kinds of Windows applications... (Was: Is there a way to put a command window in the background like Linux does (so that you can kill it)?)
Date: Wed, 27 Apr 2022 12:14:37 +0100
Organization: Aioe.org NNTP Server
Message-ID: <t4b8ic$h18$1@gioia.aioe.org>
References: <t3s52e$1ddc$1@gioia.aioe.org> <k3v76h515r5cluk8hcpgnrgf1r05l63rkf@4ax.com> <t43gnh$3bm7l$1@news.xmission.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Info: gioia.aioe.org; logging-data="17448"; posting-host="Gj+613xB9sVIQxAtFideEw.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.6.1
Content-Language: en-GB
X-Notice: Filtered by postfilter v. 0.9.2
 by: Andy Burnelli - Wed, 27 Apr 2022 11:14 UTC

Kenny McCormack wrote:

> And note, just for completeness, that a "Pure GUI application" can create a
> console window too. Using AllocConsole().

To the point of hiding the console for the better-written programs, I tested
out the "free" Vysor crippleware which has a huge advantage over scrcpy in
that it can work remotely over the Internet for both Android & iOS on all
the common consumer desktop platforms (namely Windows, Linux & macOS).
<https://www.vysor.io/> "A window to your Phone"
"Vysor puts your iOS or Android on your desktop.

Notice Vysor mirrors Android much like scrcpy did, with an added console:
<https://i.postimg.cc/QNwjsCDM/vysor01.jpg> Vysor Android/iOS PC mirroring

Yet, unlike scrcpy in the native setup, the Vysor console can be killed:
<https://i.postimg.cc/V6TPYG3h/vysor02.jpg> Vysor console closes gracefully
--
Usenet is where kind-hearted well educated people gather to exchange ideas.

Re: Is there a way to put a command window in the background like Linux does (so that you can kill it)?

<t4b8r3$l7r$1@gioia.aioe.org>

 copy mid

https://www.novabbs.com/devel/article-flat.php?id=197&group=alt.msdos.batch#197

 copy link   Newsgroups: alt.comp.os.windows-10 alt.msdos.batch alt.comp.microsoft.windows
Path: i2pn2.org!i2pn.org!aioe.org!Gj+613xB9sVIQxAtFideEw.user.46.165.242.75.POSTED!not-for-mail
From: spa...@nospam.com (Andy Burnelli)
Newsgroups: alt.comp.os.windows-10,alt.msdos.batch,alt.comp.microsoft.windows
Subject: Re: Is there a way to put a command window in the background like Linux does (so that you can kill it)?
Date: Wed, 27 Apr 2022 12:19:16 +0100
Organization: Aioe.org NNTP Server
Message-ID: <t4b8r3$l7r$1@gioia.aioe.org>
References: <t3s52e$1ddc$1@gioia.aioe.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Info: gioia.aioe.org; logging-data="21755"; posting-host="Gj+613xB9sVIQxAtFideEw.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.6.1
X-Notice: Filtered by postfilter v. 0.9.2
Content-Language: en-GB
 by: Andy Burnelli - Wed, 27 Apr 2022 11:19 UTC

While testing other "free" screen mirroring solutions, I tried out the
"Vysor" crippleware which does at least what scrcpy FOSS software does.

<https://www.vysor.io/> "A window to your Phone"
"Vysor puts your iOS or Android on your desktop.
Use apps, play games, control your iOS or Android.
A desktop or web app, compatible with all operating systems.
Use your Keyboard. Point, click, scroll. Your mouse works too.
Share your device, across the office, or across the globe.
Screen and ADB access to remote devices. Simple as sending a link."

I was pleasantly surprised that the Vysor console easily can be closed.
<https://i.postimg.cc/QNwjsCDM/vysor01.jpg> Vysor Android/iOS PC mirroring

Without adversely affecting the existing Android (or iOS) mirroring windows:
<https://i.postimg.cc/V6TPYG3h/vysor02.jpg> Vysor console closes gracefully

From that (and a few other indications), I can report back after only an
hour of testing Vysor, that it appears to be more "consumer focused" than
scrcpy is (where scrcpy is more focused on the developer or expert user).

Vysor apparently works with all phones and all desktops:
<https://youtu.be/qAHTini67GA>
Name: Vysor-win-4.1.77.exe
Size: 115651304 bytes (110 MiB)
SHA256: 0984A30C0BC1A76376D675C92CEC47725E16A9A6A5816A39FB8C7124BCA50DC7

The free version can do these two things which we've been discussing:
a. Mirror and Control iOS/Android
b. Screenshots

Their payware version has more functionality (which we had in scrcpy):
<https://www.vysor.io/#pricing>
High Quality Mirroring
Fullscreen Mode
Go Wireless
Vysor Share
Drag and Drop Files
--
Usenet is a huge community of kind hearted people who help each other learn.

Re: Is there a way to put a command window in the background like Linux does (so that you can kill it)?

<t4h1nv$99d$1@gioia.aioe.org>

 copy mid

https://www.novabbs.com/devel/article-flat.php?id=198&group=alt.msdos.batch#198

 copy link   Newsgroups: alt.comp.os.windows-10 alt.msdos.batch alt.comp.microsoft.windows
Path: i2pn2.org!i2pn.org!aioe.org!Gj+613xB9sVIQxAtFideEw.user.46.165.242.75.POSTED!not-for-mail
From: spa...@nospam.com (Andy Burnelli)
Newsgroups: alt.comp.os.windows-10,alt.msdos.batch,alt.comp.microsoft.windows
Subject: Re: Is there a way to put a command window in the background like Linux does (so that you can kill it)?
Date: Fri, 29 Apr 2022 16:54:57 +0100
Organization: Aioe.org NNTP Server
Message-ID: <t4h1nv$99d$1@gioia.aioe.org>
References: <t3s52e$1ddc$1@gioia.aioe.org> <t418v5$tug$1@toylet.eternal-september.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Info: gioia.aioe.org; logging-data="9517"; posting-host="Gj+613xB9sVIQxAtFideEw.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.6.1
Content-Language: en-GB
X-Notice: Filtered by postfilter v. 0.9.2
 by: Andy Burnelli - Fri, 29 Apr 2022 15:54 UTC

Mr. Man-wai Chang wrote:

> On 22/4/2022 1:42 am, Andy Burnelli wrote:
>> Is there a way to put a command window in the background like Linux does
>> with the ampersand (so that you can kill the window but not the process)?
>>
>> The problem that I have is I run a lot of commands from the Run icon in my
>> taskbar which bring up command windows to run scxripts but which leave
>> the unnecessary command window sitting around (which can be iconified).
>> <https://i.postimg.cc/Y00vx4yp/scrcpy04.jpg> Extraneous cmd window (&)
>
> Using a freeware like Trayit?

While the problem has been solved using multiple methods, and while we already
learned how to additionally (theoretically anyway) connect both iOS & Android to
Windows, we always strive to learn from everyone in every Usenet post, by design.

Since you sugegsted "Trayit", it behooves me to learn what the heck it is.
<https://www.google.com/search?q=windows+software+what+is+trayit>

First result:
*What is TrayIt?*
<https://quick-adviser.com/what-is-trayit/>
"TrayIt! is a small free utility that allows you to minimize any program
to the Windows tray rather than the Windows taskbar. TrayIt... can set
any window or application to minimize to the task tray and still
continue to run."

This sounds useful! Thanks for your kind-hearted purposefully helpful advice!

As often occurs, a simple search also found other programs similar to TrayIt!
*Using RBtray to Quickly Minimize Almost Any Window to Tray*
<https://www.online-tech-tips.com/windows-10/how-to-minimize-a-windows-program-to-the-system-tray/>

Thanks for teaching me (and others) on Usenet how to fish!
<http://rbtray.sourceforge.net/>

As with many freeware implementations, the sheisters abound, so it takes a
while to pluck out the canonical trusted site among the many others...
<https://www.teamcti.com/trayit/trayit.htm>

Given I already have multiple solutions, I will test this out when I get
the chance because if you took the time to suggest it, I will test it.

Here are the files I downloaded for testing TrayIt! & RBtray:
Name: trayit_4_6_5_5.zip
Size: 335253 bytes (327 KiB)
SHA256: 5B086BF87AFF1DC4F9D371A20CD929DBE2EAA156F43D4B40ECB9170F1868618E
Directory of C:\archive\os\taskbar\trayit\trayit_4_6_5_5\trayit_4_6_5_5
04/29/2022 04:40 PM <DIR> .
04/29/2022 04:40 PM <DIR> ..
04/29/2022 04:40 PM <DIR> lang
04/29/2022 04:40 PM 2,914 readme.txt
04/29/2022 04:40 PM 1,332 translation.txt
04/29/2022 04:40 PM 204,800 TrayIt!.exe
04/29/2022 04:40 PM 3,479 TrayIt!.std
04/29/2022 04:40 PM 7,680 trayit4!.dll
5 File(s) 220,205 bytes
3 Dir(s) 68,597,497,856 bytes free
Name: TrayIt!.exe
Size: 204800 bytes (200 KiB)
SHA256: 5F5C2DDC5531AD796ADD91D7882FA4AFB437468B5F37454FA4BB3729E93E7668

Name: TrayIt!.exe
Size: 204800 bytes (200 KiB)
SHA256: 5F5C2DDC5531AD796ADD91D7882FA4AFB437468B5F37454FA4BB3729E93E7668

Name: trayit4!.dll
Size: 7680 bytes (7 KiB)
SHA256: 5366F447CE37EE206E06A6C50642279B8BE56D337D7225D9B1AD7FB410D9B8E3

And here are the files I downloaded for testing the FOSS RBTray software:
http://rbtray.sourceforge.net/
https://sourceforge.net/projects/rbtray/files/rbtray/4.3/RBTray-4_3.zip/download
https://versaweb.dl.sourceforge.net/project/rbtray/rbtray/4.3/RBTray-4_3.zip

Name: RBTray-4_3.zip
Size: 93156 bytes (90 KiB)
SHA256: 4FCC384437F753861D66B5BD58D607092AABE1DE8CC8392271A8872B86133EC2

Directory of C:\archive\os\taskbar\trayit\RBTray-4_3\64bit
04/29/2022 04:44 PM <DIR> .
04/29/2022 04:44 PM <DIR> ..
04/29/2022 04:44 PM 38,912 RBHook.dll
04/29/2022 04:44 PM 45,568 RBTray.exe
2 File(s) 84,480 bytes
2 Dir(s) 68,615,860,224 bytes free
Name: RBTray.exe
Size: 45568 bytes (44 KiB)
SHA256: 2990B379EAB81753EDE04D017BE30AD6381835C0531BE4AA66C56D4E91122417

Name: RBHook.dll
Size: 38912 bytes (38 KiB)
SHA256: B181FB71DEAC6BEEAC564019815DB636AACF71291A1DDF20FD14E23246AE637E
--
Usenet is where well-educated intelligent friendly people daily gather to
discuss topics of interest and to help learn from each other every day.

Re: Is there a way to put a command window in the background like Linux does (so that you can kill it)?

<t4h4te$1rks$1@gioia.aioe.org>

 copy mid

https://www.novabbs.com/devel/article-flat.php?id=199&group=alt.msdos.batch#199

 copy link   Newsgroups: alt.comp.os.windows-10 alt.msdos.batch alt.comp.microsoft.windows
Path: i2pn2.org!i2pn.org!aioe.org!Gj+613xB9sVIQxAtFideEw.user.46.165.242.75.POSTED!not-for-mail
From: spa...@nospam.com (Andy Burnelli)
Newsgroups: alt.comp.os.windows-10,alt.msdos.batch,alt.comp.microsoft.windows
Subject: Re: Is there a way to put a command window in the background like Linux does (so that you can kill it)?
Date: Fri, 29 Apr 2022 17:49:04 +0100
Organization: Aioe.org NNTP Server
Message-ID: <t4h4te$1rks$1@gioia.aioe.org>
References: <t3s52e$1ddc$1@gioia.aioe.org> <20220421204315.03ff044cdeef898a513382f1@127.0.0.1> <t3sgg5$j9f$1@gioia.aioe.org> <t3sk11$1snj$1@gioia.aioe.org> <t3sv4a$1489$1@gioia.aioe.org> <t3tfe4$1o5j$1@gioia.aioe.org> <t3tp6t$1njd$1@gioia.aioe.org> <t3u478$tfu$1@gioia.aioe.org> <t3v6h6$ol9$1@gioia.aioe.org> <t408to$pcd$1@gioia.aioe.org> <t40rr2$93a$1@gioia.aioe.org> <t414hd$1ncm$1@gioia.aioe.org> <t4193j$1luf$1@gioia.aioe.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Info: gioia.aioe.org; logging-data="61084"; posting-host="Gj+613xB9sVIQxAtFideEw.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.6.1
Content-Language: en-GB
X-Notice: Filtered by postfilter v. 0.9.2
 by: Andy Burnelli - Fri, 29 Apr 2022 16:49 UTC

Andy Burnelli wrote:

>> I don't understand why you want to hide the console,
>
> That worked like a charm!
> <https://i.postimg.cc/CxXH6N2r/scrcpy13.jpg>

UPDATE:
(Since that's part of learning and key to paying back for the kind help!)
This morning I found out a rather useful feature of the (Vysor) console!
<https://i.postimg.cc/c4Wq5x9j/scrcpy22.jpg> Vysor IP address option

I've been using _both_ the scrcpy Android mirroring & then hiding of the
console along with Vysor (which is designed to easily hide the console)
when I suddenly realized there is at least one very good _reason_ you might
want the [Vysor] console (as illustrated in this case below from today).

I was setting up my spare iOS devices as as a remote wildlife camera
outside at the barn but since the Apple Mobile Device Software won't
install, I am temporarily using my Android instead of my spare iPad.

The result of the distance was connecting to a _different_ access point
(of which I have many sprinkled about the house, the barn, the pool, etc.)
<https://i.postimg.cc/XJChDCPr/spare-access-points.jpg> My home Wi-Fi APs

That caused the phone IP address to change from what it has been all along.
And yet, the scrcpy scripts I've been using have the IP address hard coded.

The result was that my scrcpy scripts (which worked wonderfully with a
static IP address) failed to work - but the Vysor GUI has an IP option!
<https://i.postimg.cc/c4Wq5x9j/scrcpy22.jpg> Vysor IP address option

The point here is that it's nice, to sometimes have that (Vysor) console
GUI (at least until everything is up and running with the right IP address)
because it allows me to choose the IP address of the device to mirror.

BTW, in terms of always striving to not only solve the problem, and not
only to help others solve the problem, but to also add increased value, I
will test the suggestion from Mr. Man-wai Chang to try these tray utils:
<https://groups.google.com/g/alt.msdos.batch/c/DmexCLwn_tM/m/UT1MXgrsAAAJ>
--
On Usenet, intelligent purposefully helpful kind-hearted volunteers staff
the helpdesk which I will then strive to increase value by way of payback.

Re: Is there a way to put a command window in the background like Linux does (so that you can kill it)?

<tb0osl$1tl1$1@gioia.aioe.org>

 copy mid

https://www.novabbs.com/devel/article-flat.php?id=221&group=alt.msdos.batch#221

 copy link   Newsgroups: alt.comp.os.windows-10 alt.msdos.batch alt.comp.microsoft.windows
Path: i2pn2.org!i2pn.org!aioe.org!YJ9T4Jrl0F+pWyDRfaeX/g.user.46.165.242.75.POSTED!not-for-mail
From: spa...@nospam.com (Andy Burnelli)
Newsgroups: alt.comp.os.windows-10,alt.msdos.batch,alt.comp.microsoft.windows
Subject: Re: Is there a way to put a command window in the background like Linux does (so that you can kill it)?
Date: Sun, 17 Jul 2022 11:39:47 +0100
Organization: Aioe.org NNTP Server
Message-ID: <tb0osl$1tl1$1@gioia.aioe.org>
References: <t3s52e$1ddc$1@gioia.aioe.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Info: gioia.aioe.org; logging-data="63137"; posting-host="YJ9T4Jrl0F+pWyDRfaeX/g.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.6.1
X-Notice: Filtered by postfilter v. 0.9.2
Content-Language: en-GB
 by: Andy Burnelli - Sun, 17 Jul 2022 10:39 UTC

UPDATE:

You _never_ need USB cable ever again!

This is a PSA update to this thread which was solved a while ago,
but where I've been using it daily and have a couple of improvements.
<https://i.postimg.cc/k5gv0yw8/vysor34.jpg> Apple iOS & Android mirroring

The first improvement is huge, which is that Android 12 (maybe Android 11?)
has the hidden Developer option for "Wireless debugging" which eliminates
completely the need for a USB cable to connect to Windows.
<https://i.postimg.cc/SRRXtvKh/adb16.jpg> Android 12 Wireless Debugging

You can keep the phone in your pocket or on your desk, or better yet,
on your wired or wireless charger, and you'll _never_ need that USB
cable ever again to interface with Windows in any way you'd like to.
<https://i.postimg.cc/wvsbcNBz/scrcpy05.jpg> Drag APK from Windows

That is, without ever needing USB...
1. You can mirror Android/iOS over the random-assigned port
<https://i.postimg.cc/TYvqdxCT/vysor35.jpg> iOS & Android PC mirroring
2. And you can mount the Android phone as a drive letter
<https://i.postimg.cc/BvJdKWzt/webdav06.jpg> Android as a drive letter
3. WITHOUT needing to run any adb-pairing steps
<https://i.postimg.cc/SRRXtvKh/adb16.jpg> Android 12 Wireless Pairing

The tools I've been using for a few months to mirror over Wi-Fi are:
a. Vysor (I use this daily, as scrcpy is flakier than is Vysor for me)
b. Scrcpy (I use this when I need better resolution than Vysor gives me)
<https://i.postimg.cc/rmBHmvtV/adb18.jpg> Windows adb vysor & scrcpy

And the tools I use for mounting Android as a drive letter are:
a. WebDAV (I use this daily to mount the _entire_ phone as two drives
b. FTPUse (I don't use it though as it's flakier than WebDAV for me)
<https://www.ferrobackup.com/map-ftp-as-disk.html>

Notice a few details which take time to figure out:
A. Android 12 has a secret hidden Wireless debugging pulldown tile
<https://i.postimg.cc/qRhkhTwV/adb21.jpg> Hidden Wireless-debugging tile
B. Using that tile, Vysor will AUTOMATICALLY figure out the random port!
(Phone) Turn on Wi-Fi
(Phone) Connect to a Wi-Fi AP
(Phone) Turn 'Developer options' 'Wireless debugging = on'
(Phone) Tap "Allow" if it asks to
"Allow wireless debugging on this network?"
Which will be for a specific SSID & (usually random) BSSID.
(PC) C:\> vysor.exe (and then press on the red arrow)
That connects you to adb over the random port on Wi-Fi
without needing to run the new Android 12 adb pairing commands!
<https://i.postimg.cc/ZK9B82gP/adb15.jpg> adb pair [IP][Port] [code]
C. This Windows command tells you which random port adb is using:
C:\> netstat -ano -p tcp | findstr "192.168.0.2"
D. That random port is IMPORTANT to put in the scrcpy batch file
that Herbert kindly wrote which enables the console to be killed.
(see batch file in the sig)
E. Of course, you can get that random port from the phone itself
(but Vysor automatically figures it out - but scrcpy does not
figure out that randomly assigned port, as far as I know).
F: Vysor will also automatically install Vysor on Android temporarily!
<https://i.postimg.cc/Njg6Xx3V/vysor33.jpg> Preparing Vysor on device
G: If the adb connection gets confused (it sometimes happens):
(PC) C:\> adb kill-server
(PC) C:\> vysor.exe (and then press on the red arrow after about 30 seconds)
Note Vysor is magical in figuring out what port adb is using!
H. The free vysor.exe is lower resolution than the free scrcpy.exe
<https://i.postimg.cc/CLyK8z9v/adb20.jpg> Both vysor & scrcpy use adb
I. You need _two_ WebDAV servers to mount the internal & external sdcards
<https://i.postimg.cc/BvJdKWzt/webdav06.jpg> Android as a drive letter
sdcard0 (Using "WebDav Server" as the free WebDAV server on Android)
C:\> net use Y: \\192.168.0.2@8080\DavWWWRoot /USER:foo bar
*WebDAV Server - BestDAV" by ZQ Software
Free, no ads, no GSF, rated 3.4, 100+ reviews, 10K+ downloads
<https://play.google.com/store/apps/details?id=com.zq.webdav.app_free>
Pro: Works well, no ads, no gsf, autostarts upon reboot
Con: Slightly harder to set up as it requires full paths

sdcard1 (Using "Olive Tree" as the free WebDAV server on Android)
C:\> net use Z: \\192.168.0.2@8081\DavWWWRoot /USER:foo bar
*WebDAV Server* by The Olive Tree
Free, has ads, requires GSF, rated 3.5, 800+ reviews, 100K+ downloads
<https://play.google.com/store/apps/details?id=com.theolivetree.webdavserver>
Pro: Works well, slightly easier to set up
Con: ads, gsf, and won't autostart on reboot

In summary, above are some hints as a kind-hearted PSA to help all
of those who helped everyone write the batch code in this thread!

I always strive to pay back for all the help that I received from you!
--
@echo off

cd /d "c:\app\editor\android\scrcpy"
certutil -f -decode %~f0 showwin.exe>nul
REM Port 5555 was needed when you established adb connections over USB
REM And then you disconnected the USB cable to subsequently work on Wi-Fi
REM But as of Android 11 or 12, you can establish the connection over Wi-Fi
REM But that "Developer option" "Wireless debugging" port is random!
REM So you have to get it on Android or on Windows to know what it is

REM You can get the current assigned port from the following command
REM c:\> netstat -ano -p tcp | findstr "192.168.1.10"

REM adb connect 192.168.1.10:5555
adb connect 192.168.1.10:45299

:: now we hide console window
showwin.exe 0

REM scrcpy --always-on-top --tcpip=192.168.1.10:5555
scrcpy --always-on-top --tcpip=192.168.1.10:45299

:: after scrcpy is closed we show console window again
showwin.exe 5

del showwin.exe
goto :eof

-----BEGIN CERTIFICATE-----
TVpgAQEAAAAEAAAA//8AAGABAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAoAAAAA4fug4AtAnNIbgBTM0hTmljZSB0byBtZWV0IHNvbWVi
b2R5IHdobyBpcyBzdGlsbCB1c2luZyBET1MsDQpidXQgdGhpcyBwcm9ncmFtIHJl
cXVpcmVzIFdpbjMyLg0KJFBFAABMAQEAUHmlNgAAAAAAAAAA4AAPAQsBBQwAAgAA
AAAAAAAAAADIEAAAABAAAAAgAAAAAEAAABAAAAACAAAFAAAAAAAAAAQAAAAAAAAA
ACAAAAACAAAAAAAAAwAAAAAAEAAAEAAAAAAQAAAQAAAAAAAAEAAAAAAAAAAAAAAA
GBAAADwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAYAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAALnRleHQAAAAmAQAAABAAAAACAAAAAgAA
AAAAAAAAAAAAAAAAIAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABoEAAAAAAAAJQQAACmEAAA
uhAAAAAAAABgEAAAAAAAAAAAAABUEAAAABAAAIQQAAAAAAAAAAAAAHYQAAAIEAAA
AAAAAAAAAAAAAAAAAAAAAAAAAABVU0VSMzIuZGxsAABoEAAAAAAAAAAAU2hvd1dp
bmRvdwAAS0VSTkVMMzIuZGxsAACUEAAAphAAALoQAAAAAAAAAABHZXRDb21tYW5k
TGluZUEAAABHZXRDb25zb2xlV2luZG93AAAAAEV4aXRQcm9jZXNzAP8VCBBAADHS
SECAOAB0EYA4InUC99IJ0nXvgDggdepAMfa9BQAAAA+2EEAI0nQTgOowcvOA+gl3
7mv2CgHWMe3r5QntdAKJ7v8VDBBAAFZQ/xUAEEAAagD/FRAQQAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAA==
-----END CERTIFICATE-----

Re: Is there a way to put a command window in the background like Linux does (so that you can kill it)?

<tb195g$2vkgf$1@news.xmission.com>

 copy mid

https://www.novabbs.com/devel/article-flat.php?id=222&group=alt.msdos.batch#222

 copy link   Newsgroups: alt.comp.os.windows-10 alt.msdos.batch alt.comp.microsoft.windows
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!xmission!nnrp.xmission!.POSTED.shell.xmission.com!not-for-mail
From: gaze...@shell.xmission.com (Kenny McCormack)
Newsgroups: alt.comp.os.windows-10,alt.msdos.batch,alt.comp.microsoft.windows
Subject: Re: Is there a way to put a command window in the background like Linux does (so that you can kill it)?
Date: Sun, 17 Jul 2022 15:17:04 -0000 (UTC)
Organization: The official candy of the new Millennium
Message-ID: <tb195g$2vkgf$1@news.xmission.com>
References: <t3s52e$1ddc$1@gioia.aioe.org> <tb0osl$1tl1$1@gioia.aioe.org>
Injection-Date: Sun, 17 Jul 2022 15:17:04 -0000 (UTC)
Injection-Info: news.xmission.com; posting-host="shell.xmission.com:166.70.8.4";
logging-data="3133967"; mail-complaints-to="abuse@xmission.com"
X-Newsreader: trn 4.0-test77 (Sep 1, 2010)
Originator: gazelle@shell.xmission.com (Kenny McCormack)
 by: Kenny McCormack - Sun, 17 Jul 2022 15:17 UTC

In article <tb0osl$1tl1$1@gioia.aioe.org>,
Andy Burnelli <spam@nospam.com> wrote:
>UPDATE:
>
>You _never_ need USB cable ever again!

I fail to see how the Subject line:

Is there a way to put a command window in the background like Linux
does (so that you can kill it)?

has anything whatsoever to do with USB cables.

--
http://www.rollingstone.com/politics/news/the-10-dumbest-things-ever-said-about-global-warming-20130619

Re: Is there a way to put a command window in the background like Linux does (so that you can kill it)?

<tb2s35$o54$1@gioia.aioe.org>

 copy mid

https://www.novabbs.com/devel/article-flat.php?id=223&group=alt.msdos.batch#223

 copy link   Newsgroups: alt.comp.os.windows-10 alt.msdos.batch alt.comp.microsoft.windows
Path: i2pn2.org!i2pn.org!aioe.org!YJ9T4Jrl0F+pWyDRfaeX/g.user.46.165.242.75.POSTED!not-for-mail
From: spa...@nospam.com (Andy Burnelli)
Newsgroups: alt.comp.os.windows-10,alt.msdos.batch,alt.comp.microsoft.windows
Subject: Re: Is there a way to put a command window in the background like Linux does (so that you can kill it)?
Date: Mon, 18 Jul 2022 06:46:43 +0100
Organization: Aioe.org NNTP Server
Message-ID: <tb2s35$o54$1@gioia.aioe.org>
References: <t3s52e$1ddc$1@gioia.aioe.org> <tb0osl$1tl1$1@gioia.aioe.org> <tb195g$2vkgf$1@news.xmission.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Info: gioia.aioe.org; logging-data="24740"; posting-host="YJ9T4Jrl0F+pWyDRfaeX/g.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.6.1
X-Notice: Filtered by postfilter v. 0.9.2
Content-Language: en-GB
 by: Andy Burnelli - Mon, 18 Jul 2022 05:46 UTC

Kenny McCormack wrote:

> I fail to see how the Subject line:
>
> Is there a way to put a command window in the background like Linux
> does (so that you can kill it)?
>
> has anything whatsoever to do with USB cables.

I'll answer your question, in detail, with an easily understood real-life
example that highlights why, at the beginning of a quest, you can't always
foresee the solution well enough to ask specifically, at the beginning, for
the exact solution you'll choose as the best solution to the problem set.

I live in mountains where they don't want people to live, so they have
40-acre zoning (meaning you can only put up one house on 79 acres), and we
don't even have Internet on the power poles (everything is WISP), nor any
public utilities other than power & phone (which few people use nowadays).

As a result of living in the boonies, I ensure my cellphone has the
necessary tools to do what I need it to do, without the Internet.

One example of a set of tools that must work without the Internet are the
common backcountry tools that you probably are familiar with for hiking.

Yet the problem for me is a bit different than for most people since most
people stay on the trails, yet I eschew trails like I eschew Google/Apple.

The fact is I hike.
Off trail.
A lot.

Alone.

In the mountains.
Rough mountains.
And I do it by point-to-point topographical "dead reckoning" orienteering.

OK. So now you know the problem set, where my quest, let's say, is to find
a suitable set of free ad free gsf free tools that enable efficient hiking.

What's my question?
Well, for one, there are tools you can easily _predict_ you'll need, right?

Did you ever use the tools you had on your phone to get to a point in the
mountains that is only, oh, say, a short distance as the crow flies & you
have a pretty good idea of what tools you'll need to get there....such as:
a. A compass & location reader (that doesn't rely in the Internet)
b. An altimeter (that doesn't rely in the Internet)
c. A wayfinder (that doesn't rely in the Internet)
d. A track logger with photos (that doesn't rely in the Internet)
e. A custom topographical geoPDF (that doesn't rely in the Internet)
f. An app that handles any custom topographical geoPDF (no Internet)

For example, below are _excellent_ free ad free tools for each of those
tasks where _none_ of that freeware reports your privacy or uses cellular.
a. <https://gitlab.com/mvglasow/satstat>
b. <https://play.google.com/store/apps/details?id=com.mirkix.barometer>
c. <https://play.google.com/store/apps/details?id=com.keuwl.gpswaypoints>
d. <https://f-droid.org/en/packages/de.dennisguse.opentracks/>
e. <https://www.usgs.gov/programs/national-geospatial-program/topographic-maps>
f. <https://play.google.com/store/apps/details?id=com.Avenza>

But wait.... while on the hike, you realized those plans didn't survive
contact in that you didn't realize you also may need more tools than that.
g. A custom geopdf application that handles more than 3 USGS quadrangles
h. A quick tap-to-save getback application when exploring around obstacles
i. An emergency sms location reporter (in case you break a leg on a cliff)
j. A cellular signal strength monitor (to test for emergency communication)

Needing more solutions, you ask on the Usenet for a cellular signal
strength monitor and, at first, you get the answer to use Cellular-Z.

But wait, you asked on Usenet for a cellular signal monitor but what you
asked for was the wrong thing because you don't have the luxury of looking
at a screen constantly, so what you really should have asked for, which
comes out in the thread, is for a signal strength "pinger" that gives an
audible alarm when you lose cellular signal (it works without looking).
k. A cellular-signal pinger that pings while the phone is in your pocket

But when you try that pinger, you realize it doesn't tell you anything
about cellular _data_ signal, which is a _different_ tool altogether:
l. A cellular _data_ connection notification app

The point is that you don't know what tools you'll need at the _start_ of
the quest... where solutions you'll need may morph over time to add...
g. <https://play.google.com/store/apps/details?id=ca.abbro.androidmap>
h. <https://github.com/ruleant/getback_gps>
i. <https://play.google.com/store/apps/details?id=ru.perm.trubnikov.gps2sms>
j. <https://play.google.com/store/apps/details?id=make.more.r2d2.cellular_z>
k. <https://play.google.com/store/apps/details?id=com.simple.axanor.simpleconnectivitymonitor>
l. <https://play.google.com/store/apps/details?id=com.gordienoye.cellulardatanotifier>

Notice at the start you didn't even realize what you really needed wasn't a
graphical cellular signal strength monitor per se, but audible apps to let
you know while the phone is in your pocket when you had no signal strength
for phone calls and/or for SMS/MMS texts.

What you are attempting to do is hold me to that longer list, based solely
on experience, when I planned ahead as best I could but I didn't know then
what I know now as to the final set of solutions which solve the problem.

For example, I know I want to _draw_ a GPX track by hand, but I don't know
of _any_ smartphone freeware that does that, so I resort to online freeware
such as Caltopo online mapping tools which allow you to draw a track on an
accurate topographic map and then export that track to use on your phone.
<https://caltopo.com/map.html#ll=38.80547,-98.39355&z=5&b=mbt>

But then I might find out that I don't have a program on the smartphone
that will give _directions_ based on that imported GPX track (e.g., it
might alert you "Go west for 100 feet to get back onto the desired track").

What you ask for in a Usenet thread is based only on what you can plan for.

Even after all that planning and adjusting and improving the solution, you
may find that you also need a fake gps spoofer, perhaps in order to more
easily tell specific apps any desired given location without having to
laboriously _type_ latitude/longitude coordinates in, such as this app:
<https://play.google.com/store/apps/details?id=com.lexa.fakegps>

But then you find out that you need to set Android Developer options
"Mock location app" to that app, which entails deeper knowledge of the
inner workings of Android to get the app to work within your hiking plan.
<https://www.virtuallocation.com/fake-location/allow-mock-locations.html>

In summary, when you are solving problems that nobody else has ever solved
(which we did in this thread), you don't know at the start of the quest
what tools you will end up as your final efficient working solution.

When you _do_ find the tools though, it's basic Internet courtesy to give
back to the team added value by way of what solution worked best for you.
--
This response is a well-researched answer to Kenny McCormack's question,
because Kenny seems to think we should always know the solution we are
going to end up with _before_ we ask the question on this Usenet group.

Re: Is there a way to put a command window in the background like Linux does (so that you can kill it)?

<20220718082046.f114b037375a2e5823aea973@127.0.0.1>

 copy mid

https://www.novabbs.com/devel/article-flat.php?id=224&group=alt.msdos.batch#224

 copy link   Newsgroups: alt.comp.os.windows-10 alt.msdos.batch alt.comp.microsoft.windows
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: adm...@127.0.0.1 (Kerr-Mudd, John)
Newsgroups: alt.comp.os.windows-10,alt.msdos.batch,alt.comp.microsoft.windows
Subject: Re: Is there a way to put a command window in the background like
Linux does (so that you can kill it)?
Date: Mon, 18 Jul 2022 08:20:46 +0100
Organization: Dis
Lines: 36
Message-ID: <20220718082046.f114b037375a2e5823aea973@127.0.0.1>
References: <t3s52e$1ddc$1@gioia.aioe.org>
<tb0osl$1tl1$1@gioia.aioe.org>
<tb195g$2vkgf$1@news.xmission.com>
<tb2s35$o54$1@gioia.aioe.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Injection-Info: reader01.eternal-september.org; posting-host="5aab7528c9853076fe291ef867f6f3ee";
logging-data="234031"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18103CiAy1LyfQOIEGh3e+IlqRco4YADGU="
Cancel-Lock: sha1:RXhy0BUVmkZCkQKQme9OYr6FWjw=
;X-no-Archive: Maybe
X-Newsreader: Sylpheed 3.7.0 (GTK+ 2.24.30; i686-pc-mingw32)
GNU: Terry Pratchett
 by: Kerr-Mudd, John - Mon, 18 Jul 2022 07:20 UTC

On Mon, 18 Jul 2022 06:46:43 +0100
Andy Burnelli <spam@nospam.com> wrote:

> Kenny McCormack wrote:
>
> > I fail to see how the Subject line:
> >
> > Is there a way to put a command window in the background like Linux
> > does (so that you can kill it)?
> >
> > has anything whatsoever to do with USB cables.
>
> I'll answer your question, in detail, with an easily understood real-life

[Massive snipping]

> In summary, when you are solving problems that nobody else has ever solved
> (which we did in this thread), you don't know at the start of the quest
> what tools you will end up as your final efficient working solution.
>
> When you _do_ find the tools though, it's basic Internet courtesy to give
> back to the team added value by way of what solution worked best for you.
> --
> This response is a well-researched answer to Kenny McCormack's question,
> because Kenny seems to think we should always know the solution we are
> going to end up with _before_ we ask the question on this Usenet group.

That's a lot of words. I guess the actual answer is that it doesn't have
anything to do with the actual wording of the Original Question, and is
now well off-topic for amb (and pretty much so for windows too, as it seems
the topic is now "how do I access (some poweruser mode) in Android"

Glad you got to where you wanted to, though.

--
Bah, and indeed Humbug.

Re: Is there a way to put a command window in the background like Linux does (so that you can kill it)?

<tb33nb$1pev$1@gioia.aioe.org>

 copy mid

https://www.novabbs.com/devel/article-flat.php?id=225&group=alt.msdos.batch#225

 copy link   Newsgroups: alt.comp.os.windows-10 alt.msdos.batch alt.comp.microsoft.windows
Path: i2pn2.org!i2pn.org!aioe.org!YJ9T4Jrl0F+pWyDRfaeX/g.user.46.165.242.75.POSTED!not-for-mail
From: spa...@nospam.com (Andy Burnelli)
Newsgroups: alt.comp.os.windows-10,alt.msdos.batch,alt.comp.microsoft.windows
Subject: Re: Is there a way to put a command window in the background like Linux does (so that you can kill it)?
Date: Mon, 18 Jul 2022 08:56:57 +0100
Organization: Aioe.org NNTP Server
Message-ID: <tb33nb$1pev$1@gioia.aioe.org>
References: <t3s52e$1ddc$1@gioia.aioe.org> <tb0osl$1tl1$1@gioia.aioe.org> <tb195g$2vkgf$1@news.xmission.com> <tb2s35$o54$1@gioia.aioe.org> <20220718082046.f114b037375a2e5823aea973@127.0.0.1>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Info: gioia.aioe.org; logging-data="58847"; posting-host="YJ9T4Jrl0F+pWyDRfaeX/g.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.6.1
X-Notice: Filtered by postfilter v. 0.9.2
Content-Language: en-GB
 by: Andy Burnelli - Mon, 18 Jul 2022 07:56 UTC

Kerr-Mudd, John wrote:

> Glad you got to where you wanted to, though.

Sigh. The effort spent on providing an analogy failed. :(
So I'll have to simply spell out what is obvious to all who understood.

This is what happened...

1. *I asked to put a process in the background so I could kill it.*
2. *The team came up with a Windows batch method that killed the console.*
3. *That method worked fine with USB cables as the port was fixed at 5555.*

However...
4. *Unfortunately, the Wi-Fi method _requires_ prior knowledge of the*
*constantly changing Android Wireless debugging port assignment.*

OK... now _this_ is the important point for Windows batch processing!
a. *So, for USB, the batch file works fine (as the port is static!).*
b. *But for Wi-Fi, the batch file random port has to be changed daily.*

Do the basic details of the problem set sink in yet?

Clearly, my recent update gave _how_ to obtain that IP address and port
information (whether or not Curmudgeon or McCormick understood that fact).

What _both_ of those trolls clearly didn't do was _read_ the thread.
Of, if they did, they didn't comprehend a word that was said in the thread.

They both posted without even thinking about what the thread was about.
Even as they complained that they didn't understand what it was about.

It's not my fault they don't understand the progress we made in this
thread, nor is it my fault that they don't understand that the port is
static for USB but dynamic for Wi-Fi (which is a big deal in a script!).

Nonetheless, that's water under the bridge now that I've EXPLAINED to both
of them what they failed to grasp (first in analogy, second in actuality).

Moving forward...

BTW, what I'm working on now, to _improve_ that process, is determining
_how_ Vysor.exe figures out the Android port but why Scrcpy.exe does not.

That's critical to put in the batch script:
_Q: How does Vysor know the adb port but scrcpy does not know it?_

If I can figure _that_ out, then there is no longer a need to add the
explicit IP address and port to the Wi-Fi version of the scrcpy batch file
originally written by Herbert (note that the USB version doesn't have that
problem because the USB version of Herbert's scrcpy batch script only needs
the port 5555 in all cases - but the Wi-Fi version uses random ports!).

If the analogy failed, did the direct 4-step explanation sink in yet?
--
HINT: See the actual resulting batch file added in the prior sig,
which was posted to be provide in comments why daily modification is needed
when on Wi-Fi even as Herbert's batch file worked fine being static on USB.

Re: Is there a way to put a command window in the background like Linux does (so that you can kill it)?

<tb9itm$s8t$1@gioia.aioe.org>

 copy mid

https://www.novabbs.com/devel/article-flat.php?id=226&group=alt.msdos.batch#226

 copy link   Newsgroups: alt.comp.os.windows-10 alt.msdos.batch alt.comp.microsoft.windows
Path: i2pn2.org!i2pn.org!aioe.org!3PLzD/rb74ta/CXxNcmbeA.user.46.165.242.75.POSTED!not-for-mail
From: spa...@nospam.com (Andy Burnelli)
Newsgroups: alt.comp.os.windows-10,alt.msdos.batch,alt.comp.microsoft.windows
Subject: Re: Is there a way to put a command window in the background like Linux does (so that you can kill it)?
Date: Wed, 20 Jul 2022 19:53:06 +0100
Organization: Aioe.org NNTP Server
Message-ID: <tb9itm$s8t$1@gioia.aioe.org>
References: <t3s52e$1ddc$1@gioia.aioe.org> <tb0osl$1tl1$1@gioia.aioe.org> <tb195g$2vkgf$1@news.xmission.com> <tb2s35$o54$1@gioia.aioe.org> <20220718082046.f114b037375a2e5823aea973@127.0.0.1>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Info: gioia.aioe.org; logging-data="28957"; posting-host="3PLzD/rb74ta/CXxNcmbeA.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.6.1
Content-Language: en-GB
X-Notice: Filtered by postfilter v. 0.9.2
 by: Andy Burnelli - Wed, 20 Jul 2022 18:53 UTC

Kerr-Mudd, John wrote:

> That's a lot of words. I guess the actual answer is that it doesn't have
> anything to do with the actual wording of the Original Question, and is
> now well off-topic for amb (and pretty much so for windows too, as it seems
> the topic is now "how do I access (some poweruser mode) in Android"

Woo hoo!

*IMPORTANT UPDATE* to work around the total absence of 'Ctrl-Z,bg'!
<https://i.postimg.cc/zfLp8b2v/adb22.jpg> New 'Ctrl+Z,bg' workaround

It took me days (elapsed time) to figure out this latest workaround
to the complete and utter total lack of 'Ctrl+Z,bg' in Windows.

IMHO, *it's a crime that Windows totally lacks 'Ctrl+Z,bg' functionality.*
All this effort would NOT be needed if Windows simply had 'Ctrl+Z,bg'.

Yet, the final 'Ctrl+Z,bg' solution turns out to be incredibly simple.
If you know a few of the tricks, that is, to replace 'Ctrl+Z,bg'.

This lack of 'Ctrl+Z,bg' is a horrible deficiency of Windows indeed.
1. Luckily, with your help, we created a USB 'Ctrl+Z,bg' workaround.
2. And, after testing for days, *we have a Wi-Fi 'Ctrl+Z,bg' workaround.*

This new 'Ctrl+Z,bg' workaround can now be added to the existing
'Ctrl+Z,bg' workaround batch script kindly authored by Herbert.

The USB 'Ctrl+Z,bg' workaround, which expects a static port, only need to
have added a new 'Ctrl+Z,bg' variable, e.g., %GET-RANDOM-PORT-ASSIGNMENT%

Re: Is there a way to put a command window in the background like Linux does (so that you can kill it)?

<tb9j41$usu$1@gioia.aioe.org>

 copy mid

https://www.novabbs.com/devel/article-flat.php?id=227&group=alt.msdos.batch#227

 copy link   Newsgroups: alt.comp.os.windows-10 alt.msdos.batch alt.comp.microsoft.windows
Path: i2pn2.org!i2pn.org!aioe.org!3PLzD/rb74ta/CXxNcmbeA.user.46.165.242.75.POSTED!not-for-mail
From: spa...@nospam.com (Andy Burnelli)
Newsgroups: alt.comp.os.windows-10,alt.msdos.batch,alt.comp.microsoft.windows
Subject: Re: Is there a way to put a command window in the background like Linux does (so that you can kill it)?
Date: Wed, 20 Jul 2022 19:56:29 +0100
Organization: Aioe.org NNTP Server
Message-ID: <tb9j41$usu$1@gioia.aioe.org>
References: <t3s52e$1ddc$1@gioia.aioe.org> <20220421204315.03ff044cdeef898a513382f1@127.0.0.1> <t3sgg5$j9f$1@gioia.aioe.org> <t3sk11$1snj$1@gioia.aioe.org> <t3sv4a$1489$1@gioia.aioe.org> <t3tfe4$1o5j$1@gioia.aioe.org> <t3tp6t$1njd$1@gioia.aioe.org> <t3u478$tfu$1@gioia.aioe.org> <t3v6h6$ol9$1@gioia.aioe.org> <t408to$pcd$1@gioia.aioe.org> <t40rr2$93a$1@gioia.aioe.org> <t414hd$1ncm$1@gioia.aioe.org> <t414n8$1prh$1@gioia.aioe.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Info: gioia.aioe.org; logging-data="31646"; posting-host="3PLzD/rb74ta/CXxNcmbeA.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.6.1
Content-Language: en-GB
X-Notice: Filtered by postfilter v. 0.9.2
 by: Andy Burnelli - Wed, 20 Jul 2022 18:56 UTC

Woo hoo!

*IMPORTANT UPDATE* to work around the total absence of 'Ctrl-Z,bg'
<https://i.postimg.cc/zfLp8b2v/adb22.jpg> New 'Ctrl+Z,bg' workaround

It took me days (elapsed time) to figure out this latest workaround
to the complete and utter total lack of 'Ctrl+Z,bg' in Windows.

Yet, the final solution turns out to be incredibly simple.
If you know a few of the tricks, that is.

This lack of 'Ctrl+Z,bg' is a horrible deficiency of Windows indeed.
Luckily, with your help, we created a USB 'Ctrl+Z,bg' workaround.

And, after testing for days, *we have a Wi-Fi 'Ctrl+Z,bg' workaround.*

This new 'Ctrl+Z,bg' workaround can now be added to the existing
'Ctrl+Z,bg' workaround batch script kindly authored by Herbert.

It need only be a variable, e.g., %GET-RANDOM-PORT-ASSIGNMENT%

As you may recall, the 'Ctrl+Z,bg' workaround script Herbert kindly
proposed was to solve the lack of 'Ctrl+Z,bg' in Windows given
conditions of an initial USB connection.

That initial USB connection only needed a _static_ port address.

So the previous 'Ctrl+Z,bg' workaround script worked fine as that
previous 'Ctrl+Z,bg' workaround script didn't need to query Android
for the port address.

The problem that arose in Android 11+ is the addition of Wireless
debugging which necessitated the 'Ctrl-Z,bg' workaround batch script
now knowing, a priori, what that randomly assigned wireless debugging
IP address is.

But how?
Specifically, how do you query Android WITHOUT first establishing
a connection to it (where that connection _requires_ the random port!).

Seemingly that's impossible, right?
Ah, but it's not impossible.

It took me a few days (elapsed time) to figure out how to query Android
from Windows to _obtain_, a priori, that randomly assigned IP address!

Luckily I found two Windows commands which will obtain that random port:
C:\> netstat -ano -p tcp | findstr "192.168.1.10"
C:\> adb mdns services

Below is a log file reproducing the steps in only a minute or two.
<https://i.postimg.cc/zfLp8b2v/adb22.jpg> New 'Ctrl+Z,bg' workaround
----------------------
Log file for this image: <https://i.postimg.cc/zfLp8b2v/adb22.jpg>
C:\app\editor\android\scrcpy>netstat -ano -p tcp | findstr "192.168.1.10"

C:\app\editor\android\scrcpy>adb shell "ifconfig|grep -A 1 wlan0|tail -n 1|cut -f2 -d:|cut -f1 -d' '"
* daemon not running; starting now at tcp:5037
* daemon started successfully
adb.exe: no devices/emulators found

C:\app\editor\android\scrcpy>adb devices
List of devices attached

C:\app\editor\android\scrcpy>adb mdns services
List of discovered mdns services

C:\app\editor\android\scrcpy>On Android, turn wi-fi on & connect to the LAN (wait a minute or two)

C:\app\editor\android\scrcpy>netstat -ano -p tcp | findstr "192.168.1.10"

C:\app\editor\android\scrcpy>adb shell "ifconfig|grep -A 1 wlan0|tail -n 1|cut -f2 -d:|cut -f1 -d' '"
adb.exe: no devices/emulators found

C:\app\editor\android\scrcpy>adb devices
List of devices attached

C:\app\editor\android\scrcpy>adb mdns services
List of discovered mdns services

C:\app\editor\android\scrcpy>Now turn on Developer options, Wireless debugging & accept the "Allow" (wait 2 min)

C:\app\editor\android\scrcpy>Note that the phone knows the address & port of 192.168.1.10:36999 (not the PC)

C:\app\editor\android\scrcpy>When the phone beeps with "Wireless debugging connected", you're ready

C:\app\editor\android\scrcpy>netstat -ano -p tcp | findstr "192.168.1.10"
TCP 192.168.1.27:49765 192.168.1.10:36999 ESTABLISHED 3208

C:\app\editor\android\scrcpy>Bingo! The PC now knows the Wireless debugging IP address & random assigned port!

C:\app\editor\android\scrcpy>adb shell "ifconfig|grep -A 1 wlan0|tail -n 1|cut -f2 -d:|cut -f1 -d' '"
192.168.1.10

C:\app\editor\android\scrcpy>Windows adb knows only the IP address (but not the randomly assigned wireless port) :(

C:\app\editor\android\scrcpy>adb devices
List of devices attached
adb-ABCEFGHIJKL-123456._adb-tls-connect._tcp. device

C:\app\editor\android\scrcpy>adb mdns services
List of discovered mdns services
adb-ABCEFGHIJKL-123456._adb-tls-connect._tcp. 192.168.1.10:36999

C:\app\editor\android\scrcpy>Ah. Nice. So Windows adb DOES know the IP address & randomly assigned wireless debug port

C:\app\editor\android\scrcpy>scrcpy.exe
scrcpy 1.24 <https://github.com/Genymobile/scrcpy>
C:\app\editor\android\scrcpy\scrcpy-server: 1 file pushed, 0 skipped. 0.8 MB/s (41159 bytes in 0.051s)
[server] INFO: Device: samsung SM-A326U (Android 12)
INFO: Renderer: direct3d
INFO: Initial texture: 720x1600

At this point you would die for a "control-Z bg" command sequence.
If that 'Ctrl+Z,bg' existed on Windows, this thread wouldn't be needed.
But alas, Windows completely lacks such a 'Ctrl+Z,bg' luxury.
Hence the need for a 'Ctrl+Z,bg' workaround batch script.

If 'Ctrl+Z,bg' existed on Windows, we would never have this problem
of querying Android from Windows to obtain the Wireless-debugging
port random assignment (because scrcpy console does NOT need it!).

But if we want to eliminate the scrcpy console, then we need to
find a workaround to the fact that Windows completely lacks a
basic 'Ctrl+Z,bg' functionality. <=== this is the problem!

Since 'Ctrl+Z,bg' does NOT exist on the PC, we need to tell
the 'Ctrl+Z,bg' workaround batch script what that randomly assigned
port is set to on Android WITHOUT looking at Android.

The 'Ctrl+Z,bg' workaround script must figure it out on its own!
Hence you must figure out the random port assignment from the PC.

Notice scrcpy with the console does NOT need to know this port.
It figures it out on its own.

So it's only the 'Ctrl+Z,bg' workaround script that NEEDS this port.
All we need now is to ADD that new 'Ctrl+Z,bg' variable to the script!

In summary, the old USB 'Ctrl+Z,bg' workaround, which expects a static port, only needs to have added a new 'Ctrl+Z,bg' variable,
e.g., %GET-RANDOM-PORT-ASSIGNMENT%

Re: Is there a way to put a command window in the background like Linux does (so that you can kill it)?

<tdhl73$gk3$1@gioia.aioe.org>

 copy mid

https://www.novabbs.com/devel/article-flat.php?id=229&group=alt.msdos.batch#229

 copy link   Newsgroups: alt.comp.os.windows-10 alt.msdos.batch alt.comp.microsoft.windows
Path: i2pn2.org!i2pn.org!aioe.org!3PLzD/rb74ta/CXxNcmbeA.user.46.165.242.75.POSTED!not-for-mail
From: spa...@nospam.com (Andy Burnelli)
Newsgroups: alt.comp.os.windows-10,alt.msdos.batch,alt.comp.microsoft.windows
Subject: Re: Is there a way to put a command window in the background like Linux does (so that you can kill it)?
Date: Wed, 17 Aug 2022 03:53:53 +0100
Organization: Aioe.org NNTP Server
Message-ID: <tdhl73$gk3$1@gioia.aioe.org>
References: <t3s52e$1ddc$1@gioia.aioe.org> <tb0osl$1tl1$1@gioia.aioe.org> <tb195g$2vkgf$1@news.xmission.com> <tb2s35$o54$1@gioia.aioe.org> <20220718082046.f114b037375a2e5823aea973@127.0.0.1> <tb9itm$s8t$1@gioia.aioe.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Info: gioia.aioe.org; logging-data="17027"; posting-host="3PLzD/rb74ta/CXxNcmbeA.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.6.1
X-Notice: Filtered by postfilter v. 0.9.2
Content-Language: en-GB
 by: Andy Burnelli - Wed, 17 Aug 2022 02:53 UTC

Andy Burnelli wrote:

> Woo hoo!
>
> *IMPORTANT UPDATE* to work around the total absence of 'Ctrl-Z,bg'!
> <https://i.postimg.cc/zfLp8b2v/adb22.jpg> New 'Ctrl+Z,bg' workaround
>
> It took me days (elapsed time) to figure out this latest workaround
> to the complete and utter total lack of 'Ctrl+Z,bg' in Windows.
>
> IMHO, *it's a crime that Windows totally lacks 'Ctrl+Z,bg' functionality.*
> All this effort would NOT be needed if Windows simply had 'Ctrl+Z,bg'.
>
> Yet, the final 'Ctrl+Z,bg' solution turns out to be incredibly simple.
> If you know a few of the tricks, that is, to replace 'Ctrl+Z,bg'.
>
> This lack of 'Ctrl+Z,bg' is a horrible deficiency of Windows indeed.
> 1. Luckily, with your help, we created a USB 'Ctrl+Z,bg' workaround.
> 2. And, after testing for days, *we have a Wi-Fi 'Ctrl+Z,bg' workaround.*
>
> This new 'Ctrl+Z,bg' workaround can now be added to the existing
> 'Ctrl+Z,bg' workaround batch script kindly authored by Herbert.
>
> The USB 'Ctrl+Z,bg' workaround, which expects a static port, only need to
> have added a new 'Ctrl+Z,bg' variable, e.g., %GET-RANDOM-PORT-ASSIGNMENT%

This quest started solely because there is no "control+Z" in Windows.

However, the result is we have a finely tuned working system without it!
a. I always give back to the team for helping me solve all the problems,
b. So here are minor updates based on daily use of Herbert's showwin.bat

*UPDATE #1:*

There is a workaround to the fact the random port address must be known:
<https://i.postimg.cc/tgvzsMRm/scrcpy25.jpg> Connect over Wi-Fi sans USB

While scrcpy.exe doesn't need any specifics once a connection is
established, there are times when you have _multiple_ devices connected.
<https://i.postimg.cc/zDCTY9NS/adb28.jpg> multiple adb connections
More so, there are two different ways to pair in the first place!
<https://i.postimg.cc/R0BXTMCy/adb29.jpg> multiple pairing connections

Then you _must_ specify _which_ device (even if they're all the same!)

It turns out scrcpy can use the "-s 192.168.0.2" or "-s SERIAL.tcp"
or "-s SERIAL" or even "--tcpip=[IP]:[PORT]" each of which makes it
easier to connect over Wi-Fi (sans USB cable) from Windows using
Herbert's excellent showwin.bat script (once you've established pairing).
<https://i.postimg.cc/SRRXtvKh/adb16.jpg> Android 12 Wireless Pairing

The scrcpy.exe can sometimes use the short form of the Android serial.
<https://i.postimg.cc/9MSg3sjj/adb33.jpg> Long and short serial formats

And scrcpy.exe can sometimes use the IP address & random port of course:
C:\> scrcpy.exe --tcpip=192.168.0.2:41269
<https://i.postimg.cc/L4bDbk6z/adb27.jpg> scrcpy --tcpip=[IP]:[PORT]

*UPDATE #2:*
There is no workaround yet to the original need for the random port
(whether you connect via "connect" or the encrypted "pair" command).

Once you've connected, scrcpy.exe does not need to know the IP address
or port or serial number or tcp address & port _if_ there one device.
<https://i.postimg.cc/Y00vx4yp/scrcpy04.jpg> Extraneous cmd window (&)

But most of the time you have multiple devices connected via adb.
And then the scrcpy.exe inside Herbert's script needs to know which one.
<https://i.postimg.cc/tgvzsMRm/scrcpy25.jpg> Connect over Wi-Fi sans USB

*UPDATE #3:*
Also note that scrcpy has _better PC resolution_ than does free vysor
<https://i.postimg.cc/xdSMtBkn/vysor36.jpg> scrcpy vs Vysor resolution

*UPDATE #4:*
Note that Vysor works with my iOS devices (but with less functionality)
<https://i.postimg.cc/TYvqdxCT/vysor35.jpg> iOS & Android PC mirroring

*UPDATE #5:*
Android 12 has mac randomization per connection - which is working fine!
<https://i.postimg.cc/nchSVcmS/vysor30.jpg> Static/Reserved IP address

*UPDATE #6:*
For weeks (elapsed time) I've tried various methods to get around pairing,
but so far, none of them works as well as _looking_ at the random port.
<https://i.postimg.cc/SRRXtvKh/adb16.jpg> Android 12 Wireless Pairing

*UPDATE #7:*
All Windows debugging commands work only _after_ you've already paired!
<https://i.postimg.cc/DZV4tcYM/adb30.jpg> Windows pairing debuggers

*UPDATE #8:*
The separate issue of accessing all of Android as a Windows drive has
been working flawlessly with the simple "net use" commands outside of adb.
<https://i.postimg.cc/9FJMKYch/scrcpy21.jpg> Windows Drive: === Android

C:\> net use Z: \\192.168.0.2@8080\DavWWWRoot /USER:foo bar
&& net use Y: \\192.168.0.2@8081DavWWWRoot /USER:foo bar
&& echo "Your Android phone is now mounted as Windows drive letters"
<https://i.postimg.cc/BvJdKWzt/webdav06.jpg> Both sdcards mounted
--
Posted to give back to the team as a good Usenet citizen who asks hard
questions which have never been asked before, and who attempts _every_
viable suggestion, and then who gives back to the team not only with the
solution but also with meticulously detailed screenshots so others benefit
from the information found in the permanent record for users to search and
find now
and far into the future.

Pages:12
server_pubkey.txt

rocksolid light 0.9.7
clearnet tor