Rocksolid Light

Welcome to Rocksolid Light

mail  files  register  newsreader  groups  login

Message-ID:  

The world is not octal despite DEC.


computers / alt.comp.os.windows-11 / show me the run line???

SubjectAuthor
* show me the run line???T
+* Re: show me the run line???VanguardLH
|+* Re: show me the run line???T
||`* Re: show me the run line???VanguardLH
|| `* Re: show me the run line???T
||  `* Re: show me the run line???Paul
||   `- Re: show me the run line???T
|+* Re: show me the run line???T
||`* Re: show me the run line???T
|| `* Re: show me the run line???Carlos E.R.
||  `* Re: show me the run line???Paul
||   `* Re: show me the run line???Carlos E.R.
||    `* Re: show me the run line???T
||     `* Re: show me the run line???Carlos E. R.
||      `* Re: show me the run line???T
||       `* Re: show me the run line???Carlos E.R.
||        `* Re: show me the run line???T
||         `* Re: show me the run line???T
||          `* Re: show me the run line???Carlos E.R.
||           +- Re: show me the run line???T
||           `- Re: show me the run line???T
|`* Re: show me the run line???Char Jackson
| `* Re: show me the run line???VanguardLH
|  `* Re: show me the run line???T
|   `- Re: show me the run line???Paul
`* Re: show me the run line???Philip Herlihy
 `- Re: show me the run line???T

Pages:12
show me the run line???

<uq3g1f$24med$1@dont-email.me>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=4780&group=alt.comp.os.windows-11#4780

  copy link   Newsgroups: alt.comp.os.windows-11
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: T@invalid.invalid (T)
Newsgroups: alt.comp.os.windows-11
Subject: show me the run line???
Date: Thu, 8 Feb 2024 13:11:11 -0800
Organization: A noiseless patient Spider
Lines: 20
Message-ID: <uq3g1f$24med$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Thu, 8 Feb 2024 21:11:11 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="7bbae50160b992c0d31e4f64d0ae9eee";
logging-data="2251213"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+2XX6sBDi2zMi8bhbJnai8AFKszzAUm/Y="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:JrwMkLmIPIiYcjNZI2bezdMt2I4=
Content-Language: en-US
 by: T - Thu, 8 Feb 2024 21:11 UTC

Hi All,

Is there a way from te command line to show the run line
associated with a task.

The test task is
>raku -e "sleep 4"

>tasklist | grep -i raku
raku.exe 1540 Console 1 99,364 K

>PowerShell.exe Get-Process | grep -i raku
165 17 90052 98840 0.22 3388 1 raku

The reason is that I will sometimes have several raku (perl 6)
programs running a once. I need to tell them apart.

Many thanks,
-T

Re: show me the run line???

<1wpamhbvggj4r.dlg@v.nguard.lh>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=4781&group=alt.comp.os.windows-11#4781

  copy link   Newsgroups: alt.comp.os.windows-11
Path: i2pn2.org!i2pn.org!usenet.goja.nl.eu.org!weretis.net!feeder8.news.weretis.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: V@nguard.LH (VanguardLH)
Newsgroups: alt.comp.os.windows-11
Subject: Re: show me the run line???
Date: Thu, 8 Feb 2024 15:47:57 -0600
Organization: Usenet Elder
Lines: 34
Sender: V@nguard.LH
Message-ID: <1wpamhbvggj4r.dlg@v.nguard.lh>
References: <uq3g1f$24med$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
X-Trace: individual.net 0BKOS0W85RZe9EvmbQBUuwczt0laP2N74WOSQFQdoSmrgN8jr+
Keywords: VanguardLH,VLH
Cancel-Lock: sha1:wLmjbZgX9KfQ1kYYOos1HAKBYTY= sha256:PIkdWA5r82CW9hgf+rdw3bV44Db3St4RMZnOuRPhvEQ=
User-Agent: 40tude_Dialog/2.0.15.41
 by: VanguardLH - Thu, 8 Feb 2024 21:47 UTC

T <T@invalid.invalid> wrote:

> Hi All,
>
> Is there a way from te command line to show the run line
> associated with a task.
>
> The test task is
> >raku -e "sleep 4"
>
> >tasklist | grep -i raku
> raku.exe 1540 Console 1 99,364 K
>
> >PowerShell.exe Get-Process | grep -i raku
> 165 17 90052 98840 0.22 3388 1 raku
>
> The reason is that I will sometimes have several raku (perl 6)
> programs running a once. I need to tell them apart.
>
> Many thanks,
> -T

In Powershell, you could use:

$process = "raku.exe"
Get-WmiObject Win32_Process -Filter "name = '$process'" | Select-Object CommandLine

If you're using the same command line to run raku.exe (i.e., same args),
you won't tell the difference with multiple instances. You would need
to add something on the command line that was different for each
instance of raku.exe that you run.

The above is the PS example. The same can be done using wmic.exe, but
I'd have to search for the command line args.

Re: show me the run line???

<uq3kl3$25o37$1@dont-email.me>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=4783&group=alt.comp.os.windows-11#4783

  copy link   Newsgroups: alt.comp.os.windows-11
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: T@invalid.invalid (T)
Newsgroups: alt.comp.os.windows-11
Subject: Re: show me the run line???
Date: Thu, 8 Feb 2024 14:29:55 -0800
Organization: A noiseless patient Spider
Lines: 43
Message-ID: <uq3kl3$25o37$1@dont-email.me>
References: <uq3g1f$24med$1@dont-email.me> <1wpamhbvggj4r.dlg@v.nguard.lh>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Thu, 8 Feb 2024 22:29:55 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="7bbae50160b992c0d31e4f64d0ae9eee";
logging-data="2285671"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+3OWDML6VRgZyZSAVF0U+tJSNRquvVrTo="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:eCyCgsP9gTtGldk8gZKtykcg3Ig=
Content-Language: en-US
In-Reply-To: <1wpamhbvggj4r.dlg@v.nguard.lh>
 by: T - Thu, 8 Feb 2024 22:29 UTC

On 2/8/24 13:47, VanguardLH wrote:
> T <T@invalid.invalid> wrote:
>
>> Hi All,
>>
>> Is there a way from te command line to show the run line
>> associated with a task.
>>
>> The test task is
>> >raku -e "sleep 4"
>>
>> >tasklist | grep -i raku
>> raku.exe 1540 Console 1 99,364 K
>>
>> >PowerShell.exe Get-Process | grep -i raku
>> 165 17 90052 98840 0.22 3388 1 raku
>>
>> The reason is that I will sometimes have several raku (perl 6)
>> programs running a once. I need to tell them apart.
>>
>> Many thanks,
>> -T
>
> In Powershell, you could use:
>
> $process = "raku.exe"
> Get-WmiObject Win32_Process -Filter "name = '$process'" | Select-Object CommandLine
>
> If you're using the same command line to run raku.exe (i.e., same args),
> you won't tell the difference with multiple instances. You would need
> to add something on the command line that was different for each
> instance of raku.exe that you run.
>
> The above is the PS example. The same can be done using wmic.exe, but
> I'd have to search for the command line args.

>PowerShell.exe Get-WmiObject Win32_Process -Filter "name = 'raku.exe'"
| Select-Object CommandLine
'Select-Object' is not recognized as an internal or external command,
operable program or batch file.

Re: show me the run line???

<uq3ksj$25o37$2@dont-email.me>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=4784&group=alt.comp.os.windows-11#4784

  copy link   Newsgroups: alt.comp.os.windows-11
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: T@invalid.invalid (T)
Newsgroups: alt.comp.os.windows-11
Subject: Re: show me the run line???
Date: Thu, 8 Feb 2024 14:33:55 -0800
Organization: A noiseless patient Spider
Lines: 9
Message-ID: <uq3ksj$25o37$2@dont-email.me>
References: <uq3g1f$24med$1@dont-email.me> <1wpamhbvggj4r.dlg@v.nguard.lh>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Thu, 8 Feb 2024 22:33:56 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="7bbae50160b992c0d31e4f64d0ae9eee";
logging-data="2285671"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19kH0BwKL9Horbl4Eyz3Rl9eaZzvLy/kfY="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:GawS3k6UwPxN7GWkwN1CrPUIqug=
Content-Language: en-US
In-Reply-To: <1wpamhbvggj4r.dlg@v.nguard.lh>
 by: T - Thu, 8 Feb 2024 22:33 UTC

On 2/8/24 13:47, VanguardLH wrote:
> The same can be done using wmic.exe, but
> I'd have to search for the command line args

I do not mind wmic. I read the output into a sting
variable in Raku and have loads of fun with it.
Like 100 times more power than bash pipes.

Do you know the wmic command for this?

Re: show me the run line???

