Access Violation with ShutDownWindows

Hints, tips and tricks for newbies

Moderators: Dorian (MJT support), JRL

Post Reply
Jaylee
Junior Coder
Posts: 45
Joined: Wed Feb 08, 2006 4:48 am

Access Violation with ShutDownWindows

Post by Jaylee » Wed Apr 18, 2007 8:36 am

Using Version 9 on XP SP2.

At the end of the day I have a macro scheduled to simply shut down the PC and reboot to the Desktop ready for the next morning. This is also a network requirement for the overnight deployment of system patches, etc.

My macro is simply:
ShutDownWindows>1

When the appointed time arrives, the macro unlocks the PC and attempts to use the command but I get a Macro Scheduler error message which states:
Access Violation at address 00405B0E in module 'msched.exe'. Read of address 6E546732.

I can get this error either once or repeatedly and may need to use the Task Manager to close MS if it gets stuck in a loop. At the moment, I have gone back to using the classic script for shutting down Windows with no issues.

FWIW, the network environment is totally up-to-date with security patches for XP.

Has anyone else experienced this type of error? Any thoughts?

J. :)

Aaron
Pro Scripter
Posts: 113
Joined: Mon Apr 09, 2007 1:35 am
Location: Wyoming

scheduler service

Post by Aaron » Wed Apr 18, 2007 3:15 pm

Try looking under ( Scheduler service ) in Macro Scheduler help.

This may help.

Good Luck
Aaron

Jaylee
Junior Coder
Posts: 45
Joined: Wed Feb 08, 2006 4:48 am

Post by Jaylee » Thu Apr 19, 2007 2:32 am

Hello Aaron,

Thank you for the suggestion, however, this macro isn't set to run under the scheduling service (as I understand it). The box is not ticked.

I did read through the Help file but cannot relate anything to this scenario. Of course, this may simply be that I haven't picked up any relevant points.

When this macro is set to run, I am logged into the PC and this is set to use AutoLogon to unlock the workstation, then tell Windows to Shut Down and Reboot at 17:30 on M, T, W, T, F.

It unlocks okay but when it attempts to execute the ShutDownWindows command, I get the Access Violation error.

Any more thoughts, please?

J.

Jaylee
Junior Coder
Posts: 45
Joined: Wed Feb 08, 2006 4:48 am

Post by Jaylee » Mon Apr 23, 2007 9:08 am

I am now getting the Access Violation error using the standard keyboard-emulating ShutDownWindows at the end of the day ... but not every time.

All other scheduled macros run okay. The log for this one says it has run through the scripted steps but Windows is not shutting down.

I have tried to re-run the macro from the Quick Launch menu. Sometimes this works just fine. I see the Start menu and the Log Out screen appear, and Windows then shuts down and re-boots.

At other times, I get no response. MS seems to be hung in some way. When it's like this, if I exit MS, I then get Access Violation messages one after another.

Using the Task Manager, I cannot see any applications running (including MS), so I've been hitting the power button to stop the problem and force a re-boot.

The text from today's log when the shutdown failed to complete shows the following:
23/04/2007 17:32:35:755 - Started Macro : ShutDownWindows
23/04/2007 17:32:35:755 - //Wait>5
23/04/2007 17:32:40:755 - Wait>5
23/04/2007 17:32:40:755 - Press CTRL
23/04/2007 17:32:40:755 - Press Esc
23/04/2007 17:32:40:755 - Release CTRL
23/04/2007 17:32:41:755 - Wait>1
23/04/2007 17:32:41:755 - Send Character/Text>u
23/04/2007 17:32:43:146 - Wait>1
23/04/2007 17:32:43:146 - Send Character/Text>r
23/04/2007 17:32:44:146 - Wait>1
23/04/2007 17:32:44:177 - PushButton>Shut Down Windows,OK
23/04/2007 17:32:44:177 - Finished Macro : ShutDownWindows
As you can see, the log says everything should have worked but Windows simply did not respond in the expected manner.

Any thoughts about where I'm going wrong, please?

TIA.

J

User avatar
Marcus Tettmar
Site Admin
Posts: 7380
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Mon Apr 23, 2007 10:10 am

Have you tried:

ShutDownWindows>4

This does a forced reboot, forcing all open applications to close, whereas with 1 the shutdown may be suppressed by other processes that are running.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

Jaylee
Junior Coder
Posts: 45
Joined: Wed Feb 08, 2006 4:48 am

Post by Jaylee » Tue Apr 24, 2007 8:34 am

Hi Marcus,

ShutDownWindows>4 worked.

I am still interested in knowing why the first option fails intermittently. I scheduled the macro to run tonight while I sat and watched. PC unlocked, Start menu activated, the Restart window appeared, the PC re-locked without shutting down. I added Wait>5 to the end of the macro. Same result. The log shows the macro ran through to completion.

I have checked in msconfig and cannot see anything wrong in there. Macro Scheduler shows as Stopped. Auto Logon shows Stopped. I tried to run the original script again. Same result. No shut down.

An earlier version used to "hang" when it came to the end of the day shut down sequence but this was resolved. It does seem to be something MS is doing. Once the shut down fails, I can unlock the PC and manually run the macro. Often, absolutely nothing happens. No response to the Run command. When I get this "no response" and try to exit MS, I get continual Access Violation messages which can only be stopped by forcing a power off.

Thank you for the earlier reply. I'll keep playing ...

J.

User avatar
Marcus Tettmar
Site Admin
Posts: 7380
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Tue Apr 24, 2007 8:40 am

>I am still interested in knowing why the first option fails
>intermittently.

Because some other process is sometimes not allowing Windows to shut down. ShutDownWindows>4 works because it forces Windows to close down uncooperative processes.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts