I've downloaded MS WMI Code Creator 1.0 and used it on a few occasions with
considerable pleasure. One problem I cannot seem to solve is to extend the
timeot for script runs. After about 30 seconds or so the script runs are
terminated with an error message for some more complicated scripts. The word
complicated means not the number of statements but apparently the functions
they try to execute like accessing kernel, etc.

How can I set this parameter to a longer value? I think I saw somehwere a
statement for timeout that can be inserted directly into the scripts but now
cannot recall. Also manually inserting this statement in every script that is
generated may not be a good idea.

I run Vista Ultimate 32 bits.

Thanks

--
AlexB

Re: How to extend Timeout for WScripts? by Tom

Tom
Wed Apr 30 09:33:55 CDT 2008

On Apr 30, 10:20 am, AlexB <Al...@discussions.microsoft.com> wrote:
> I've downloaded MS WMI Code Creator 1.0 and used it on a few occasions with
> considerable pleasure. One problem I cannot seem to solve is to extend the
> timeot for script runs. After about 30 seconds or so the script runs are
> terminated with an error message for some more complicated scripts. The word
> complicated means not the number of statements but apparently the functions
> they try to execute like accessing kernel, etc.
>
> How can I set this parameter to a longer value? I think I saw somehwere a
> statement for timeout that can be inserted directly into the scripts but now
> cannot recall. Also manually inserting this statement in every script that is
> generated may not be a good idea.
>
> I run Vista Ultimate 32 bits.
>
> Thanks
>
> --
> AlexB

Assuming the scripts are run under the Windows Script Host (WSH), the
easiest way to reset the timeout is to access the Start/Run (or its
equivalent in Vista) and key in WSCRIPT. This should open the
Properties dialog which has just one item - timeout. Uncheck the
"Stop script after specified number of seconds:" box and all of your
scripts will gladly run for as long as the computer runs - or adjust
the number to suit.

This can also be done at a command prompt or via the Run line using
the //T:0 command line switch for Wscript.exe.

Tom Lavedas
===========
http://members.cox.net/tglbatch/wsh/

Re: How to extend Timeout for WScripts? by AlexB

AlexB
Thu May 01 13:21:02 CDT 2008

Thank you Toim,

Believe it or not the checkbox was unchecked. I checked it and set it to 300
secs assuming that perhaps there is a default that is less than that.

I am running a major install now form a command prompt and cannot check the
result but will try to report back.

What are other options if any?

I mean you said: assuming WHS, what other options might be there?

Thanks.
--
AlexB


"Tom Lavedas" wrote:

> On Apr 30, 10:20 am, AlexB <Al...@discussions.microsoft.com> wrote:
> > I've downloaded MS WMI Code Creator 1.0 and used it on a few occasions with
> > considerable pleasure. One problem I cannot seem to solve is to extend the
> > timeot for script runs. After about 30 seconds or so the script runs are
> > terminated with an error message for some more complicated scripts. The word
> > complicated means not the number of statements but apparently the functions
> > they try to execute like accessing kernel, etc.
> >
> > How can I set this parameter to a longer value? I think I saw somehwere a
> > statement for timeout that can be inserted directly into the scripts but now
> > cannot recall. Also manually inserting this statement in every script that is
> > generated may not be a good idea.
> >
> > I run Vista Ultimate 32 bits.
> >
> > Thanks
> >
> > --
> > AlexB
>
> Assuming the scripts are run under the Windows Script Host (WSH), the
> easiest way to reset the timeout is to access the Start/Run (or its
> equivalent in Vista) and key in WSCRIPT. This should open the
> Properties dialog which has just one item - timeout. Uncheck the
> "Stop script after specified number of seconds:" box and all of your
> scripts will gladly run for as long as the computer runs - or adjust
> the number to suit.
>
> This can also be done at a command prompt or via the Run line using
> the //T:0 command line switch for Wscript.exe.
>
> Tom Lavedas
> ===========
> http://members.cox.net/tglbatch/wsh/
>

