VB 4.0 Apps Can Only Be Scheduled Using System Account

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[ASCII 146]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.




Process does not have access rights to location pointed to by ecx. Performing the same procedure under the system account no violation occurs.

Keywords : kbenv nthowto ntconfig ntui
Version : 3.5 3.51 4.0
Platform : winnt
Issue type :


Last Reviewed: February 13, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.