<0rnasi9rto5ca4hsfvpb4sd4rql7mdg524@4ax.com>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=4785&group=alt.comp.os.windows-11#4785

  copy link   Newsgroups: alt.comp.os.windows-11
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx11.iad.POSTED!not-for-mail
From: none@none.invalid (Char Jackson)
Newsgroups: alt.comp.os.windows-11
Subject: Re: show me the run line???
Message-ID: <0rnasi9rto5ca4hsfvpb4sd4rql7mdg524@4ax.com>
References: <uq3g1f$24med$1@dont-email.me> <1wpamhbvggj4r.dlg@v.nguard.lh>
X-Newsreader: Forte Agent 6.00/32.1186
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Lines: 60
X-Complaints-To: abuse(at)newshosting.com
NNTP-Posting-Date: Thu, 08 Feb 2024 23:13:19 UTC
Organization: Newshosting.com - Highest quality at a great price! www.newshosting.com
Date: Thu, 08 Feb 2024 17:13:19 -0600
X-Received-Bytes: 2997
 by: Char Jackson - Thu, 8 Feb 2024 23:13 UTC

On Thu, 8 Feb 2024 15:47:57 -0600, VanguardLH <V@nguard.LH> wrote:

>T <T@invalid.invalid> wrote:
>
>> Hi All,
>>
>> Is there a way from te command line to show the run line
>> associated with a task.
>>
>> The test task is
>> >raku -e "sleep 4"
>>
>> >tasklist | grep -i raku
>> raku.exe 1540 Console 1 99,364 K
>>
>> >PowerShell.exe Get-Process | grep -i raku
>> 165 17 90052 98840 0.22 3388 1 raku
>>
>> The reason is that I will sometimes have several raku (perl 6)
>> programs running a once. I need to tell them apart.
>>
>> Many thanks,
>> -T
>
>In Powershell, you could use:
>
>$process = "raku.exe"
>Get-WmiObject Win32_Process -Filter "name = '$process'" | Select-Object CommandLine
>
>If you're using the same command line to run raku.exe (i.e., same args),
>you won't tell the difference with multiple instances. You would need
>to add something on the command line that was different for each
>instance of raku.exe that you run.
>
>The above is the PS example. The same can be done using wmic.exe, but
>I'd have to search for the command line args.

My understanding is that WMIC is on its last legs.

https://winaero.com/wmic-is-now-disabled-by-default-on-windows-11/

Microsoft has disabled by default the Windows Management Instrumentation (WMIC)
command-line tool. Currently, in Windows 11, WMIC is accessible as a feature on
demand (FOD) which is available out of the box, but it will be deactivated in
the next update.

In place of WMIC, Microsoft has introduced Windows PowerShell for WMI, asserting
that the removal of outdated features aids in reducing code complexity and
ensuring user safety and productivity.

The WMI command-line (WMIC) utility is deprecated as of Windows 10, version
21H1, and as of the 21H1 semi-annual channel release of Windows Server. This
utility is superseded by Windows PowerShell for WMI. This deprecation applies
only to the WMI command-line (WMIC) utility; Windows Management Instrumentation
(WMI) itself is not affected.

In a post on the TechCommunity forum, Microsoft states that they will disable
WMIC starting from January 29, 2024, beginning with preview builds of Windows
11. Eventually, Microsoft intends to remove WMIC from future Windows releases.

Re: show me the run line???

<uq3qkf$27k9v$1@dont-email.me>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=4787&group=alt.comp.os.windows-11#4787

  copy link   Newsgroups: alt.comp.os.windows-11
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: T@invalid.invalid (T)
Newsgroups: alt.comp.os.windows-11
Subject: Re: show me the run line???
Date: Thu, 8 Feb 2024 16:11:59 -0800
Organization: A noiseless patient Spider
Lines: 21
Message-ID: <uq3qkf$27k9v$1@dont-email.me>
References: <uq3g1f$24med$1@dont-email.me> <1wpamhbvggj4r.dlg@v.nguard.lh>
<uq3ksj$25o37$2@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Fri, 9 Feb 2024 00:11:59 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="a24a2cbaa32ab7cb966c3d1ec4ced886";
logging-data="2347327"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18cRVYa1dKd3TXSwWhNXNjg4DSNe4azzQk="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:A17fY1gWDEF+SDJKrkSn6MmnKfQ=
Content-Language: en-US
In-Reply-To: <uq3ksj$25o37$2@dont-email.me>
 by: T - Fri, 9 Feb 2024 00:11 UTC

On 2/8/24 14:33, T wrote:
> On 2/8/24 13:47, VanguardLH wrote:
>>   The same can be done using wmic.exe, but
>> I'd have to search for the command line args
>
> I do not mind wmic.  I read the output into a sting
> variable in Raku and have loads of fun with it.
> Like 100 times more power than bash pipes.
>
> Do you know the wmic command for this?

>raku -e "sleep 14"

>wmic process where "name='raku.exe'" get ProcessID,SessionID,CommandLine
CommandLine ProcessId SessionId
raku -e "sleep 14" 5020 1

Yippee!

Thank you!

Re: show me the run line???

<1pp4e8w9n7sqz.dlg@v.nguard.lh>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=4788&group=alt.comp.os.windows-11#4788

  copy link   Newsgroups: alt.comp.os.windows-11
Path: i2pn2.org!i2pn.org!usenet.goja.nl.eu.org!weretis.net!feeder8.news.weretis.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: V@nguard.LH (VanguardLH)
Newsgroups: alt.comp.os.windows-11
Subject: Re: show me the run line???
Date: Thu, 8 Feb 2024 18:41:20 -0600
Organization: Usenet Elder
Lines: 51
Sender: V@nguard.LH
Message-ID: <1pp4e8w9n7sqz.dlg@v.nguard.lh>
References: <uq3g1f$24med$1@dont-email.me> <1wpamhbvggj4r.dlg@v.nguard.lh> <uq3kl3$25o37$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
X-Trace: individual.net 94kAcGRLSvOHiKv/pQuIUgDwsMr+ei42sJ8EgorRzhMJfzVwX9
Keywords: VanguardLH,VLH
Cancel-Lock: sha1:bqhxBAh89argEmvWjEQJz6BYeOw= sha256:ZUlqIvlEcVuPZXuu1fOYVPyj8YA+n3wbDsNeSSvEJx8=
User-Agent: 40tude_Dialog/2.0.15.41
 by: VanguardLH - Fri, 9 Feb 2024 00:41 UTC

T <T@invalid.invalid> wrote:

> On 2/8/24 13:47, VanguardLH wrote:
>> T <T@invalid.invalid> wrote:
>>
>>> Hi All,
>>>
>>> Is there a way from te command line to show the run line
>>> associated with a task.
>>>
>>> The test task is
>>> >raku -e "sleep 4"
>>>
>>> >tasklist | grep -i raku
>>> raku.exe 1540 Console 1 99,364 K
>>>
>>> >PowerShell.exe Get-Process | grep -i raku
>>> 165 17 90052 98840 0.22 3388 1 raku
>>>
>>> The reason is that I will sometimes have several raku (perl 6)
>>> programs running a once. I need to tell them apart.
>>>
>>> Many thanks,
>>> -T
>>
>> In Powershell, you could use:
>>
>> $process = "raku.exe"
>> Get-WmiObject Win32_Process -Filter "name = '$process'" | Select-Object CommandLine
>>
>> If you're using the same command line to run raku.exe (i.e., same args),
>> you won't tell the difference with multiple instances. You would need
>> to add something on the command line that was different for each
>> instance of raku.exe that you run.
>>
>> The above is the PS example. The same can be done using wmic.exe, but
>> I'd have to search for the command line args.
>
> >PowerShell.exe Get-WmiObject Win32_Process -Filter "name = 'raku.exe'"
>| Select-Object CommandLine
>
> 'Select-Object' is not recognized as an internal or external command,
> operable program or batch file.

That was part of 1 line. Maybe your client sliced the long line into
two lines as part of its word wrap. I didn't try to put the directives
on the same line as the one that loads powershell.exe. I loaded
Powershell, and THEN entered the 2 command lines. When you tried to run
powershell.exe with the command as an argument, well, "|" is a pipe on a
DOS command line. The parsing would be incorrect how you did it.

Re: show me the run line???

<gg58t7ba9d8d.dlg@v.nguard.lh>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=4789&group=alt.comp.os.windows-11#4789

  copy link   Newsgroups: alt.comp.os.windows-11
Path: i2pn2.org!i2pn.org!usenet.network!news.neodome.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: V@nguard.LH (VanguardLH)
Newsgroups: alt.comp.os.windows-11
Subject: Re: show me the run line???
Date: Thu, 8 Feb 2024 18:43:25 -0600
Organization: Usenet Elder
Lines: 45
Sender: V@nguard.LH
Message-ID: <gg58t7ba9d8d.dlg@v.nguard.lh>
References: <uq3g1f$24med$1@dont-email.me> <1wpamhbvggj4r.dlg@v.nguard.lh> <0rnasi9rto5ca4hsfvpb4sd4rql7mdg524@4ax.com>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
X-Trace: individual.net XqSsIxAcqY6X3hw2hhHqQwzIY+5EWPzc7lrW4a9BNGqzbmBADs
Keywords: VanguardLH,VLH
Cancel-Lock: sha1:jSfUstE9y1o/z+f6rT0OrDB0VS0= sha256:hXAR0vYMJt63Bd22B5x2gCmGDw+0+gxkRzWnJnX5cfk=
User-Agent: 40tude_Dialog/2.0.15.41
 by: VanguardLH - Fri, 9 Feb 2024 00:43 UTC

