VB 4.0 Apps Can Only Be Scheduled Using System Account

Last reviewed: November 14, 1997
Article ID: Q149215
The information in this article applies to:
  • Microsoft Windows NT Workstation versions 3.5, 3.51, 4.0
  • Microsoft Windows NT Server versions 3.5, 3.51, 4.0

SUMMARY

When you run a Microsoft Visual Basic 4.0 application using the AT Scheduler service, if the service is configured to use any account other than the system user account, the application will quit, and in Windows NT 3.51 get the following error:

   Unexpected error, quitting

Under Windows NT 4.0, you will get the following error:

   Application error caused a Stack Fault in Module <unknown> 00c7:4394f
   will close.


CAUSE

Windows applications can be scheduled to run interactively only if the Scheduler service is running under the system user account (the default account). If you reconfigure the Scheduler service to run using any other account, including administrator accounts, then Windows applications cannot be scheduled to run fully interactively (that is, they cannot make use of the screen and keyboard). This apparent limitation is designed to avoid possible security issues.

If you attempt to schedule a Microsoft Visual Basic 4.0 application under any account other than the system account, the VB runtime DLL VB40032.dll will cause a memory access violation because it does not have access rights to some desktop resources.

NOTE: If you try to run a VB4 application with scheduler under Windows NT 4.00, you will get the following error regardless of whether you have scheduler setup for the /INTERACTIVE switch and "Allow Service To Interact With Desktop":

   Application Error
   Caused a Stack Fault in Module <unknown>00c7:4394|||will close

For additional information on this error, please see the following article in the Microsoft Knowledge Base:

   ARTICLE-ID: Q156735
   TITLE     : WOW Applications Stack Fault When Launched by a Service

NOTE: If you schedule a VB5 application it will work fine with system account or a specific user’s account (necessary for network access)

WORKAROUND

To get a VB 4.0 application to run under the scheduler service using Windows NT 3.51, do the following:

  1. Ensure that the Scheduler service is configured to run using the system account. To do this, select the Services tool under Control Panel. From the list of services, select Schedule and click the Startup button. Make sure that you click the Log On As System Account button.

  2. When you schedule the application using the AT command line, make sure you include the interactive switch.


Additional query words:
Keywords : ntconfig nthowto ntui kbenv
Version : 3.5 3.51 4.0
Platform : winnt
Hardware : ALPHA x86


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: November 14, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.