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/
>