Char Jackson <none@none.invalid> wrote:

> On Thu, 8 Feb 2024 15:47:57 -0600, VanguardLH <V@nguard.LH> wrote:
>
>>T <T@invalid.invalid> wrote:
>>
>>> Hi All,
>>>
>>> Is there a way from te command line to show the run line
>>> associated with a task.
>>>
>>> The test task is
>>> >raku -e "sleep 4"
>>>
>>> >tasklist | grep -i raku
>>> raku.exe 1540 Console 1 99,364 K
>>>
>>> >PowerShell.exe Get-Process | grep -i raku
>>> 165 17 90052 98840 0.22 3388 1 raku
>>>
>>> The reason is that I will sometimes have several raku (perl 6)
>>> programs running a once. I need to tell them apart.
>>>
>>> Many thanks,
>>> -T
>>
>>In Powershell, you could use:
>>
>>$process = "raku.exe"
>>Get-WmiObject Win32_Process -Filter "name = '$process'" | Select-Object CommandLine
>>
>>If you're using the same command line to run raku.exe (i.e., same args),
>>you won't tell the difference with multiple instances. You would need
>>to add something on the command line that was different for each
>>instance of raku.exe that you run.
>>
>>The above is the PS example. The same can be done using wmic.exe, but
>>I'd have to search for the command line args.
>
> My understanding is that WMIC is on its last legs.

It has been deprecated, and Microsoft wants users to move to PowerShell.
They need something to convince users to start using PowerShell. That's
why I showed how to use PowerShell to get a process' attributes, like
the command line to load the process.

Re: show me the run line???

<uq3us5$297i1$1@dont-email.me>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=4791&group=alt.comp.os.windows-11#4791

  copy link   Newsgroups: alt.comp.os.windows-11
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: T@invalid.invalid (T)
Newsgroups: alt.comp.os.windows-11
Subject: Re: show me the run line???
Date: Thu, 8 Feb 2024 17:24:21 -0800
Organization: A noiseless patient Spider
Lines: 70
Message-ID: <uq3us5$297i1$1@dont-email.me>
References: <uq3g1f$24med$1@dont-email.me> <1wpamhbvggj4r.dlg@v.nguard.lh>
<uq3kl3$25o37$1@dont-email.me> <1pp4e8w9n7sqz.dlg@v.nguard.lh>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Fri, 9 Feb 2024 01:24:21 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="a24a2cbaa32ab7cb966c3d1ec4ced886";
logging-data="2399809"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/rivXPb96iMwRKQyjtxYknDxV8Uum707k="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:2kOOsN81zTva45r8w6v8WuUy4pA=
Content-Language: en-US
In-Reply-To: <1pp4e8w9n7sqz.dlg@v.nguard.lh>
 by: T - Fri, 9 Feb 2024 01:24 UTC

On 2/8/24 16:41, VanguardLH wrote:
> T <T@invalid.invalid> wrote:
>
>> On 2/8/24 13:47, VanguardLH wrote:
>>> T <T@invalid.invalid> wrote:
>>>
>>>> Hi All,
>>>>
>>>> Is there a way from te command line to show the run line
>>>> associated with a task.
>>>>
>>>> The test task is
>>>> >raku -e "sleep 4"
>>>>
>>>> >tasklist | grep -i raku
>>>> raku.exe 1540 Console 1 99,364 K
>>>>
>>>> >PowerShell.exe Get-Process | grep -i raku
>>>> 165 17 90052 98840 0.22 3388 1 raku
>>>>
>>>> The reason is that I will sometimes have several raku (perl 6)
>>>> programs running a once. I need to tell them apart.
>>>>
>>>> Many thanks,
>>>> -T
>>>
>>> In Powershell, you could use:
>>>
>>> $process = "raku.exe"
>>> Get-WmiObject Win32_Process -Filter "name = '$process'" | Select-Object CommandLine
>>>
>>> If you're using the same command line to run raku.exe (i.e., same args),
>>> you won't tell the difference with multiple instances. You would need
>>> to add something on the command line that was different for each
>>> instance of raku.exe that you run.
>>>
>>> The above is the PS example. The same can be done using wmic.exe, but
>>> I'd have to search for the command line args.
>>
>> >PowerShell.exe Get-WmiObject Win32_Process -Filter "name = 'raku.exe'"
>> | Select-Object CommandLine
>>
>> 'Select-Object' is not recognized as an internal or external command,
>> operable program or batch file.
>
> That was part of 1 line. Maybe your client sliced the long line into
> two lines as part of its word wrap. I didn't try to put the directives
> on the same line as the one that loads powershell.exe. I loaded
> Powershell, and THEN entered the 2 command lines. When you tried to run
> powershell.exe with the command as an argument, well, "|" is a pipe on a
> DOS command line. The parsing would be incorrect how you did it.
>

Since I am calling the command a a system call from a running
program, I have to call "powershell.exe". So that is the way
I test it too. And I think I goofed up the quotes.

Running from a powershell, the command works but does not find raku.exe

PS C:\> PowerShell.exe Get-WmiObject Win32_Process -Filter "name =
'raku.exe'" | Select-Object CommandLine

CommandLine
-----------
<nothing>

Re: show me the run line???

<uq3uup$297i1$2@dont-email.me>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=4792&group=alt.comp.os.windows-11#4792

  copy link   Newsgroups: alt.comp.os.windows-11
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: T@invalid.invalid (T)
Newsgroups: alt.comp.os.windows-11
Subject: Re: show me the run line???
Date: Thu, 8 Feb 2024 17:25:45 -0800
Organization: A noiseless patient Spider
Lines: 12
Message-ID: <uq3uup$297i1$2@dont-email.me>
References: <uq3g1f$24med$1@dont-email.me> <1wpamhbvggj4r.dlg@v.nguard.lh>
<0rnasi9rto5ca4hsfvpb4sd4rql7mdg524@4ax.com> <gg58t7ba9d8d.dlg@v.nguard.lh>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Fri, 9 Feb 2024 01:25:45 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="a24a2cbaa32ab7cb966c3d1ec4ced886";
logging-data="2399809"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+7ZkUOXIZVQFDHxXNgjpMEzY3gEShjDQ4="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:9B7HAcmHYlOlsZoX899kH1np79o=
Content-Language: en-US
In-Reply-To: <gg58t7ba9d8d.dlg@v.nguard.lh>
 by: T - Fri, 9 Feb 2024 01:25 UTC

On 2/8/24 16:43, VanguardLH wrote:

> It has been deprecated, and Microsoft wants users to move to PowerShell.
> They need something to convince users to start using PowerShell. That's
> why I showed how to use PowerShell to get a process' attributes, like
> the command line to load the process.

What would be the equivalent powershell of

wmic process where "name='raku.exe'" get ProcessID,SessionID,CommandLine

?

Re: show me the run line???

<uq5nn7$2npks$1@dont-email.me>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=4795&group=alt.comp.os.windows-11#4795

  copy link   Newsgroups: alt.comp.os.windows-11
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: nospam@needed.invalid (Paul)
Newsgroups: alt.comp.os.windows-11
Subject: Re: show me the run line???
Date: Fri, 9 Feb 2024 12:34:30 -0500
Organization: A noiseless patient Spider
Lines: 84
Message-ID: <uq5nn7$2npks$1@dont-email.me>
References: <uq3g1f$24med$1@dont-email.me> <1wpamhbvggj4r.dlg@v.nguard.lh>
<uq3kl3$25o37$1@dont-email.me> <1pp4e8w9n7sqz.dlg@v.nguard.lh>
<uq3us5$297i1$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Injection-Date: Fri, 9 Feb 2024 17:34:31 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="6f6fbecaf64f7be732d1e07f8dffa0c5";
logging-data="2877084"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+WlzyJhiVA8dfNk8s7F9nbbEOJaHmy3Jw="
User-Agent: Ratcatcher/2.0.0.25 (Windows/20130802)
Cancel-Lock: sha1:jrXlS3d72jk4r+1B9uNPPkfr8PI=
Content-Language: en-US
In-Reply-To: <uq3us5$297i1$1@dont-email.me>
 by: Paul - Fri, 9 Feb 2024 17:34 UTC

On 2/8/2024 8:24 PM, T wrote:
> On 2/8/24 16:41, VanguardLH wrote:
>> T <T@invalid.invalid> wrote:
>>
>>> On 2/8/24 13:47, VanguardLH wrote:
>>>> T <T@invalid.invalid> wrote:
>>>>
>>>>> Hi All,
>>>>>
>>>>> Is there a way from te command line to show the run line
>>>>> associated with a task.
>>>>>
>>>>> The test task is
>>>>>       >raku -e "sleep 4"
>>>>>
>>>>>    >tasklist | grep -i raku
>>>>> raku.exe        1540 Console   1     99,364 K
>>>>>
>>>>>    >PowerShell.exe Get-Process | grep -i raku
>>>>>        165      17    90052      98840       0.22   3388   1 raku
>>>>>
>>>>> The reason is that I will sometimes have several raku (perl 6)
>>>>> programs running a once.  I need to tell them apart.
>>>>>
>>>>> Many thanks,
>>>>> -T
>>>>
>>>> In Powershell, you could use:
>>>>
>>>> $process = "raku.exe"
>>>> Get-WmiObject Win32_Process -Filter "name = '$process'" | Select-Object CommandLine
>>>>
>>>> If you're using the same command line to run raku.exe (i.e., same args),
>>>> you won't tell the difference with multiple instances.  You would need
>>>> to add something on the command line that was different for each
>>>> instance of raku.exe that you run.
>>>>
>>>> The above is the PS example.  The same can be done using wmic.exe, but
>>>> I'd have to search for the command line args.
>>>
>>>   >PowerShell.exe Get-WmiObject Win32_Process -Filter "name = 'raku.exe'"
>>> | Select-Object CommandLine
>>>
>>> 'Select-Object' is not recognized as an internal or external command,
>>> operable program or batch file.
>>
>> That was part of 1 line.  Maybe your client sliced the long line into
>> two lines as part of its word wrap.  I didn't try to put the directives
>> on the same line as the one that loads powershell.exe.  I loaded
>> Powershell, and THEN entered the 2 command lines.  When you tried to run
>> powershell.exe with the command as an argument, well, "|" is a pipe on a
>> DOS command line.  The parsing would be incorrect how you did it.
>>
>
>
> Since I am calling the command a a system call from a running
> program, I have to call "powershell.exe".  So that is the way
> I test it too.  And I think I goofed  up the quotes.
>
> Running from a powershell, the command works but does not find raku.exe
>
> PS C:\> PowerShell.exe Get-WmiObject Win32_Process -Filter "name = 'raku.exe'"  | Select-Object CommandLine
>
> CommandLine
> -----------
> <nothing>

If putting quotes around that pipe-equipped single line is too hard,
put it into a .ps1 script file.

powershell.exe myproject.ps1

Then myproject.ps1 can contain the hard-to-quote thing.

If you want a single source file, you can even have your master script
create the .ps1 file on the fly, so the master script controls what is in
it, and the myproject.ps1 is a "temporary" file of sorts.

While in Terminal, if you type "select" then hit tab key a few times,
you can see that, indeed, Select-Object is something powershell has internally.

Paul

Re: show me the run line???

<uq5o6i$2nsdb$1@dont-email.me>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=4796&group=alt.comp.os.windows-11#4796

  copy link   Newsgroups: alt.comp.os.windows-11
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: nospam@needed.invalid (Paul)
Newsgroups: alt.comp.os.windows-11
Subject: Re: show me the run line???
Date: Fri, 9 Feb 2024 12:42:41 -0500
Organization: A noiseless patient Spider
Lines: 31
Message-ID: <uq5o6i$2nsdb$1@dont-email.me>
References: <uq3g1f$24med$1@dont-email.me> <1wpamhbvggj4r.dlg@v.nguard.lh>
<0rnasi9rto5ca4hsfvpb4sd4rql7mdg524@4ax.com> <gg58t7ba9d8d.dlg@v.nguard.lh>
<uq3uup$297i1$2@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Injection-Date: Fri, 9 Feb 2024 17:42:42 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="6f6fbecaf64f7be732d1e07f8dffa0c5";
logging-data="2879915"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+j7BwDrkSLz2+Irxx38UcMuPRIIdqE9UA="
User-Agent: Ratcatcher/2.0.0.25 (Windows/20130802)
Cancel-Lock: sha1:dmaCyMMZ24LPOOizz8dUFHhy5hc=
Content-Language: en-US
In-Reply-To: <uq3uup$297i1$2@dont-email.me>
 by: Paul - Fri, 9 Feb 2024 17:42 UTC

On 2/8/2024 8:25 PM, T wrote:
> On 2/8/24 16:43, VanguardLH wrote:
>
>> It has been deprecated, and Microsoft wants users to move to PowerShell.
>> They need something to convince users to start using PowerShell.  That's
>> why I showed how to use PowerShell to get a process' attributes, like
>> the command line to load the process.
>
> What would be the equivalent powershell of
>
> wmic process where "name='raku.exe'" get ProcessID,SessionID,CommandLine
>
> ?

Google says:

You can try this cmdlet to get all available info of a process:

Get-Process -Name <process name> | Format-List *

then you can try this cmdlet to see the state of that process,
if it's True means it's running, if false means it's not running

Get-Process -Name <process name> | select Responding

While in Powershell, I did this, and it dumped a long (useless) stanza.
That represents the terminal I was working in.

Get-Process -name powershell | format-list *

Paul

Re: show me the run line???

<uq66n5$2qc6i$1@dont-email.me>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=4797&group=alt.comp.os.windows-11#4797

  copy link   Newsgroups: alt.comp.os.windows-11
Path: i2pn2.org!rocksolid2!news.neodome.net!news.mixmin.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: T@invalid.invalid (T)
Newsgroups: alt.comp.os.windows-11
Subject: Re: show me the run line???
Date: Fri, 9 Feb 2024 13:50:29 -0800
Organization: A noiseless patient Spider
Lines: 26
Message-ID: <uq66n5$2qc6i$1@dont-email.me>
References: <uq3g1f$24med$1@dont-email.me> <1wpamhbvggj4r.dlg@v.nguard.lh>
<uq3kl3$25o37$1@dont-email.me> <1pp4e8w9n7sqz.dlg@v.nguard.lh>
<uq3us5$297i1$1@dont-email.me> <uq5nn7$2npks$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Fri, 9 Feb 2024 21:50:30 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="a24a2cbaa32ab7cb966c3d1ec4ced886";
logging-data="2961618"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19wgxnBqgxnygJVQc15JLgCq+rqtuvOiM4="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:ggAgjIOKayBRa2iMIz25X49gSpk=
Content-Language: en-US
In-Reply-To: <uq5nn7$2npks$1@dont-email.me>
 by: T - Fri, 9 Feb 2024 21:50 UTC

On 2/9/24 09:34, Paul wrote:

> If putting quotes around that pipe-equipped single line is too hard,
> put it into a .ps1 script file.
>
> powershell.exe myproject.ps1
>
> Then myproject.ps1 can contain the hard-to-quote thing.
>
> If you want a single source file, you can even have your master script
> create the .ps1 file on the fly, so the master script controls what is in
> it, and the myproject.ps1 is a "temporary" file of sorts.
>
> While in Terminal, if you type "select" then hit tab key a few times,
> you can see that, indeed, Select-Object is something powershell has internally.
>
> Paul
>
>

What is the escape character in power shell?

