FIX: The Microsoft Script Control (Msscript.ocx) may time out before the time that is set by using the Timeout property as the system uptime approaches 49.7 days

Article translations Article translations
Article ID: 892296 - View products that this article applies to.
Expand all | Collapse all

SYMPTOMS

When you use the Microsoft Script Control (Msscript.ocx) in an application, the script control may time out before the time that is set by using the Timeout property. You may receive an error message that is similar to the following:
ScriptControl (-2147467259) The script was aborted because execution exceeded the specified timeout period.
This issue occurs as the system uptime approaches 49.7 days.

CAUSE

This issue occurs because the script control incorrectly calculates how long the script has been running.

RESOLUTION

A supported hotfix is now available from Microsoft, but it is only intended to correct the problem that this article describes. Apply it only to systems that are experiencing this specific problem.

Note You must have a Visual Studio license agreement to obtain this hotfix.

To resolve this problem, contact Microsoft Product Support Services to obtain the hotfix. For a complete list of Microsoft Product Support Services telephone numbers and information about support costs, visit the following Microsoft Web site:
http://support.microsoft.com/contactus/?ws=support
Note In special cases, charges that are ordinarily incurred for support calls may be canceled if a Microsoft Support Professional determines that a specific update will resolve your problem. The usual support costs will apply to additional support questions and issues that do not qualify for the specific update in question.

The English version of this hotfix has the file attributes (or later file attributes) that are listed in the following table. The dates and times for these files are listed in Coordinated Universal Time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time tool in Control Panel.

Microsoft Windows 2000 on x86-based systems
   Date         Time   Version     Size     File name     
   -----------------------------------------------------
   06-Apr-2005  01:12  1.0.0.8827  106,554  Msscript.ocx   
Microsoft Windows Server 2003 Itanium-based systems
   Date         Time   Version     Size    File name     
   -----------------------------------------------------
   11-Feb-2005  06:06  1.0.0.8822  98,304  Wmsscript.ocx
Microsoft Windows Server 2003 on x86-based systems
   Date         Time   Version     Size    File name     
   ----------------------------------------------------
   11-Feb-2005  07:06  1.0.0.8822  98,304  Msscript.ocx
Microsoft Windows XP on x86-based systems
   Date         Time    Version    Size     File name     
   -----------------------------------------------------
   28-Feb-2005  15:16  1.0.0.8827  102,400  Msscript.ocx     

MORE INFORMATION

The Microsoft Script Control (Msscript.ocx) is an ActiveX control that can be used to run VBScript code and JavaScript code in an application. The script control has a Timeout property that programs can use to control the maximum time that a script can run.

To calculate the length of time that a script has been running, Msscript.ocx calls the GetTickCount Windows function. The GetTickCount function returns a long variable that contains the number of milliseconds that have elapsed after the system was started. Msscript.ocx adds the value in the Timeout property of the control to determine when the script should be interupted.

At approximately 49.7 days of system uptime, the GetTickCount function returns 0xFFFFFFFF and then wraps back around to 0x00000000. When the current GetTickCount function value is added to the value in the Timeout property of the control, the script control incorrectly calculates the period of time that the script has been running and immediately causes the script to time out.

Properties

Article ID: 892296 - Last Review: October 9, 2011 - Revision: 2.0
APPLIES TO
  • Microsoft Visual Basic 6.0 Professional Edition
  • Microsoft Visual Basic 6.0 Enterprise Edition
Keywords: 
kbscript kbpending kbfix kbbug kbHotfixServer kbqfe KB892296

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com