Re: piping / redirecting into a vbs script ?

Frank Slootweg <[email protected]>
Newsgroups alt.comp.os.windows-xp,alt.windows7.general
Organization NOYB
Message-ID <[email protected]>
Kerr-Mudd, John <[email protected]> wrote:
> On 24 Apr 2024 12:46:12 GMT
> Frank Slootweg <[email protected]> wrote:
> 
> > [Disclaimer: I don't know the first thing about VBScript, but have a
> > brain and am not afraid to use it.]
> > 
> > VanguardLH <[email protected]> wrote:
> > [...]
> > 
> > > In this case, he wants files themselves to do reads and writes of other
> > > files.  He wants data objects aka files to be programs themselves, so
> > > files can read and write, and can do anything else he wants.  He has
> > > watched too many Marvel and Harry Potter movies.  Logic interferes with
> > > his obstreperous temperament.
> > 
> >   FTR, AFAICT he does *not* "want files themselves to do reads and
> > writes of other files". (I think) That's your misunderstanding. The
> > 'files' are not "data objects", but a VBScript (myvbscript[.vbs]), i.e.
> > it *is* a program. That's clear by the fact that the .vbs file *is*
> > executed.
> > 
> >   I don't know how a .vbs file gets executed, but I assume it works like
> > .exe and .bat files that the command interpreter (cmd.exe) sees that
> > myvbscript is actually myvbscript.vbs and hence calls wscript.exe to
> > execute myvbscript.vbs.
> 
> You'd be wrong there; 'anyfile.vbs' (or any other 'thing' gets dealt with
> by Windows 'associations'); anything ending with '.vbs' would
> normally be associated with 'wscript.exe'

  Of course, but the point is that in Rudy's first examples, he doesn't
use myvbscript.vbs, but just myvbscript. So *something* must translate
myvbscript to myvbscript.vbs, *before* file associations, i.e.
associating .vbs with wscript.exe, come into play. My guess was/is that
the 'command interpreter' (Rudy doesn't say how he invokes his commands)
does the ttranlation from myvbscript to myvbscript.vbs.

> '.exe' & '.bat' files (again, normally) get sent to the command interpreter
> and are then either executed (if EXE by loading and finding the start
> point) or seen as BATCH and interpreted by the command (or should I say
> CMD) parser.

  Again, first something has to translate from <filename> to
<filename>.exe or <filename>.bat. I think (for example) cmd.exe does
that translation.

> >   Rudy's problem is that he can't imagine that someone interprets his
> > posts in any other way than he does. If there's another interpretation,
> > it's the other guy's fault and things go downhill from there.
> 
> He does seem to want to specify his 'problem' very tightly but then not
> accept any workaround suggested. It's pointless trying to help ISTM.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.