Gmail Calendar Documents Web Reader more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Message from discussion Script running infinitely when calling wscript.exe from code
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Tom Tyson  
View profile  
 More options Nov 2 2009, 12:06 pm
Newsgroups: microsoft.public.scripting.wsh
From: "Tom Tyson" <n...@spam.org>
Date: Mon, 2 Nov 2009 13:06:41 +0100
Local: Mon, Nov 2 2009 12:06 pm
Subject: Script running infinitely when calling wscript.exe from code
Hi, I have the following problem:

The following call suddenly causes the script to run infinetely:

            CreateObject("Wscript.Shell").Run "wscript.exe " &
Wscript.ScriptFullName

It seems it calls the script over and over, but there is only one instance
of wscript.exe running in Task Manager. However, I can see from the cpu
utilization and mouse pointer that the system is busy.

I have been using the script in which I use this for ages and it always
worked. Whats going on here?

Please see the following example of how I use the call:

--------------
Option Explicit

Main
Wscript.Quit 0

Sub Main()

If Instr(1, Wscript.FullName, "cscript", 1) = 0 Then
            CreateObject("Wscript.Shell").Run "wscript.exe " &
Wscript.ScriptFullName
            Wscript.Quit
End If

End Sub
---------------

This used to work and i did not modify anything!

Regards,
Tom


    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2010 Google