Re: How to extend Timeout for WScripts? by Tom

Tom
Thu May 01 13:41:23 CDT 2008

On May 1, 2:21 pm, AlexB <Al...@discussions.microsoft.com> wrote:
> Thank you Toim,
>
> Believe it or not the checkbox was unchecked. I checked it and set it to 300
> secs assuming that perhaps there is a default that is less than that.
>
> I am running a major install now form a command prompt and cannot check the
> result but will try to report back.
>
> What are other options if any?
>
> I mean you said: assuming WHS, what other options might be there?
>
> Thanks.
> --
> AlexB
>
> "Tom Lavedas" wrote:
> > On Apr 30, 10:20 am, AlexB <Al...@discussions.microsoft.com> wrote:
> > > I've downloaded MS WMI Code Creator 1.0 and used it on a few occasions with
> > > considerable pleasure. One problem I cannot seem to solve is to extend the
> > > timeot for script runs. After about 30 seconds or so the script runs are
> > > terminated with an error message for some more complicated scripts. The word
> > > complicated means not the number of statements but apparently the functions
> > > they try to execute like accessing kernel, etc.
>
> > > How can I set this parameter to a longer value? I think I saw somehwere a
> > > statement for timeout that can be inserted directly into the scripts but now
> > > cannot recall. Also manually inserting this statement in every script that is
> > > generated may not be a good idea.
>
> > > I run Vista Ultimate 32 bits.
>
> > > Thanks
>
> > > --
> > > AlexB
>
> > Assuming the scripts are run under the Windows Script Host (WSH), the
> > easiest way to reset the timeout is to access the Start/Run (or its
> > equivalent in Vista) and key in WSCRIPT. This should open the
> > Properties dialog which has just one item - timeout. Uncheck the
> > "Stop script after specified number of seconds:" box and all of your
> > scripts will gladly run for as long as the computer runs - or adjust
> > the number to suit.
>
> > This can also be done at a command prompt or via the Run line using
> > the //T:0 command line switch for Wscript.exe.
>
> > Tom Lavedas
> > ===========
> >http://members.cox.net/tglbatch/wsh/

Well, there's always Powershell (but not wit hVBS, of course). I just
wasn't familiar with the WMI Code Creator. I know of the Helpomatic
HTA, but wasn't certain what code base the application you mentioned
might create for - .Net, maybe. VBS is also used in HTAs, HTML and
ASP.

However, if the script times out with the selection unchecked, then
the timeout isn't likely to be coming from the script host, but it
could be the result of one of the underlying WMI functions - of which
I am no expert. I use it a little, but usually for the simple stuff -
never for something that runs for as long as 30 seconds (unless I
screw up and put it in an unintentional infinite loop ;)

Tom Lavedas
===========
http://members.cox.net/tglbatch/wsh/

Re: How to extend Timeout for WScripts? by Bob

Bob
Thu May 01 14:06:53 CDT 2008

AlexB wrote:
> I've downloaded MS WMI Code Creator 1.0 and used it on a few
> occasions with considerable pleasure. One problem I cannot seem to
> solve is to extend the timeot for script runs. After about 30 seconds
> or so the script runs are terminated with an error message for some
> more complicated scripts.

There are many components that can be used in vbscript (ADO, FSO, etc.)
any of which could be timing out. We cannot help you without knowing the
exact error message.


--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.



Re: How to extend Timeout for WScripts? by urkec

urkec
Thu May 01 14:43:06 CDT 2008

"AlexB" wrote:

> Thank you Toim,
>
> Believe it or not the checkbox was unchecked. I checked it and set it to 300
> secs assuming that perhaps there is a default that is less than that.
>
> I am running a major install now form a command prompt and cannot check the
> result but will try to report back.
>
> What are other options if any?
>
> I mean you said: assuming WHS, what other options might be there?
>
> Thanks.
> --
> AlexB
>
>
> "Tom Lavedas" wrote:
>
> > On Apr 30, 10:20 am, AlexB <Al...@discussions.microsoft.com> wrote:
> > > I've downloaded MS WMI Code Creator 1.0 and used it on a few occasions with
> > > considerable pleasure. One problem I cannot seem to solve is to extend the
> > > timeot for script runs. After about 30 seconds or so the script runs are
> > > terminated with an error message for some more complicated scripts. The word
> > > complicated means not the number of statements but apparently the functions
> > > they try to execute like accessing kernel, etc.
> > >
> > > How can I set this parameter to a longer value? I think I saw somehwere a
> > > statement for timeout that can be inserted directly into the scripts but now
> > > cannot recall. Also manually inserting this statement in every script that is
> > > generated may not be a good idea.
> > >
> > > I run Vista Ultimate 32 bits.
> > >
> > > Thanks
> > >
> > > --
> > > AlexB
> >
> > Assuming the scripts are run under the Windows Script Host (WSH), the
> > easiest way to reset the timeout is to access the Start/Run (or its
> > equivalent in Vista) and key in WSCRIPT. This should open the
> > Properties dialog which has just one item - timeout. Uncheck the
> > "Stop script after specified number of seconds:" box and all of your
> > scripts will gladly run for as long as the computer runs - or adjust
> > the number to suit.
> >
> > This can also be done at a command prompt or via the Run line using
> > the //T:0 command line switch for Wscript.exe.
> >
> > Tom Lavedas
> > ===========
> > http://members.cox.net/tglbatch/wsh/
> >


For WMI settings try Win32_WMISetting class, (maybe MaxWaitOnClientObjects
property).

--
urkec

Re: How to extend Timeout for WScripts? by AlexB

AlexB
Thu May 01 22:35:00 CDT 2008

Well, you may be right after all.

What happened was that I tried the WMI Code creator mostly at my home
machine (identical to the workstation at the office) and in here as I found
out the box was checked. At the office it was unchecked but I do not recall
if I tried the code creator over there. So, I unchecked the box now and it
seems so far it's been working.

I am posting the link for downloading this excellent API. You will enjoy it.
Thousands of scripts can be isntantly generated. I still do not understand
many aspects of it. in some cases the script is generated but the information
that is had is miniscule. It could be that corresponding services are not in
the machine at all. I don't know.

http://www.microsoft.com/downloads/details.aspx?familyid=2CC30A64-EA15-4661-8DA4-55BBC145C30E&displaylang=en

I have another question though:

How can I run a simple exec from a WScript? I cannot figure it out. I need
something like Process.Start ( filePath ); in C#. the filePath may be a full
path to an exec or a URL.

Could you please, give me a script for that?

Thanks.
--
AlexB


"Tom Lavedas" wrote:

> On May 1, 2:21 pm, AlexB <Al...@discussions.microsoft.com> wrote:
> > Thank you Toim,
> >
> > Believe it or not the checkbox was unchecked. I checked it and set it to 300
> > secs assuming that perhaps there is a default that is less than that.
> >
> > I am running a major install now form a command prompt and cannot check the
> > result but will try to report back.
> >
> > What are other options if any?
> >
> > I mean you said: assuming WHS, what other options might be there?
> >
> > Thanks.
> > --
> > AlexB
> >
> > "Tom Lavedas" wrote:
> > > On Apr 30, 10:20 am, AlexB <Al...@discussions.microsoft.com> wrote:
> > > > I've downloaded MS WMI Code Creator 1.0 and used it on a few occasions with
> > > > considerable pleasure. One problem I cannot seem to solve is to extend the
> > > > timeot for script runs. After about 30 seconds or so the script runs are
> > > > terminated with an error message for some more complicated scripts. The word
> > > > complicated means not the number of statements but apparently the functions
> > > > they try to execute like accessing kernel, etc.
> >
> > > > How can I set this parameter to a longer value? I think I saw somehwere a
> > > > statement for timeout that can be inserted directly into the scripts but now
> > > > cannot recall. Also manually inserting this statement in every script that is
> > > > generated may not be a good idea.
> >
> > > > I run Vista Ultimate 32 bits.
> >
> > > > Thanks
> >
> > > > --
> > > > AlexB
> >
> > > Assuming the scripts are run under the Windows Script Host (WSH), the
> > > easiest way to reset the timeout is to access the Start/Run (or its
> > > equivalent in Vista) and key in WSCRIPT. This should open the
> > > Properties dialog which has just one item - timeout. Uncheck the
> > > "Stop script after specified number of seconds:" box and all of your
> > > scripts will gladly run for as long as the computer runs - or adjust
> > > the number to suit.
> >
> > > This can also be done at a command prompt or via the Run line using
> > > the //T:0 command line switch for Wscript.exe.
> >
> > > Tom Lavedas
> > > ===========
> > >http://members.cox.net/tglbatch/wsh/
>
> Well, there's always Powershell (but not wit hVBS, of course). I just
> wasn't familiar with the WMI Code Creator. I know of the Helpomatic
> HTA, but wasn't certain what code base the application you mentioned
> might create for - .Net, maybe. VBS is also used in HTAs, HTML and
> ASP.
>
> However, if the script times out with the selection unchecked, then
> the timeout isn't likely to be coming from the script host, but it
> could be the result of one of the underlying WMI functions - of which
> I am no expert. I use it a little, but usually for the simple stuff -
> never for something that runs for as long as 30 seconds (unless I
> screw up and put it in an unintentional infinite loop ;)
>
> Tom Lavedas
> ===========
> http://members.cox.net/tglbatch/wsh/
>

Re: How to extend Timeout for WScripts? by Tom

Tom
Fri May 02 07:26:04 CDT 2008

On May 1, 11:35 pm, AlexB <Al...@discussions.microsoft.com> wrote:
> Well, you may be right after all.
>
> I have another question though:
>
> How can I run a simple exec from a WScript? I cannot figure it out. I need
> something like Process.Start ( filePath ); in C#. the filePath may be a full
> path to an exec or a URL.
>
> Could you please, give me a script for that?
>
> Thanks.
> --
> AlexB

Look at the WSH documentation for the Run method of the Wscript.Shell
object.

WSH 5.6 documentation download (URL all one line)
http://www.microsoft.com/downloads/details.aspx?FamilyId=01592C48-207D-4BE1-8A76-1C4099D7BBB9&displaylang=en

Tom Lavedas
===========
http://members.cox.net/tglbatch/wsh/

Re: How to extend Timeout for WScripts? by AlexB

AlexB
Fri May 02 13:39:04 CDT 2008

I cannot open many chm files in Vista. Any ideas how I can do it? he default
brouser is Microsoft html help executable. None of the links are available. I
get blank pages. I can handle Shell object though. Still curious about that
help file. Would be good to have it.
--
AlexB


"Tom Lavedas" wrote:

> On May 1, 11:35 pm, AlexB <Al...@discussions.microsoft.com> wrote:
> > Well, you may be right after all.
> >
> > I have another question though:
> >
> > How can I run a simple exec from a WScript? I cannot figure it out. I need
> > something like Process.Start ( filePath ); in C#. the filePath may be a full
> > path to an exec or a URL.
> >
> > Could you please, give me a script for that?
> >
> > Thanks.
> > --
> > AlexB
>
> Look at the WSH documentation for the Run method of the Wscript.Shell
> object.
>
> WSH 5.6 documentation download (URL all one line)
> http://www.microsoft.com/downloads/details.aspx?FamilyId=01592C48-207D-4BE1-8A76-1C4099D7BBB9&displaylang=en
>
> Tom Lavedas
> ===========
> http://members.cox.net/tglbatch/wsh/
>