Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > microsoft.public.scripting.vbscript > #12355 > unrolled thread

wshell.run on a datafile sometimes fails - what could be causing it ?

Started by"R.Wieser" <address@not.available>
First post2021-07-08 12:25 +0200
Last post2021-07-10 11:07 +0200
Articles 5 — 2 participants

Back to article view | Back to microsoft.public.scripting.vbscript


Contents

  wshell.run on a datafile sometimes fails - what could be causing it ? "R.Wieser" <address@not.available> - 2021-07-08 12:25 +0200
    Re: wshell.run on a datafile sometimes fails - what could be causing it ? JJ <jj4public@gmail.com> - 2021-07-09 18:30 +0700
      Re: wshell.run on a datafile sometimes fails - what could be causing it ? "R.Wieser" <address@not.available> - 2021-07-09 15:34 +0200
        Re: wshell.run on a datafile sometimes fails - what could be causing it ? JJ <jj4public@gmail.com> - 2021-07-10 12:42 +0700
          Re: wshell.run on a datafile sometimes fails - what could be causing it ? "R.Wieser" <address@not.available> - 2021-07-10 11:07 +0200

#12355 — wshell.run on a datafile sometimes fails - what could be causing it ?

From"R.Wieser" <address@not.available>
Date2021-07-08 12:25 +0200
Subjectwshell.run on a datafile sometimes fails - what could be causing it ?
Message-ID<sc6js1$18mt$1@gioia.aioe.org>
Hello all,

I've made a small script which uses "wscript.run" to open a few folders, a 
console window and open a datafile (implicitily running its executable). 
Each of those steps is seperated by a sleep of half a second.  The script is 
manually started (by doubleclicking it).

The thing is that /sometimes/ the datafile step fails, and all I hear is a 
single beep.    I would like to know what causes it to fail, and what I can 
do against it.

Regards,
Rudy Wieser

[toc] | [next] | [standalone]


#12356

FromJJ <jj4public@gmail.com>
Date2021-07-09 18:30 +0700
Message-ID<n4hzkn0ub5bj.w1g96e7i2iw5$.dlg@40tude.net>
In reply to#12355
On Thu, 8 Jul 2021 12:25:59 +0200, R.Wieser wrote:
> Hello all,
> 
> I've made a small script which uses "wscript.run" to open a few folders, a 
> console window and open a datafile (implicitily running its executable). 
> Each of those steps is seperated by a sleep of half a second.  The script is 
> manually started (by doubleclicking it).
> 
> The thing is that /sometimes/ the datafile step fails, and all I hear is a 
> single beep.    I would like to know what causes it to fail, and what I can 
> do against it.

Is the datafile's type associated to a program file with full path, or just 
the file name?

[toc] | [prev] | [next] | [standalone]


#12357

From"R.Wieser" <address@not.available>
Date2021-07-09 15:34 +0200
Message-ID<sc9j94$19if$1@gioia.aioe.org>
In reply to#12356
JJ,

> Is the datafile's type associated to a program file with full path,
> or just the file name?

The program file is referred to by a full, absolute path (its not on the 
standard searchpath)

Regards,
Rudy Wieser

[toc] | [prev] | [next] | [standalone]


#12358

FromJJ <jj4public@gmail.com>
Date2021-07-10 12:42 +0700
Message-ID<pezn30rjn7ye$.1j4tkt00umhcs.dlg@40tude.net>
In reply to#12357
On Fri, 9 Jul 2021 15:34:15 +0200, R.Wieser wrote:
> 
> The program file is referred to by a full, absolute path (its not on the 
> standard searchpath)

If the data file dynamically created/updated, the program file might have 
problem opening it if it's done too soon where the data file is still being 
opened.

Or the program file might have an inconsistency during its initialization.

Either way, it's still not clear whether the error occured within 
WShell.Run(), or in the program file itself.

So, you might want to log the process using Microsoft Process Monitor to 
findout exactly when and how it fails. As many times as needed.

[toc] | [prev] | [next] | [standalone]


#12359

From"R.Wieser" <address@not.available>
Date2021-07-10 11:07 +0200
Message-ID<scbo1p$9i5$1@gioia.aioe.org>
In reply to#12358
JJ,

> Either way, it's still not clear whether the error occured within
> WShell.Run(), or in the program file itself.

There is a saying going along the lines of "the mother of all f*ckups is to 
assume something".

You're right, the problem isn't VBS, but the program itself.    Yesterday, 
just before turning in, I realized that the actual program is launched by a 
helper program (of my own hand).  Which uses a WaitForInputIdle timeout of 5 
seconds.  It looks like that the actual program (sometimes) takes more than 
that.

I've increased the timeout and changed the single beep to something a bit 
more "thats not the system thats complaining" sound.

Thanks for the help. :-)

Regards,
Rudy Wieser

[toc] | [prev] | [standalone]


Back to top | Article view | microsoft.public.scripting.vbscript


csiph-web