Sort of like bash:
echo "\"\"\"\""
""""

Re: show me the run line???

<qhli9kxrps.ln2@Telcontar.valinor>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=4798&group=alt.comp.os.windows-11#4798

  copy link   Newsgroups: alt.comp.os.windows-11
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: robin_listas@es.invalid (Carlos E.R.)
Newsgroups: alt.comp.os.windows-11
Subject: Re: show me the run line???
Date: Fri, 9 Feb 2024 23:28:42 +0100
Lines: 29
Message-ID: <qhli9kxrps.ln2@Telcontar.valinor>
References: <uq3g1f$24med$1@dont-email.me> <1wpamhbvggj4r.dlg@v.nguard.lh>
<uq3ksj$25o37$2@dont-email.me> <uq3qkf$27k9v$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: individual.net sJRw3DlNNuvd0vQcCzPw9w13TmMbN6h8rIq4OsK6ewcD6ac7hf
X-Orig-Path: Telcontar.valinor!not-for-mail
Cancel-Lock: sha1:RtVQKFoviBQ11ME58XlJFPws8Ug= sha256:60+fRQ9oBUA8FQJC98PGez1Ldlrp9cyuSqLk7QOD/nc=
User-Agent: Mozilla Thunderbird
Content-Language: es-ES, en-CA
In-Reply-To: <uq3qkf$27k9v$1@dont-email.me>
 by: Carlos E.R. - Fri, 9 Feb 2024 22:28 UTC

On 2024-02-09 01:11, T wrote:
> On 2/8/24 14:33, T wrote:
>> On 2/8/24 13:47, VanguardLH wrote:
>>>   The same can be done using wmic.exe, but
>>> I'd have to search for the command line args
>>
>> I do not mind wmic.  I read the output into a sting
>> variable in Raku and have loads of fun with it.
>> Like 100 times more power than bash pipes.
>>
>> Do you know the wmic command for this?
>
>
> >raku -e "sleep 14"
>
> >wmic process where "name='raku.exe'" get ProcessID,SessionID,CommandLine
> CommandLine          ProcessId  SessionId
> raku  -e "sleep 14"  5020       1
>
> Yippee!
>
> Thank you!

I was going to say, from long memory, that the function call to start a
program returns the PID of that process.

--
Cheers, Carlos.

Re: show me the run line???

<uq73cf$327tl$1@dont-email.me>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=4799&group=alt.comp.os.windows-11#4799

  copy link   Newsgroups: alt.comp.os.windows-11
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: nospam@needed.invalid (Paul)
Newsgroups: alt.comp.os.windows-11
Subject: Re: show me the run line???
Date: Sat, 10 Feb 2024 00:59:41 -0500
Organization: A noiseless patient Spider
Lines: 50
Message-ID: <uq73cf$327tl$1@dont-email.me>
References: <uq3g1f$24med$1@dont-email.me> <1wpamhbvggj4r.dlg@v.nguard.lh>
<uq3ksj$25o37$2@dont-email.me> <uq3qkf$27k9v$1@dont-email.me>
<qhli9kxrps.ln2@Telcontar.valinor>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Injection-Date: Sat, 10 Feb 2024 05:59:43 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="f30a17e18ad8e8acb1fe768dc9c5b835";
logging-data="3219381"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX197rE0FznW8/xjehqi0mKGq4j5QcvqEU3A="
User-Agent: Ratcatcher/2.0.0.25 (Windows/20130802)
Cancel-Lock: sha1:3tW5cnBYbB8yKU2VX1ENEC3Jn5M=
Content-Language: en-US
In-Reply-To: <qhli9kxrps.ln2@Telcontar.valinor>
 by: Paul - Sat, 10 Feb 2024 05:59 UTC

On 2/9/2024 5:28 PM, Carlos E.R. wrote:
> On 2024-02-09 01:11, T wrote:
>> On 2/8/24 14:33, T wrote:
>>> On 2/8/24 13:47, VanguardLH wrote:
>>>>   The same can be done using wmic.exe, but
>>>> I'd have to search for the command line args
>>>
>>> I do not mind wmic.  I read the output into a sting
>>> variable in Raku and have loads of fun with it.
>>> Like 100 times more power than bash pipes.
>>>
>>> Do you know the wmic command for this?
>>
>>
>>  >raku -e "sleep 14"
>>
>>  >wmic process where "name='raku.exe'" get ProcessID,SessionID,CommandLine
>> CommandLine          ProcessId  SessionId
>> raku  -e "sleep 14"  5020       1
>>
>> Yippee!
>>
>> Thank you!
>
> I was going to say, from long memory, that the function call to start a program returns the PID of that process.
>

These are part of the fork/exec part of UNIX/Linux.

Windows doesn't work quite the same way. It's like
eating at a fancy restaurant and the waiter forgot
your fork and spoon. Some utensils are missing.

The code for Firefox, would likely contain an example
of a workaround, whether it's a POSIX library or something
else, I do not know. I'm not a programmer of that caliber.
I'm a copy/paste programmer, and all I know is what I copy :-)

The original Quantum code for Firefox, was pretty clunky.
I expect the staff received "feedback" from people who
knew how to do that properly. It almost feels like
it is "fork/exec" quality code now. Originally, it
could take 20 seconds for Firefox to shut down. That kind
of clunky.

As it is, these multi-process programs, shutdown works
best if you kill the parent (the PPID). Process Explorer
from Sysinternals, makes this easy for you. Task Manager ? Not so much.

Paul

Re: show me the run line???

<000k9kxgno.ln2@Telcontar.valinor>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=4800&group=alt.comp.os.windows-11#4800

  copy link   Newsgroups: alt.comp.os.windows-11
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: robin_listas@es.invalid (Carlos E.R.)
Newsgroups: alt.comp.os.windows-11
Subject: Re: show me the run line???
Date: Sat, 10 Feb 2024 11:33:04 +0100
Lines: 53
Message-ID: <000k9kxgno.ln2@Telcontar.valinor>
References: <uq3g1f$24med$1@dont-email.me> <1wpamhbvggj4r.dlg@v.nguard.lh>
<uq3ksj$25o37$2@dont-email.me> <uq3qkf$27k9v$1@dont-email.me>
<qhli9kxrps.ln2@Telcontar.valinor> <uq73cf$327tl$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: individual.net SDPb+/ErF0Xno0ZuyccXpQ/aZVKgK8sRuxIvTHK09jPn40PTMT
X-Orig-Path: Telcontar.valinor!not-for-mail
Cancel-Lock: sha1:R6hSm4O97hUCPS9GPxgeg8SNAfw= sha256:BCRQmE+FjfKwraeyqhAH2veH63Qfib+PembOaxWaoeU=
User-Agent: Mozilla Thunderbird
Content-Language: es-ES, en-CA
In-Reply-To: <uq73cf$327tl$1@dont-email.me>
 by: Carlos E.R. - Sat, 10 Feb 2024 10:33 UTC

On 2024-02-10 06:59, Paul wrote:
> On 2/9/2024 5:28 PM, Carlos E.R. wrote:
>> On 2024-02-09 01:11, T wrote:
>>> On 2/8/24 14:33, T wrote:
>>>> On 2/8/24 13:47, VanguardLH wrote:
>>>>>   The same can be done using wmic.exe, but
>>>>> I'd have to search for the command line args
>>>>
>>>> I do not mind wmic.  I read the output into a sting
>>>> variable in Raku and have loads of fun with it.
>>>> Like 100 times more power than bash pipes.
>>>>
>>>> Do you know the wmic command for this?
>>>
>>>
>>>  >raku -e "sleep 14"
>>>
>>>  >wmic process where "name='raku.exe'" get ProcessID,SessionID,CommandLine
>>> CommandLine          ProcessId  SessionId
>>> raku  -e "sleep 14"  5020       1
>>>
>>> Yippee!
>>>
>>> Thank you!
>>
>> I was going to say, from long memory, that the function call to start a program returns the PID of that process.
>>
>
> These are part of the fork/exec part of UNIX/Linux.
>
> Windows doesn't work quite the same way. It's like
> eating at a fancy restaurant and the waiter forgot
> your fork and spoon. Some utensils are missing.

I was a Windows programmer in the 90's, and I know I had this problem. I
don't remember the details, what I did back then.

However, a google search suggests (the first paragraph is a single line):

powershell -executionPolicy bypass -command "& {$process = start-process
$args[0] -passthru -argumentlist $args[1..($args.length-1)]; exit
$process.id}" notepad test.txt

echo Process ID of new process: %errorlevel%

I can not test this at the moment.

--
Cheers, Carlos.

Re: show me the run line???

<uqbdu6$14bbf$2@dont-email.me>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=4810&group=alt.comp.os.windows-11#4810

  copy link   Newsgroups: alt.comp.os.windows-11
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: T@invalid.invalid (T)
Newsgroups: alt.comp.os.windows-11
Subject: Re: show me the run line???
Date: Sun, 11 Feb 2024 13:24:21 -0800
Organization: A noiseless patient Spider
Lines: 55
Message-ID: <uqbdu6$14bbf$2@dont-email.me>
References: <uq3g1f$24med$1@dont-email.me> <1wpamhbvggj4r.dlg@v.nguard.lh>
<uq3ksj$25o37$2@dont-email.me> <uq3qkf$27k9v$1@dont-email.me>
<qhli9kxrps.ln2@Telcontar.valinor> <uq73cf$327tl$1@dont-email.me>
<000k9kxgno.ln2@Telcontar.valinor>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Sun, 11 Feb 2024 21:24:22 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="16a50ad9b89da3be73a50e088986da6c";
logging-data="1191279"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19spQIQtjDq8R9W9xvnSAUslYZE9kQ5uQY="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:e0mliWowaximFUqgoSu3zd6nyWQ=
In-Reply-To: <000k9kxgno.ln2@Telcontar.valinor>
Content-Language: en-US
 by: T - Sun, 11 Feb 2024 21:24 UTC

On 2/10/24 02:33, Carlos E.R. wrote:
> On 2024-02-10 06:59, Paul wrote:
>> On 2/9/2024 5:28 PM, Carlos E.R. wrote:
>>> On 2024-02-09 01:11, T wrote:
>>>> On 2/8/24 14:33, T wrote:
>>>>> On 2/8/24 13:47, VanguardLH wrote:
>>>>>>    The same can be done using wmic.exe, but
>>>>>> I'd have to search for the command line args
>>>>>
>>>>> I do not mind wmic.  I read the output into a sting
>>>>> variable in Raku and have loads of fun with it.
>>>>> Like 100 times more power than bash pipes.
>>>>>
>>>>> Do you know the wmic command for this?
>>>>
>>>>
>>>>   >raku -e "sleep 14"
>>>>
>>>>   >wmic process where "name='raku.exe'" get
>>>> ProcessID,SessionID,CommandLine
>>>> CommandLine          ProcessId  SessionId
>>>> raku  -e "sleep 14"  5020       1
>>>>
>>>> Yippee!
>>>>
>>>> Thank you!
>>>
>>> I was going to say, from long memory, that the function call to start
>>> a program returns the PID of that process.
>>>
>>
>> These are part of the fork/exec part of UNIX/Linux.
>>
>> Windows doesn't work quite the same way. It's like
>> eating at a fancy restaurant and the waiter forgot
>> your fork and spoon. Some utensils are missing.
>
> I was a Windows programmer in the 90's, and I know I had this problem. I
> don't remember the details, what I did back then.
>
> However, a google search suggests (the first paragraph is a single line):
>
> powershell -executionPolicy bypass -command "& {$process = start-process
> $args[0] -passthru -argumentlist $args[1..($args.length-1)]; exit
> $process.id}" notepad test.txt
>
> echo Process ID of new process: %errorlevel%
>
>
>
> I can not test this at the moment.
>
>

I tried. It is a mess of errors.

Re: show me the run line???

<l2stncFb7snU1@mid.individual.net>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=4811&group=alt.comp.os.windows-11#4811

  copy link   Newsgroups: alt.comp.os.windows-11
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: robin_listas@es.invalid (Carlos E. R.)
Newsgroups: alt.comp.os.windows-11
Subject: Re: show me the run line???
Date: Sun, 11 Feb 2024 22:49:32 +0100
Lines: 39
Message-ID: <l2stncFb7snU1@mid.individual.net>
References: <uq3g1f$24med$1@dont-email.me> <1wpamhbvggj4r.dlg@v.nguard.lh>
<uq3ksj$25o37$2@dont-email.me> <uq3qkf$27k9v$1@dont-email.me>
<qhli9kxrps.ln2@Telcontar.valinor> <uq73cf$327tl$1@dont-email.me>
<000k9kxgno.ln2@Telcontar.valinor> <uqbdu6$14bbf$2@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: individual.net lMBZ62gyng2D62YP+ufATAGz1F818XmadGgoGeqkaY9cTPliLD
Cancel-Lock: sha1:OM97R7DiZgdX+Uk4NCqvVx93U/0= sha256:2dH77BeBkUdempmDbBg3tk3HImorJ7153NRznh3uZqM=
User-Agent: Mozilla Thunderbird
Content-Language: en-CA, es-ANY
In-Reply-To: <uqbdu6$14bbf$2@dont-email.me>
 by: Carlos E. R. - Sun, 11 Feb 2024 21:49 UTC

On 2024-02-11 22:24, T wrote:
> On 2/10/24 02:33, Carlos E.R. wrote:
>> On 2024-02-10 06:59, Paul wrote:
>>> On 2/9/2024 5:28 PM, Carlos E.R. wrote:
>>>> On 2024-02-09 01:11, T wrote:
>>>>> On 2/8/24 14:33, T wrote:
>>>>>> On 2/8/24 13:47, VanguardLH wrote:

....

>>> These are part of the fork/exec part of UNIX/Linux.
>>>
>>> Windows doesn't work quite the same way. It's like
>>> eating at a fancy restaurant and the waiter forgot
>>> your fork and spoon. Some utensils are missing.
>>
>> I was a Windows programmer in the 90's, and I know I had this problem.
>> I don't remember the details, what I did back then.
>>
>> However, a google search suggests (the first paragraph is a single line):
>>
>> powershell -executionPolicy bypass -command "& {$process = start-process $args[0] -passthru -argumentlist $args[1..($args.length-1)]; exit $process.id}" notepad test.txt
>>
>> echo Process ID of new process: %errorlevel%
>>
>>
>>
>> I can not test this at the moment.
>>
>>
>
> I tried.  It is a mess of errors.

Post them here for us to see and guess :-)

--
Cheers,
Carlos E.R.

Re: show me the run line???

<MPG.40343b76b20c3f24989aa8@news.eternal-september.org>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=4815&group=alt.comp.os.windows-11#4815

  copy link   Newsgroups: alt.comp.os.windows-11
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: PhillipHerlihy@SlashDevNull.invalid (Philip Herlihy)
Newsgroups: alt.comp.os.windows-11
Subject: Re: show me the run line???
Date: Mon, 12 Feb 2024 14:28:44 -0000
Organization: A noiseless patient Spider
Lines: 33
Message-ID: <MPG.40343b76b20c3f24989aa8@news.eternal-september.org>
References: <uq3g1f$24med$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Injection-Info: dont-email.me; posting-host="0cf42b24f43994260bddc94fb4388703";
logging-data="1651042"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX180WmyhtCXOKmBW2v9t4mBxO2S4M4bdmUY="
User-Agent: MicroPlanet-Gravity/3.0.10 (GRC)
Cancel-Lock: sha1:PrcjtFpt5DqR9YlrNZ2nd9FGJd0=
 by: Philip Herlihy - Mon, 12 Feb 2024 14:28 UTC

In article <uq3g1f$24med$1@dont-email.me>, T wrote...
>
> Hi All,
>
> Is there a way from te command line to show the run line
> associated with a task.
>
> The test task is
> >raku -e "sleep 4"
>
>
> >tasklist | grep -i raku
> raku.exe 1540 Console 1 99,364 K
>
> >PowerShell.exe Get-Process | grep -i raku
> 165 17 90052 98840 0.22 3388 1 raku
>
> The reason is that I will sometimes have several raku (perl 6)
> programs running a once. I need to tell them apart.
>
> Many thanks,
> -T

I can't help with PowerShell, as I've never found time to invest the time to
learn it (sadly), but if you want to see the command line of a process easily,
download Process Explorer from systinternals.com (aka Microsoft) and it'll tell
you.

https://learn.microsoft.com/en-gb/sysinternals/downloads/process-explorer

--

Phil, London

Re: show me the run line???

<uqdrot$1m2g9$1@dont-email.me>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=4816&group=alt.comp.os.windows-11#4816

  copy link   Newsgroups: alt.comp.os.windows-11
Path: i2pn2.org!i2pn.org!news.chmurka.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: T@invalid.invalid (T)
Newsgroups: alt.comp.os.windows-11
Subject: Re: show me the run line???
Date: Mon, 12 Feb 2024 11:32:45 -0800
Organization: A noiseless patient Spider
Lines: 35
Message-ID: <uqdrot$1m2g9$1@dont-email.me>
References: <uq3g1f$24med$1@dont-email.me>
<MPG.40343b76b20c3f24989aa8@news.eternal-september.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Mon, 12 Feb 2024 19:32:46 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="c0e0de1431077c7f861f895d2ee4600f";
logging-data="1772041"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18/x03PVUFtAhRDGY8cZCXSQAvBRqCu2j0="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:z+iMmkGc1Mm98HIVHOz6Y2qGPQU=
Content-Language: en-US
In-Reply-To: <MPG.40343b76b20c3f24989aa8@news.eternal-september.org>
 by: T - Mon, 12 Feb 2024 19:32 UTC

On 2/12/24 06:28, Philip Herlihy wrote:
> In article <uq3g1f$24med$1@dont-email.me>, T wrote...
>>
>> Hi All,
>>
>> Is there a way from te command line to show the run line
>> associated with a task.
>>
>> The test task is
>> >raku -e "sleep 4"
>>
>>
>> >tasklist | grep -i raku
>> raku.exe 1540 Console 1 99,364 K
>>
>> >PowerShell.exe Get-Process | grep -i raku
>> 165 17 90052 98840 0.22 3388 1 raku
>>
>> The reason is that I will sometimes have several raku (perl 6)
>> programs running a once. I need to tell them apart.
>>
>> Many thanks,
>> -T
>
> I can't help with PowerShell, as I've never found time to invest the time to
> learn it (sadly), but if you want to see the command line of a process easily,
> download Process Explorer from systinternals.com (aka Microsoft) and it'll tell
> you.
>
> https://learn.microsoft.com/en-gb/sysinternals/downloads/process-explorer
>

I need to get it from the comm,and line. I use Process Explorer
all the time when I don't need the command line.

Re: show me the run line???

<uqe1aq$1n09p$1@dont-email.me>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=4817&group=alt.comp.os.windows-11#4817

  copy link   Newsgroups: alt.comp.os.windows-11
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: T@invalid.invalid (T)
Newsgroups: alt.comp.os.windows-11
Subject: Re: show me the run line???
Date: Mon, 12 Feb 2024 13:07:38 -0800
Organization: A noiseless patient Spider
Lines: 48
Message-ID: <uqe1aq$1n09p$1@dont-email.me>
References: <uq3g1f$24med$1@dont-email.me> <1wpamhbvggj4r.dlg@v.nguard.lh>
<uq3ksj$25o37$2@dont-email.me> <uq3qkf$27k9v$1@dont-email.me>
<qhli9kxrps.ln2@Telcontar.valinor> <uq73cf$327tl$1@dont-email.me>
<000k9kxgno.ln2@Telcontar.valinor> <uqbdu6$14bbf$2@dont-email.me>
<l2stncFb7snU1@mid.individual.net>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Mon, 12 Feb 2024 21:07:38 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="c0e0de1431077c7f861f895d2ee4600f";
logging-data="1802553"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/c6rfJqUqj+DfKzHWllbwTasSC87ZsX0M="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:QqnqoShs+tPdhfipjdt+Ta8rNKk=
In-Reply-To: <l2stncFb7snU1@mid.individual.net>
Content-Language: en-US
 by: T - Mon, 12 Feb 2024 21:07 UTC

On 2/11/24 13:49, Carlos E. R. wrote:
> On 2024-02-11 22:24, T wrote:
>> On 2/10/24 02:33, Carlos E.R. wrote:
>>> On 2024-02-10 06:59, Paul wrote:
>>>> On 2/9/2024 5:28 PM, Carlos E.R. wrote:
>>>>> On 2024-02-09 01:11, T wrote:
>>>>>> On 2/8/24 14:33, T wrote:
>>>>>>> On 2/8/24 13:47, VanguardLH wrote:
>
> ...
>
>>>> These are part of the fork/exec part of UNIX/Linux.
>>>>
>>>> Windows doesn't work quite the same way. It's like
>>>> eating at a fancy restaurant and the waiter forgot
>>>> your fork and spoon. Some utensils are missing.
>>>
>>> I was a Windows programmer in the 90's, and I know I had this
>>> problem. I don't remember the details, what I did back then.
>>>
>>> However, a google search suggests (the first paragraph is a single
>>> line):
>>>
>>> powershell -executionPolicy bypass -command "& {$process =
>>> start-process $args[0] -passthru -argumentlist
>>> $args[1..($args.length-1)]; exit $process.id}" notepad test.txt
>>>
>>> echo Process ID of new process: %errorlevel%
>>>
>>>
>>>
>>> I can not test this at the moment.
>>>
>>>
>>
>> I tried.  It is a mess of errors.
>
> Post them here for us to see and guess :-)
>

>powershell -executionPolicy bypass -command "& {$process =
start-process $args[0] -passthru -argumentlist $args[1..($args.length-1)]

Missing closing '}' in statement block or type definition.
+ CategoryInfo : ParserError: (:) [],
ParentContainsErrorRecordException
+ FullyQualifiedErrorId : MissingEndCurlyBrace

Re: show me the run line???

<f3gq9kx6ko.ln2@Telcontar.valinor>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=4818&group=alt.comp.os.windows-11#4818

  copy link   Newsgroups: alt.comp.os.windows-11
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: robin_listas@es.invalid (Carlos E.R.)
Newsgroups: alt.comp.os.windows-11
Subject: Re: show me the run line???
Date: Mon, 12 Feb 2024 22:44:47 +0100
Lines: 68
Message-ID: <f3gq9kx6ko.ln2@Telcontar.valinor>
References: <uq3g1f$24med$1@dont-email.me> <1wpamhbvggj4r.dlg@v.nguard.lh>
<uq3ksj$25o37$2@dont-email.me> <uq3qkf$27k9v$1@dont-email.me>
<qhli9kxrps.ln2@Telcontar.valinor> <uq73cf$327tl$1@dont-email.me>
<000k9kxgno.ln2@Telcontar.valinor> <uqbdu6$14bbf$2@dont-email.me>
<l2stncFb7snU1@mid.individual.net> <uqe1aq$1n09p$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: individual.net Xh2pvdOEKg0/xtDL/TVd+wsUrMKhN9pyz+NQTNqNrtrKgeOK8b
X-Orig-Path: Telcontar.valinor!not-for-mail
Cancel-Lock: sha1:Vk1Qsc5iw2037q64bNo96q1cUOw= sha256:f4B5CUYyppfI6440JVfcE0ulHT30rxoMpIt9YYnQXCY=
User-Agent: Mozilla Thunderbird
Content-Language: es-ES, en-CA
In-Reply-To: <uqe1aq$1n09p$1@dont-email.me>
 by: Carlos E.R. - Mon, 12 Feb 2024 21:44 UTC

On 2024-02-12 22:07, T wrote:
> On 2/11/24 13:49, Carlos E. R. wrote:
>> On 2024-02-11 22:24, T wrote:
>>> On 2/10/24 02:33, Carlos E.R. wrote:
>>>> On 2024-02-10 06:59, Paul wrote:
>>>>> On 2/9/2024 5:28 PM, Carlos E.R. wrote:
>>>>>> On 2024-02-09 01:11, T wrote:
>>>>>>> On 2/8/24 14:33, T wrote:
>>>>>>>> On 2/8/24 13:47, VanguardLH wrote:
>>
>> ...
>>
>>>>> These are part of the fork/exec part of UNIX/Linux.
>>>>>
>>>>> Windows doesn't work quite the same way. It's like
>>>>> eating at a fancy restaurant and the waiter forgot
>>>>> your fork and spoon. Some utensils are missing.
>>>>
>>>> I was a Windows programmer in the 90's, and I know I had this
>>>> problem. I don't remember the details, what I did back then.
>>>>
>>>> However, a google search suggests (the first paragraph is a single
>>>> line):
>>>>
>>>> powershell -executionPolicy bypass -command "& {$process =
>>>> start-process $args[0] -passthru -argumentlist
>>>> $args[1..($args.length-1)]; exit $process.id}" notepad test.txt
>>>>
>>>> echo Process ID of new process: %errorlevel%
>>>>
>>>>
>>>>
>>>> I can not test this at the moment.
>>>>
>>>>
>>>
>>> I tried.  It is a mess of errors.
>>
>> Post them here for us to see and guess :-)
>>
>
> >powershell -executionPolicy bypass -command "& {$process =
> start-process $args[0] -passthru -argumentlist $args[1..($args.length-1)]
>
> Missing closing '}' in statement block or type definition.
>     + CategoryInfo          : ParserError: (:) [],
> ParentContainsErrorRecordException
>     + FullyQualifiedErrorId : MissingEndCurlyBrace
>

You did not enter the complete command.

Again, it is the next single line:

powershell -executionPolicy bypass -command "& {$process = start-process
$args[0] -passthru -argumentlist $args[1..($args.length-1)]; exit
$process.id}" notepad test.txt

All that in one single line. The next line in the script is:

echo Process ID of new process: %errorlevel%

--
Cheers, Carlos.

Re: show me the run line???

<uqe5o2$1npap$1@dont-email.me>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=4819&group=alt.comp.os.windows-11#4819

  copy link   Newsgroups: alt.comp.os.windows-11
Path: i2pn2.org!i2pn.org!paganini.bofh.team!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: T@invalid.invalid (T)
Newsgroups: alt.comp.os.windows-11
Subject: Re: show me the run line???
Date: Mon, 12 Feb 2024 14:22:58 -0800
Organization: A noiseless patient Spider
Lines: 73
Message-ID: <uqe5o2$1npap$1@dont-email.me>
References: <uq3g1f$24med$1@dont-email.me> <1wpamhbvggj4r.dlg@v.nguard.lh>
<uq3ksj$25o37$2@dont-email.me> <uq3qkf$27k9v$1@dont-email.me>
<qhli9kxrps.ln2@Telcontar.valinor> <uq73cf$327tl$1@dont-email.me>
<000k9kxgno.ln2@Telcontar.valinor> <uqbdu6$14bbf$2@dont-email.me>
<l2stncFb7snU1@mid.individual.net> <uqe1aq$1n09p$1@dont-email.me>
<f3gq9kx6ko.ln2@Telcontar.valinor>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Mon, 12 Feb 2024 22:22:58 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="c0e0de1431077c7f861f895d2ee4600f";
logging-data="1828185"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/5yjqLQBqsG52FIjwuMKLktIly0AQ9pYg="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:y1lKI3/k1AH6TP1JWfA6wqQz78o=
Content-Language: en-US
In-Reply-To: <f3gq9kx6ko.ln2@Telcontar.valinor>
 by: T - Mon, 12 Feb 2024 22:22 UTC

On 2/12/24 13:44, Carlos E.R. wrote:
> On 2024-02-12 22:07, T wrote:
>> On 2/11/24 13:49, Carlos E. R. wrote:
>>> On 2024-02-11 22:24, T wrote:
>>>> On 2/10/24 02:33, Carlos E.R. wrote:
>>>>> On 2024-02-10 06:59, Paul wrote:
>>>>>> On 2/9/2024 5:28 PM, Carlos E.R. wrote:
>>>>>>> On 2024-02-09 01:11, T wrote:
>>>>>>>> On 2/8/24 14:33, T wrote:
>>>>>>>>> On 2/8/24 13:47, VanguardLH wrote:
>>>
>>> ...
>>>
>>>>>> These are part of the fork/exec part of UNIX/Linux.
>>>>>>
>>>>>> Windows doesn't work quite the same way. It's like
>>>>>> eating at a fancy restaurant and the waiter forgot
>>>>>> your fork and spoon. Some utensils are missing.
>>>>>
>>>>> I was a Windows programmer in the 90's, and I know I had this
>>>>> problem. I don't remember the details, what I did back then.
>>>>>
>>>>> However, a google search suggests (the first paragraph is a single
>>>>> line):
>>>>>
>>>>> powershell -executionPolicy bypass -command "& {$process =
>>>>> start-process $args[0] -passthru -argumentlist
>>>>> $args[1..($args.length-1)]; exit $process.id}" notepad test.txt
>>>>>
>>>>> echo Process ID of new process: %errorlevel%
>>>>>
>>>>>
>>>>>
>>>>> I can not test this at the moment.
>>>>>
>>>>>
>>>>
>>>> I tried.  It is a mess of errors.
>>>
>>> Post them here for us to see and guess :-)
>>>
>>
>>  >powershell -executionPolicy bypass -command "& {$process =
>> start-process $args[0] -passthru -argumentlist $args[1..($args.length-1)]
>>
>> Missing closing '}' in statement block or type definition.
>>      + CategoryInfo          : ParserError: (:) [],
>> ParentContainsErrorRecordException
>>      + FullyQualifiedErrorId : MissingEndCurlyBrace
>>
>
>
> You did not enter the complete command.
>
> Again, it is the next single line:
>
> powershell -executionPolicy bypass -command "& {$process = start-process
> $args[0] -passthru -argumentlist $args[1..($args.length-1)]; exit
> $process.id}" notepad test.txt
>
>
> All that in one single line. The next line in the script is:
>
> echo Process ID of new process: %errorlevel%
>
>

All that does is open up an empty notepad.

I purposely left that part off so I could see what
the command was doing. It was crashing.

Re: show me the run line???

<uqe5ot$1npap$2@dont-email.me>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=4820&group=alt.comp.os.windows-11#4820

  copy link   Newsgroups: alt.comp.os.windows-11
Path: i2pn2.org!i2pn.org!news.chmurka.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: T@invalid.invalid (T)
Newsgroups: alt.comp.os.windows-11
Subject: Re: show me the run line???
Date: Mon, 12 Feb 2024 14:23:25 -0800
Organization: A noiseless patient Spider
Lines: 77
Message-ID: <uqe5ot$1npap$2@dont-email.me>
References: <uq3g1f$24med$1@dont-email.me> <1wpamhbvggj4r.dlg@v.nguard.lh>
<uq3ksj$25o37$2@dont-email.me> <uq3qkf$27k9v$1@dont-email.me>
<qhli9kxrps.ln2@Telcontar.valinor> <uq73cf$327tl$1@dont-email.me>
<000k9kxgno.ln2@Telcontar.valinor> <uqbdu6$14bbf$2@dont-email.me>
<l2stncFb7snU1@mid.individual.net> <uqe1aq$1n09p$1@dont-email.me>
<f3gq9kx6ko.ln2@Telcontar.valinor> <uqe5o2$1npap$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Mon, 12 Feb 2024 22:23:26 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="c0e0de1431077c7f861f895d2ee4600f";
logging-data="1828185"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+fT//9osC4FmkrIoCIymlKxaGnob+9JdE="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:W70F/CJc8pXJ20T5yBUgKKSEwKk=
In-Reply-To: <uqe5o2$1npap$1@dont-email.me>
Content-Language: en-US
 by: T - Mon, 12 Feb 2024 22:23 UTC

On 2/12/24 14:22, T wrote:
> On 2/12/24 13:44, Carlos E.R. wrote:
>> On 2024-02-12 22:07, T wrote:
>>> On 2/11/24 13:49, Carlos E. R. wrote:
>>>> On 2024-02-11 22:24, T wrote:
>>>>> On 2/10/24 02:33, Carlos E.R. wrote:
>>>>>> On 2024-02-10 06:59, Paul wrote:
>>>>>>> On 2/9/2024 5:28 PM, Carlos E.R. wrote:
>>>>>>>> On 2024-02-09 01:11, T wrote:
>>>>>>>>> On 2/8/24 14:33, T wrote:
>>>>>>>>>> On 2/8/24 13:47, VanguardLH wrote:
>>>>
>>>> ...
>>>>
>>>>>>> These are part of the fork/exec part of UNIX/Linux.
>>>>>>>
>>>>>>> Windows doesn't work quite the same way. It's like
>>>>>>> eating at a fancy restaurant and the waiter forgot
>>>>>>> your fork and spoon. Some utensils are missing.
>>>>>>
>>>>>> I was a Windows programmer in the 90's, and I know I had this
>>>>>> problem. I don't remember the details, what I did back then.
>>>>>>
>>>>>> However, a google search suggests (the first paragraph is a single
>>>>>> line):
>>>>>>
>>>>>> powershell -executionPolicy bypass -command "& {$process =
>>>>>> start-process $args[0] -passthru -argumentlist
>>>>>> $args[1..($args.length-1)]; exit $process.id}" notepad test.txt
>>>>>>
>>>>>> echo Process ID of new process: %errorlevel%
>>>>>>
>>>>>>
>>>>>>
>>>>>> I can not test this at the moment.
>>>>>>
>>>>>>
>>>>>
>>>>> I tried.  It is a mess of errors.
>>>>
>>>> Post them here for us to see and guess :-)
>>>>
>>>
>>>  >powershell -executionPolicy bypass -command "& {$process =
>>> start-process $args[0] -passthru -argumentlist
>>> $args[1..($args.length-1)]
>>>
>>> Missing closing '}' in statement block or type definition.
>>>      + CategoryInfo          : ParserError: (:) [],
>>> ParentContainsErrorRecordException
>>>      + FullyQualifiedErrorId : MissingEndCurlyBrace
>>>
>>
>>
>> You did not enter the complete command.
>>
>> Again, it is the next single line:
>>
>> powershell -executionPolicy bypass -command "& {$process =
>> start-process $args[0] -passthru -argumentlist
>> $args[1..($args.length-1)]; exit $process.id}" notepad test.txt
>>
>>
>> All that in one single line. The next line in the script is:
>>
>> echo Process ID of new process: %errorlevel%
>>
>>
>
>
> All that does is open up an empty notepad.
>
> I purposely left that part off so I could see what
> the command was doing.  It was crashing.
>

What was the web site you got that from?

Re: show me the run line???

<sssq9kxuc1.ln2@Telcontar.valinor>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=4821&group=alt.comp.os.windows-11#4821

  copy link   Newsgroups: alt.comp.os.windows-11
Path: i2pn2.org!i2pn.org!newsfeed.endofthelinebbs.com!nntp.comgw.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: robin_listas@es.invalid (Carlos E.R.)
Newsgroups: alt.comp.os.windows-11
Subject: Re: show me the run line???
Date: Tue, 13 Feb 2024 02:23:08 +0100
Lines: 48
Message-ID: <sssq9kxuc1.ln2@Telcontar.valinor>
References: <uq3g1f$24med$1@dont-email.me> <1wpamhbvggj4r.dlg@v.nguard.lh>
<uq3ksj$25o37$2@dont-email.me> <uq3qkf$27k9v$1@dont-email.me>
<qhli9kxrps.ln2@Telcontar.valinor> <uq73cf$327tl$1@dont-email.me>
<000k9kxgno.ln2@Telcontar.valinor> <uqbdu6$14bbf$2@dont-email.me>
<l2stncFb7snU1@mid.individual.net> <uqe1aq$1n09p$1@dont-email.me>
<f3gq9kx6ko.ln2@Telcontar.valinor> <uqe5o2$1npap$1@dont-email.me>
<uqe5ot$1npap$2@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: individual.net DL159sSMOWEg8/5WZW1tCA6YMPbIp5zUkmKc/Ye8PugprJprQ8
X-Orig-Path: Telcontar.valinor!not-for-mail
Cancel-Lock: sha1:b2/ehAA+a/qxRwHDG4nBpbUrGcM= sha256:zGfIFjol/bYXkgK4iyirUnQGPuUC4Zf9dIVRsQaVR4A=
User-Agent: Mozilla Thunderbird
Content-Language: es-ES, en-CA
In-Reply-To: <uqe5ot$1npap$2@dont-email.me>
 by: Carlos E.R. - Tue, 13 Feb 2024 01:23 UTC

On 2024-02-12 23:23, T wrote:
> On 2/12/24 14:22, T wrote:
>> On 2/12/24 13:44, Carlos E.R. wrote:
>>> On 2024-02-12 22:07, T wrote:
>>>> On 2/11/24 13:49, Carlos E. R. wrote:
>>>>> On 2024-02-11 22:24, T wrote:

>>> You did not enter the complete command.
>>>
>>> Again, it is the next single line:
>>>
>>> powershell -executionPolicy bypass -command "& {$process =
>>> start-process $args[0] -passthru -argumentlist
>>> $args[1..($args.length-1)]; exit $process.id}" notepad test.txt
>>>
>>>
>>> All that in one single line. The next line in the script is:
>>>
>>> echo Process ID of new process: %errorlevel%
>>>
>>>
>>
>>
>> All that does is open up an empty notepad.

Did you run that from the script?
It is two lines, the second line prints the PID, supposedly. It is not
that complicated to test.

The notepad is just a dummy process to run and find its PID, I assume.

>>
>> I purposely left that part off so I could see what
>> the command was doing.  It was crashing.
>>
>
> What was the web site you got that from?

I don't remember, but you can google it easily and find it again:

<https://stackoverflow.com/questions/9486960/how-to-get-pid-of-process-just-started-from-within-a-batch-file>

--
Cheers, Carlos.

Pages:12
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor