Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

"Little else matters than to write good code." -- Karl Lehenbauer


computers / alt.comp.os.windows-10 / STARTcommand, /D option

SubjectAuthor
* STARTcommand, /D optionStan Brown
+* Re: STARTcommand, /D optionHerbert Kleebauer
|+- Re: STARTcommand, /D optionZaidy036
|`* Re: STARTcommand, /D optionStan Brown
| `- Re: STARTcommand, /D optionHerbert Kleebauer
`* Re: STARTcommand, /D optionR.Wieser
 `* Re: STARTcommand, /D optionStan Brown
  `* Re: STARTcommand, /D optionR.Wieser
   +* Re: STARTcommand, /D optionPaul
   |`- Re: STARTcommand, /D optionStan Brown
   `* Re: STARTcommand, /D optionStan Brown
    `* Re: STARTcommand, /D optionR.Wieser
     `* Re: STARTcommand, /D optionStan Brown
      `* Re: STARTcommand, /D optionR.Wieser
       `- Re: STARTcommand, /D optionStan Brown

1
STARTcommand, /D option

<MPG.3f0562abe403fced990153@news.individual.net>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=72208&group=alt.comp.os.windows-10#72208

  copy link   Newsgroups: alt.comp.os.windows-10
Path: i2pn2.org!i2pn.org!usenet.goja.nl.eu.org!3.eu.feeder.erje.net!feeder.erje.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: the_stan...@fastmail.fm (Stan Brown)
Newsgroups: alt.comp.os.windows-10
Subject: STARTcommand, /D option
Date: Tue, 27 Jun 2023 22:19:11 -0700
Organization: Oak Road Systems
Lines: 43
Message-ID: <MPG.3f0562abe403fced990153@news.individual.net>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
X-Trace: individual.net 9a2ZxZgVOTZuYgShMk3xDw+mnqUbvwyv91hBsUwR14wPEZHDfa
Cancel-Lock: sha1:c6zjZNvqbC47fjIhmCW0pSb4eVc=
User-Agent: MicroPlanet-Gravity/3.0.11 (GRC)
 by: Stan Brown - Wed, 28 Jun 2023 05:19 UTC

When you create a shortcut to run an application, one of the fields
you can fill in is "Start in", which will be the current directory as
far as the application is concerned.

I have three startup programs that need to run in a specified order:
first AutoHotkey then KeePass, then VeraCrypt. So I created a batch
file to run them. The first line was

start "AutoHotkey" /D %AHKDATA%
"C:\Program Files\AutoHotkey\AutoHotkey.exe" Shortkeys.ahk

The %AHKDATA% variable -- defined as F:\ORS\CODE\AUTOHOTKEY --
contains the location of my AutoHotkey script files, and AutoHotkey
needs to run in that folder because Shortkeys.ahk contains several
#include commands. In the start command, /D {path} corresponds to the
"Start in" box in a shortcut.

I tested the above command in a command prompt, and it worked just as
I intended. Then I put it in a batch file, and put a shortcut to that
file in my startup folder. Instead of running AutoHotkey, Windows
popped up an Explorer window on the %AHKDATA% folder. In other words,
"/D" was ignored and %AHKDATA% was taken as the command.

Some googling found Rob Vanderwoude's page on the start command, and
he gives the syntax not as start /D {path} but as start /d{path},
with no space after the /d. I tried that in my batch file --
/d%AHKDATA% -- and it worked at startup!

I can't see any reason why the command parameter should be /d without
a space in a batch file run at startup, but /d with a space in a
command window after startup is complete. But maybe I'm overlooking
something. (There are no spaces or special characters in %AHKDATA% --
it's defined as F:\ORS\CODE\AUTOHOTKEY.)

Can anyone shed any light?

(At this point it's just curiosity. I changed my AutoHotkey script's
#include commands to specify the directory explicitly, so now the
start command doesn't need a /D parameter.)

--
Stan Brown, Tehachapi, California, USA https://BrownMath.com/
Shikata ga nai...

Re: STARTcommand, /D option

<u7gjbh$1mr10$1@dont-email.me>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=72209&group=alt.comp.os.windows-10#72209

  copy link   Newsgroups: alt.comp.os.windows-10
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: kle...@unibwm.de (Herbert Kleebauer)
Newsgroups: alt.comp.os.windows-10
Subject: Re: STARTcommand, /D option
Date: Wed, 28 Jun 2023 08:18:25 +0200
Organization: A noiseless patient Spider
Lines: 11
Message-ID: <u7gjbh$1mr10$1@dont-email.me>
References: <MPG.3f0562abe403fced990153@news.individual.net>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 28 Jun 2023 06:18:25 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="d92f583a7bc99e2995b7634b466dfe5d";
logging-data="1797152"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+k7Fn6lB9C5H+LYd+4ObVIElPo9zfpCC4="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.12.0
Cancel-Lock: sha1:6OLRI2BIBCX3mSa0oMrlRpVyRC8=
Content-Language: de-DE
In-Reply-To: <MPG.3f0562abe403fced990153@news.individual.net>
 by: Herbert Kleebauer - Wed, 28 Jun 2023 06:18 UTC

On 28.06.2023 07:19, Stan Brown wrote:

> start "AutoHotkey" /D %AHKDATA%
> "C:\Program Files\AutoHotkey\AutoHotkey.exe" Shortkeys.ahk

Maybe:

start "" "AutoHotkey" /D %AHKDATA%
"C:\Program Files\AutoHotkey\AutoHotkey.exe" Shortkeys.ahk

Re: STARTcommand, /D option

<u7gjtq$1mt4i$1@dont-email.me>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=72210&group=alt.comp.os.windows-10#72210

  copy link   Newsgroups: alt.comp.os.windows-10
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Zaidy...@air.isp.spam (Zaidy036)
Newsgroups: alt.comp.os.windows-10
Subject: Re: STARTcommand, /D option
Date: Wed, 28 Jun 2023 06:28:10 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 20
Message-ID: <u7gjtq$1mt4i$1@dont-email.me>
References: <MPG.3f0562abe403fced990153@news.individual.net>
<u7gjbh$1mr10$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Wed, 28 Jun 2023 06:28:10 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="ecf66448d03508114844ea53299eb407";
logging-data="1799314"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/s/UwWwR2oUZg6NfPMvwMW7SQWSvNvmxA="
User-Agent: NewsTap/5.5 (iPad)
Cancel-Lock: sha1:e2L91UQUCuKI1albqZe4C0rr7Aw=
sha1:bsf0aIxEWjrC5jxD1+Yf+BglV3M=
 by: Zaidy036 - Wed, 28 Jun 2023 06:28 UTC

Herbert Kleebauer <klee@unibwm.de> wrote:
> On 28.06.2023 07:19, Stan Brown wrote:
>
>> start "AutoHotkey" /D %AHKDATA%
>> "C:\Program Files\AutoHotkey\AutoHotkey.exe" Shortkeys.ahk
>
>
> Maybe:
>
> start "" "AutoHotkey" /D %AHKDATA%
> "C:\Program Files\AutoHotkey\AutoHotkey.exe" Shortkeys.ahk
>
>

Fastest and easiest is to add the folders to the PATH to eliminate
requiring specification in all batches.

--
Zaidy036

Re: STARTcommand, /D option

<MPG.3f05eeb764f8637e990152@news.individual.net>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=72215&group=alt.comp.os.windows-10#72215

  copy link   Newsgroups: alt.comp.os.windows-10
Path: i2pn2.org!i2pn.org!usenet.goja.nl.eu.org!3.eu.feeder.erje.net!feeder.erje.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: the_stan...@fastmail.fm (Stan Brown)
Newsgroups: alt.comp.os.windows-10
Subject: Re: STARTcommand, /D option
Date: Wed, 28 Jun 2023 08:16:47 -0700
Organization: Oak Road Systems
Lines: 24
Message-ID: <MPG.3f05eeb764f8637e990152@news.individual.net>
References: <MPG.3f0562abe403fced990153@news.individual.net> <u7gjbh$1mr10$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
X-Trace: individual.net yqRIePJJdYfo0eBW9OFSyw4gCrkhLixxmG080Cio6QMJ8X4arT
Cancel-Lock: sha1:mgWLkJ0ua6lUtT8W1bDrnGs5sss=
User-Agent: MicroPlanet-Gravity/3.0.11 (GRC)
 by: Stan Brown - Wed, 28 Jun 2023 15:16 UTC

On Wed, 28 Jun 2023 08:18:25 +0200, Herbert Kleebauer
wrote:
>
> On 28.06.2023 07:19, Stan Brown wrote:
>
> > start "AutoHotkey" /D %AHKDATA%
> > "C:\Program Files\AutoHotkey\AutoHotkey.exe" Shortkeys.ahk
>
>
> Maybe:
>
> start "" "AutoHotkey" /D %AHKDATA%
> "C:\Program Files\AutoHotkey\AutoHotkey.exe" Shortkeys.ahk

Thank you for replying, but it's not clear to me how
that would work at all. One leading double-quoted
parameter is the window title. Two leading quoted
parameters doesn't seem consistent with the published
command syntax.

--
Stan Brown, Tehachapi, California, USA
https://BrownMath.com/
Shikata ga nai...

Re: STARTcommand, /D option

<u7hm42$1qehc$1@dont-email.me>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=72216&group=alt.comp.os.windows-10#72216

  copy link   Newsgroups: alt.comp.os.windows-10
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: addr...@is.invalid (R.Wieser)
Newsgroups: alt.comp.os.windows-10
Subject: Re: STARTcommand, /D option
Date: Wed, 28 Jun 2023 18:11:30 +0200
Organization: A noiseless patient Spider
Lines: 45
Message-ID: <u7hm42$1qehc$1@dont-email.me>
References: <MPG.3f0562abe403fced990153@news.individual.net>
Injection-Date: Wed, 28 Jun 2023 16:11:46 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="862d04d7c765ed32ca7ece0457218e50";
logging-data="1915436"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+19YAol/jcfvj4w/3Hkqyw0wIo9v4g558sb5RE/UYZtg=="
Cancel-Lock: sha1:j2mYkIw7j4CiQqgXm0wbLanoo0Y=
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5512
X-MSMail-Priority: Normal
X-RFC2646: Format=Flowed; Original
X-Priority: 3
 by: R.Wieser - Wed, 28 Jun 2023 16:11 UTC

Stan,

> In other words, "/D" was ignored and %AHKDATA% was taken as the
> command.

No, I don't think that that "/D" was ignored. It just saw an empty path,
ended by the space (don't know how the "start" command responds to that, but
it might just refuse to try to set an empty "working directory" path). The
next argument, in your case the (contents of) "%AHKDATA%" was than -
rightfully so - taken as the command and the last two as its arguments.

You might want to enter "start /?" on the commandline and see what it thinks
how it should be called. In my case it says "[/Dpath]". Mind you, no space
after the "/D".

Though in my case following the "/D" with some (white)space works from both
the commandline and a batchfile started from that commandline. Than again,
I'm running a bit older version of Windows ...

> I tested the above command in a command prompt, and it worked just
> as intended.

It might have worked as intended, but not as you thought it did (there is a
big difference between those two).

Assuming that your "start" commands "/D" considers the argument terminated
on a (white)space than you should have had the same "%AHKDATA% was taken as
the command" problem there too. The only reason I can think of that that
didn't happen is that %AHKDATA% variable didn't contain a path, but just
(white)space (and was thus skipped).

.... At least, in my OS an non-existing environment variable stays as-is in
the command (it can't be replaced by its contents because it doesn't exist).
If that has changed in Win10 and non-existing environment variables get
scrubbed from the command than not (yet) having set that environment
variable would ofcourse give the same effect.

I'm afraid you will need to have to do some (further) tests to figure out
what exactly went on.

Regards,
Rudy Wieser

Re: STARTcommand, /D option

<u7hr21$1quqh$1@dont-email.me>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=72218&group=alt.comp.os.windows-10#72218

  copy link   Newsgroups: alt.comp.os.windows-10
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: kle...@unibwm.de (Herbert Kleebauer)
Newsgroups: alt.comp.os.windows-10
Subject: Re: STARTcommand, /D option
Date: Wed, 28 Jun 2023 19:36:01 +0200
Organization: A noiseless patient Spider
Lines: 22
Message-ID: <u7hr21$1quqh$1@dont-email.me>
References: <MPG.3f0562abe403fced990153@news.individual.net>
<u7gjbh$1mr10$1@dont-email.me>
<MPG.3f05eeb764f8637e990152@news.individual.net>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 28 Jun 2023 17:36:01 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="d92f583a7bc99e2995b7634b466dfe5d";
logging-data="1932113"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/o9p1Eiew9edwrwwSpX1+UROjdYH9nOpI="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.12.0
Cancel-Lock: sha1:smdEwNrJu2ExAAlzH+Hd9krgW1Y=
In-Reply-To: <MPG.3f05eeb764f8637e990152@news.individual.net>
Content-Language: de-DE, en-US
 by: Herbert Kleebauer - Wed, 28 Jun 2023 17:36 UTC

On 28.06.2023 17:16, Stan Brown wrote:
> On Wed, 28 Jun 2023 08:18:25 +0200, Herbert Kleebauer
> wrote:
>>
>> On 28.06.2023 07:19, Stan Brown wrote:
>>
>> > start "AutoHotkey" /D %AHKDATA%
>> > "C:\Program Files\AutoHotkey\AutoHotkey.exe" Shortkeys.ahk
>>
>>
>> Maybe:
>>
>> start "" "AutoHotkey" /D %AHKDATA%
>> "C:\Program Files\AutoHotkey\AutoHotkey.exe" Shortkeys.ahk
>
> Thank you for replying, but it's not clear to me how
> that would work at all.

Sorry, my fault. Didn't read carefully enough.

Re: STARTcommand, /D option

<MPG.3f064e6b1da4a114990154@news.individual.net>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=72220&group=alt.comp.os.windows-10#72220

  copy link   Newsgroups: alt.comp.os.windows-10
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!lilly.ping.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: the_stan...@fastmail.fm (Stan Brown)
Newsgroups: alt.comp.os.windows-10
Subject: Re: STARTcommand, /D option
Date: Wed, 28 Jun 2023 15:05:03 -0700
Organization: Oak Road Systems
Lines: 89
Message-ID: <MPG.3f064e6b1da4a114990154@news.individual.net>
References: <MPG.3f0562abe403fced990153@news.individual.net> <u7hm42$1qehc$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
X-Trace: individual.net hr8CF4SPIks8DxDBlCIQWAIuW/u4ZQLvmMUrzju387wZUMf1at
Cancel-Lock: sha1:ttQws0nvUWxyp43JD9KwC4qpcUo=
User-Agent: MicroPlanet-Gravity/3.0.11 (GRC)
 by: Stan Brown - Wed, 28 Jun 2023 22:05 UTC

On Wed, 28 Jun 2023 18:11:30 +0200, R.Wieser wrote:
>
> Stan,
>
> > In other words, "/D" was ignored and %AHKDATA% was taken as the
> > command.
>
> No, I don't think that that "/D" was ignored. It just saw an empty path,
> ended by the space (don't know how the "start" command responds to that, but
> it might just refuse to try to set an empty "working directory" path). The
> next argument, in your case the (contents of) "%AHKDATA%" was than -
> rightfully so - taken as the command and the last two as its arguments.

Your explanation makes sense.

> You might want to enter "start /?" on the commandline and see what it thinks
> how it should be called. In my case it says "[/Dpath]". Mind you, no space
> after the "/D".

I should have mentioned that I checked syntax not only via Google but
by "start /?" on the command line. "start /?" has "/D path", with
space, in the syntax, matching the syntax guide on Microsoft's site.

So it appears that the version of /D in "start/?" works from command
line and from batch file initiated by the user, but not from batch
file initiated by Windows at startup.

> Though in my case following the "/D" with some (white)space works from both
> the commandline and a batchfile started from that commandline. Than again,
> I'm running a bit older version of Windows ...

Windows 10 here, 10.0.19044.3086 specifically.

It worked for me in the command line, and in a batch file I ran by
double-clicking the shortcut I created in the Startup folder under
the Start Menu. The very same batch file gave the bad behavior when
run by Windows at login time: it displayed the folder that %AHKDATA%
points to instead of running AutoHotkey).

> > I tested the above command in a command prompt, and it worked just
> > as intended.
>
> It might have worked as intended, but not as you thought it did (there is a
> big difference between those two).

I understand: hence my question. :-)
> Assuming that your "start" commands "/D" considers the argument terminated
> on a (white)space than you should have had the same "%AHKDATA% was taken as
> the command" problem there too. The only reason I can think of that that
> didn't happen is that %AHKDATA% variable didn't contain a path, but just
> (white)space (and was thus skipped).

No, it was a valid path, F:\ORS\CODE\AUTOHOTKEY. And the variable
itself was set in the Registry, not on the command line. A later
command in the batch file, %KEEPASS%, was set in the same way but
with path _and_ program, and that one was executed, so environment
variables must have been populated by the time the batch file was run
at startup.

> ... At least, in my OS an non-existing environment variable stays as-is in
> the command (it can't be replaced by its contents because it doesn't exist).
> If that has changed in Win10 and non-existing environment variables get
> scrubbed from the command than not (yet) having set that environment
> variable would ofcourse give the same effect.

Seems to be the same in Windows 10: "echo %XYZ%" at the command line
echoes %XYZ% with the percent signs. But that can't be the issue
here, since this .CMD file did work as expected when I ran it in the
two ways I described above, just not when Windows ran it at startup.
%AHKDATA% was indeed defined, and correctly. If it was an issue of
environment variables not being populated till a later time in
startup, then the %KEEPASS% command in the batch file would have
failed the also, but it I know it didn't fail because KeePass started
up normally.

Anyway, thanks for replying. I can't imagine how the /D argument in
the start command would work differently between a batch file run as
part of startup and the same batch file initiated by the user
clicking the shortcut in the Startup folder, but that's what seems to
happen.

I'd feel worse about this if I didn't have a workaround: changing my
AutoHotkey script to make the locations of the #include files
explicit.

--
Stan Brown, Tehachapi, California, USA https://BrownMath.com/
Shikata ga nai...

Re: STARTcommand, /D option

<u7jakj$23ci5$1@dont-email.me>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=72223&group=alt.comp.os.windows-10#72223

  copy link   Newsgroups: alt.comp.os.windows-10
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: addr...@is.invalid (R.Wieser)
Newsgroups: alt.comp.os.windows-10
Subject: Re: STARTcommand, /D option
Date: Thu, 29 Jun 2023 09:07:40 +0200
Organization: A noiseless patient Spider
Lines: 17
Message-ID: <u7jakj$23ci5$1@dont-email.me>
References: <MPG.3f0562abe403fced990153@news.individual.net> <u7hm42$1qehc$1@dont-email.me> <MPG.3f064e6b1da4a114990154@news.individual.net>
Injection-Date: Thu, 29 Jun 2023 07:08:04 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="4939a30e3019636f9505df1fa9692ee0";
logging-data="2208325"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/oXCMueodsqybgoIaRNKBe+JzCWU82U4szIU/PdNbMPw=="
Cancel-Lock: sha1:tLl68sjlB6Nl/OE74NLKXzNvMgQ=
X-Priority: 3
X-MSMail-Priority: Normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5512
X-RFC2646: Format=Flowed; Original
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
 by: R.Wieser - Thu, 29 Jun 2023 07:07 UTC

Stan,

> I can't imagine how the /D argument in the start command would
> work differently between a batch file run as part of startup
> and the same batch file initiated by the user clicking the
> shortcut in the Startup folder

Although I could imagine that, its way to unlikely.

As a test you could try to replace the %AHKDATA% variable with its actual
contents and see if you now get the same result. If not than that seems to
indicate that that variable is filled later than you think ...

Regards,
Rudy Wieser

Re: STARTcommand, /D option

<u7jn5e$24me7$1@dont-email.me>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=72225&group=alt.comp.os.windows-10#72225

  copy link   Newsgroups: alt.comp.os.windows-10
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: nos...@needed.invalid (Paul)
Newsgroups: alt.comp.os.windows-10
Subject: Re: STARTcommand, /D option
Date: Thu, 29 Jun 2023 06:41:50 -0400
Organization: A noiseless patient Spider
Lines: 24
Message-ID: <u7jn5e$24me7$1@dont-email.me>
References: <MPG.3f0562abe403fced990153@news.individual.net>
<u7hm42$1qehc$1@dont-email.me>
<MPG.3f064e6b1da4a114990154@news.individual.net>
<u7jakj$23ci5$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Thu, 29 Jun 2023 10:41:50 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="83afaa009d7b39b4c3384ecc26e5ca2b";
logging-data="2251207"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19K5C3ntSDIvtQg9YashETfzdInasPBvk4="
User-Agent: Ratcatcher/2.0.0.25 (Windows/20130802)
Cancel-Lock: sha1:huSb5OO85iupHnVXK6FW9idLI+4=
Content-Language: en-US
In-Reply-To: <u7jakj$23ci5$1@dont-email.me>
 by: Paul - Thu, 29 Jun 2023 10:41 UTC

On 6/29/2023 3:07 AM, R.Wieser wrote:
> Stan,
>
>> I can't imagine how the /D argument in the start command would
>> work differently between a batch file run as part of startup
>> and the same batch file initiated by the user clicking the
>> shortcut in the Startup folder
>
> Although I could imagine that, its way to unlikely.
>
> As a test you could try to replace the %AHKDATA% variable with its actual
> contents and see if you now get the same result. If not than that seems to
> indicate that that variable is filled later than you think ...
>
> Regards,
> Rudy Wieser

Hypothetically speaking, what would happen if
the evaluated %AHKDATA% has a space character in the path ?
Is that whole launch sequence "proofed" against that ?
Or does it need double quotes around it ?

Paul

Re: STARTcommand, /D option

<MPG.3f071a52fae537a4990155@news.individual.net>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=72226&group=alt.comp.os.windows-10#72226

  copy link   Newsgroups: alt.comp.os.windows-10
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!news.imp.ch!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: the_stan...@fastmail.fm (Stan Brown)
Newsgroups: alt.comp.os.windows-10
Subject: Re: STARTcommand, /D option
Date: Thu, 29 Jun 2023 05:34:59 -0700
Organization: Oak Road Systems
Lines: 15
Message-ID: <MPG.3f071a52fae537a4990155@news.individual.net>
References: <MPG.3f0562abe403fced990153@news.individual.net> <u7hm42$1qehc$1@dont-email.me> <MPG.3f064e6b1da4a114990154@news.individual.net> <u7jakj$23ci5$1@dont-email.me> <u7jn5e$24me7$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
X-Trace: individual.net 7SzyAkA99dlLdEgay5/LxQlWuB4XzWhlgi7G+MSX0b8S5qIG5X
Cancel-Lock: sha1:DulYfqKhzG0fyDt6Vi9JLGizqB8=
User-Agent: MicroPlanet-Gravity/3.0.11 (GRC)
 by: Stan Brown - Thu, 29 Jun 2023 12:34 UTC

On Thu, 29 Jun 2023 06:41:50 -0400, Paul wrote:
> Hypothetically speaking, what would happen if
> the evaluated %AHKDATA% has a space character in the path ?
> Is that whole launch sequence "proofed" against that ?
> Or does it need double quotes around it ?
>

I believe it would need double quotes, but it's a moot
point because the value of %AHKDATA% is
F:\ORS\CODE\AUTOHOTKEY

--
Stan Brown, Tehachapi, California, USA
https://BrownMath.com/
Shikata ga nai...

Re: STARTcommand, /D option

<MPG.3f071b02d326b136990156@news.individual.net>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=72227&group=alt.comp.os.windows-10#72227

  copy link   Newsgroups: alt.comp.os.windows-10
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!news.imp.ch!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: the_stan...@fastmail.fm (Stan Brown)
Newsgroups: alt.comp.os.windows-10
Subject: Re: STARTcommand, /D option
Date: Thu, 29 Jun 2023 05:38:00 -0700
Organization: Oak Road Systems
Lines: 25
Message-ID: <MPG.3f071b02d326b136990156@news.individual.net>
References: <MPG.3f0562abe403fced990153@news.individual.net> <u7hm42$1qehc$1@dont-email.me> <MPG.3f064e6b1da4a114990154@news.individual.net> <u7jakj$23ci5$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
X-Trace: individual.net r2b2OmBxD3jKfo4jCm0uPgtP0leaozvJOlaj3yJPdYKatQ/YBf
Cancel-Lock: sha1:4+e7lqVvE98qdDApbvDmiXkyE68=
User-Agent: MicroPlanet-Gravity/3.0.11 (GRC)
 by: Stan Brown - Thu, 29 Jun 2023 12:38 UTC

On Thu, 29 Jun 2023 09:07:40 +0200, R.Wieser wrote:
> As a test you could try to replace the %AHKDATA% variable with its actual
> contents and see if you now get the same result. If not than that seems to
> indicate that that variable is filled later than you think ...

Well, I could, but I don't think there's any reason to.
Maybe I didn't explain well last time:

In the same batch file I have a _command_ %KEEPASS% to
open that program. The program does open at login; I
know this because it prompts me for the master
password. Therefore I know that environment variables
are already populated.

(And no, that prompt couldn't be coming from KeePass
opening in a different way. When I wrote the batch file
I removed the other shortcuts from the Startup folder
in the start menu. KeePass's option to start
automaticaly is unchecked.)

--
Stan Brown, Tehachapi, California, USA
https://BrownMath.com/
Shikata ga nai...

Re: STARTcommand, /D option

<u7jv05$25ldc$1@dont-email.me>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=72229&group=alt.comp.os.windows-10#72229

  copy link   Newsgroups: alt.comp.os.windows-10
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: addr...@is.invalid (R.Wieser)
Newsgroups: alt.comp.os.windows-10
Subject: Re: STARTcommand, /D option
Date: Thu, 29 Jun 2023 14:54:39 +0200
Organization: A noiseless patient Spider
Lines: 18
Message-ID: <u7jv05$25ldc$1@dont-email.me>
References: <MPG.3f0562abe403fced990153@news.individual.net> <u7hm42$1qehc$1@dont-email.me> <MPG.3f064e6b1da4a114990154@news.individual.net> <u7jakj$23ci5$1@dont-email.me> <MPG.3f071b02d326b136990156@news.individual.net>
Injection-Date: Thu, 29 Jun 2023 12:55:33 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="4939a30e3019636f9505df1fa9692ee0";
logging-data="2282924"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19eSl022wElP5pk0bsw96NB9EoJArFCxNpl8NZ9wnK9Sw=="
Cancel-Lock: sha1:oOsY9rrb2PDZ/3b4SDCiyEauEEg=
X-RFC2646: Format=Flowed; Original
X-MSMail-Priority: Normal
X-Priority: 3
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5512
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
 by: R.Wieser - Thu, 29 Jun 2023 12:54 UTC

Stan,

>> As a test you could try to replace the %AHKDATA% variable with its
>> actual contents and see if you now get the same result.

> Well, I could, but I don't think there's any reason to.

Understood.

You already said that you got it running. I just thought you would be
curious to the reason of your earlier try not working. At least, that is
what your initial post conveyed ...

Regards,
Rudy Wieser

Re: STARTcommand, /D option

<MPG.3f07c25163efbd2b990158@news.individual.net>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=72236&group=alt.comp.os.windows-10#72236

  copy link   Newsgroups: alt.comp.os.windows-10
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!lilly.ping.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: the_stan...@fastmail.fm (Stan Brown)
Newsgroups: alt.comp.os.windows-10
Subject: Re: STARTcommand, /D option
Date: Thu, 29 Jun 2023 17:31:47 -0700
Organization: Oak Road Systems
Lines: 28
Message-ID: <MPG.3f07c25163efbd2b990158@news.individual.net>
References: <MPG.3f0562abe403fced990153@news.individual.net> <u7hm42$1qehc$1@dont-email.me> <MPG.3f064e6b1da4a114990154@news.individual.net> <u7jakj$23ci5$1@dont-email.me> <MPG.3f071b02d326b136990156@news.individual.net> <u7jv05$25ldc$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
X-Trace: individual.net MuiG9BAzESutucp+gzKmCg+wlfOi0w0F7g2OHuFp+lxQ+iydCF
Cancel-Lock: sha1:Msm/e3sd6BQOw6NXmcwPyX2ieus=
User-Agent: MicroPlanet-Gravity/3.0.11 (GRC)
 by: Stan Brown - Fri, 30 Jun 2023 00:31 UTC

On Thu, 29 Jun 2023 14:54:39 +0200, R.Wieser wrote:
>
> Stan,
>
> >> As a test you could try to replace the %AHKDATA% variable with its
> >> actual contents and see if you now get the same result.
>
> > Well, I could, but I don't think there's any reason to.
>
> Understood.
>
> You already said that you got it running. I just thought you would be
> curious to the reason of your earlier try not working. At least, that is
> what your initial post conveyed ...

I _am_ curious, but "environment variables not populated" is not the
cause. I've explained why, a couple of times,(*) but if you think I'm
wrong please set me straight.

(*) In the same batch file I have a _command_ %KEEPASS% to
open that program. The program does open at login; I
know this because it prompts me for the master
password. Therefore I know that environment variables
are already populated.

--
Stan Brown, Tehachapi, California, USA https://BrownMath.com/
Shikata ga nai...

Re: STARTcommand, /D option

<u7m86e$2gpnf$1@dont-email.me>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=72238&group=alt.comp.os.windows-10#72238

  copy link   Newsgroups: alt.comp.os.windows-10
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: addr...@is.invalid (R.Wieser)
Newsgroups: alt.comp.os.windows-10
Subject: Re: STARTcommand, /D option
Date: Fri, 30 Jun 2023 11:44:23 +0200
Organization: A noiseless patient Spider
Lines: 30
Message-ID: <u7m86e$2gpnf$1@dont-email.me>
References: <MPG.3f0562abe403fced990153@news.individual.net> <u7hm42$1qehc$1@dont-email.me> <MPG.3f064e6b1da4a114990154@news.individual.net> <u7jakj$23ci5$1@dont-email.me> <MPG.3f071b02d326b136990156@news.individual.net> <u7jv05$25ldc$1@dont-email.me> <MPG.3f07c25163efbd2b990158@news.individual.net>
Injection-Date: Fri, 30 Jun 2023 09:44:47 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="999079f0f9c12e6b591b4c71d27be2f9";
logging-data="2647791"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18aezJxwWiqsyv/lt9wUSQCJ+gEv2juQ0DwUWWi7jndQA=="
Cancel-Lock: sha1:9PIlw4GzkSjC0KkQc3C3gPLtIro=
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
X-MSMail-Priority: Normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5512
X-Priority: 3
X-RFC2646: Format=Flowed; Original
 by: R.Wieser - Fri, 30 Jun 2023 09:44 UTC

Stan,

> I _am_ curious, but "environment variables not populated" is not
> the cause.

Besides Murphies Law my own experience tells me that just discarding
possiblilites because "that can't ever be it" are a good way to waste lot of
time. :-\

Besides, it would take you ... 5 minutes ?

> In the same batch file I have a _command_ %KEEPASS% to
> open that program. The program does open at login

I read that and I believe you. But to me that /proves/ nothing.

>Therefore I know that environment variables are already populated.

No you don't. You just /assume/ they *all* are.

"Yesterday I checked if my cars left rear tire had enough air in it. It
had, so I assumed the others had too. I was stopped and got a ticket for
three missing tires."

Yeah, thats a joke. But I hope you get my drift there.

Regards,
Rudy Wieser

Re: STARTcommand, /D option

<MPG.3f08d5a88bd6ce4699015f@news.individual.net>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=72246&group=alt.comp.os.windows-10#72246

  copy link   Newsgroups: alt.comp.os.windows-10
Path: i2pn2.org!i2pn.org!news.neodome.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: the_stan...@fastmail.fm (Stan Brown)
Newsgroups: alt.comp.os.windows-10
Subject: Re: STARTcommand, /D option
Date: Fri, 30 Jun 2023 13:06:39 -0700
Organization: Oak Road Systems
Lines: 44
Message-ID: <MPG.3f08d5a88bd6ce4699015f@news.individual.net>
References: <MPG.3f0562abe403fced990153@news.individual.net> <u7hm42$1qehc$1@dont-email.me> <MPG.3f064e6b1da4a114990154@news.individual.net> <u7jakj$23ci5$1@dont-email.me> <MPG.3f071b02d326b136990156@news.individual.net> <u7jv05$25ldc$1@dont-email.me> <MPG.3f07c25163efbd2b990158@news.individual.net> <u7m86e$2gpnf$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
X-Trace: individual.net NSQDlMA6eOpKOfYBh5M5nwTHfM2xyq77XT0LZLxqvBb33aY7CR
Cancel-Lock: sha1:6TsgUBs/n4ljEmRBj8nKo7QbWv0=
User-Agent: MicroPlanet-Gravity/3.0.11 (GRC)
 by: Stan Brown - Fri, 30 Jun 2023 20:06 UTC

On Fri, 30 Jun 2023 11:44:23 +0200, R.Wieser wrote:
>
> Stan,
>
> > I _am_ curious, but "environment variables not populated" is not
> > the cause.
>
> Besides Murphies Law my own experience tells me that just discarding
> possiblilites because "that can't ever be it" are a good way to waste lot of
> time. :-\
>
> Besides, it would take you ... 5 minutes ?
>
> > In the same batch file I have a _command_ %KEEPASS% to
> > open that program. The program does open at login
>
> I read that and I believe you. But to me that /proves/ nothing.

Well, it's awfully hard to imagine Windows would populate some user
environment variables, then run a shortcut in the startup folder,
then populate the rest of the user environment variables (or run the
two tasks simultaneously, which would come to the same thing). But
let that pass.

I actually disposed of "environment variables not populated" in my
first post to this thread. It's been so long ago that I forgot about
it till now. :-)

As I reported then, when I used /d%APPDATA%, the batch file worked as
desired _both_ when initiated by double-click on the shortcut _and_
when started by Windows at login. With /D %APPDATA%, it worked
_after_ startup but not _during_. It may be worth pointing out that
Microsoft's own documentation, on the web and in "start /?",
specifies /D with following space, and no warning about batch files
that run at startup.

Unless someone has a better explanation, I'm going to chalk it up to
a weird bug in Windows, that probably never got noticed because,
after all, how many people (A) run batch files that (2) contain start
commands (c) with a directory parameter (iv) at login time?

--
Stan Brown, Tehachapi, California, USA https://BrownMath.com/
Shikata ga nai...

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor