Re: Running a script on windows2000 logoff/shutdown

From: Ken Schaefer (kenREMOVE_at_THISadOpenStatic.com)
Date: 03/15/04


Date: Mon, 15 Mar 2004 16:07:22 +1100

If you want something to be able to cancel the shutdown, you really need to
ask in one of the programming groups, to find out what APIs/events your
application needs to hook into. Otherwise the Windows shutdown process is
simply going to kill any process that's running (including, say, Windows
Script Host, which would be hosting the dialogue box).

Otherwise, start googling for 3rd party products. (or if the server is
Windows 2003, turn on the Shutdown tracker).

Cheers
Ken

"Jonathan Heath" <Jon@nospam.thecityground.co.uk> wrote in message
news:diZ4c.676$nN6.281@newsfe1-win...
: Thanks for your reply
:
: This is something senior management have requested, I don't think them
: disabling it would be a good career move :-)
:
: What I meant really was by putting it in their face on logoff/shutdown
: they'll always have to fill it in...it eradicates them forgetting to fill
it
: in. I could have a link on the desktop, but they might well forget to run
: it before logoff/shutdown.
:
: Another idea would be to run a windows popup box (not asp) asking them if
: they're sure they want to shutdown/logoff, but rewording it. So "Have you
: filled in the server log" Yes/No. With Yes continuing shutdown/logoff and
: No taking them back into Windows.
:
: Would this be easy to do?
:
: Cheers
: JH
:
:
: "Ken Schaefer" <kenREMOVE@THISadOpenStatic.com> wrote in message
: news:uOaNyYcCEHA.3064@tk2msftngp13.phx.gbl...
: > Hi,
: >
: > If you're techs are admins on the server, there's no way, technically,
of
: > forcing them to anything, since they are administrators, and they can
: > disable anything that you configure :-)
: >
: > Additionally, an ASP page needs to be delivered via some kind of server
: > resource, and is presented in a browser (which runs in user-mode, and
has
: no
: > particularly special attributes). The user can just close the browser
: > without filling in anything. Likewise, if the server is shutting down or
: the
: > user logging off, the browser will be automatically closed down as part
: > process (the only apps that aren't automatically closed down are those
: with
: > a dialogue box awaiting a user response, eg Word asking a user if they
: want
: > to save a document before closing).
: >
: > Windows 2003 Server, and Windows XP Pro have a shut-down tracker that
you
: > can configure for this purpose (details are logged to the Windows Event
: > log). Otherwise, I think you need to find a third party product, or
start
: > researching how to write a service that can hook into whatever events
: > Windows generates when it's shutting down/logging off.
: >
: > Cheers
: > Ken
: >
: > "Jonathan Heath" <Jon@nospam.thecityground.co.uk> wrote in message
: > news:NRX4c.2009$Yx1.1107@newsfe5-gui.server.ntli.net...
: > : I am trying to do our own server log. We have around 20 servers.
When
: > one
: > : of our techs does something on a server I want them to be forced to
fill
: > in
: > : a form saying what they have done on the server. By doing it on
logoff
: or
: > : shutdown it forces them into doing it so the log will be a true
: > reflection
: > : of what is happening. We need this information for various reasons.
: > :
: > : I thought the best way to do it would be an ASP popup into an access
: > : database on shutdown/logoff. Bearing in mind that my skills are web
: > : programming as opposed to other programming.
: > :
: > : Thanks
: > : JH
: > :
: > :
: > : > I don't really think this is feasible. For other thing, the system
: will
: > be
: > : > capable of terminating the process that is running the script (eg
: > : > WScript.exe or InetInfo.exe) if the user doesn't enter anything
: > (sometimes
: > : > you see the "program xyz is has not responded in a timely manner. Do
: you
: > : > want to terminate the program?" type prompts).
: > : >
: > : > I assume that Windows itself provides APIs that you can hook into
for
: > : doing
: > : > these things. You'd need to write an application or a service
though.
: > : >
: > : > Can you tell us what you are thinking of doing? Perhaps there is a
: > : different
: > : > way?
: > : >
: > : > Cheers
: > : > Ken
: > : >
: > : >
: > : > "Jonathan Heath" <Jon@nospam.thecityground.co.uk> wrote in message
: > : > news:_SN4c.1$K4.0@newsfe1-win...
: > : > : Hi all,
: > : > :
: > : > : I have created an ASP script that enters data into an Access
: Database.
: > : > :
: > : > : My problem is that I'd like this script to run when the computer
is
: > : > shutdown
: > : > : or the user logs off.
: > : > :
: > : > : I think this would be simple enough if the ASP didn't have any
user
: > : input,
: > : > : but it does.
: > : > :
: > : > : How can I do it that the logoff/shutdown only continues after the
: ASP
: > : form
: > : > : has been submitted?
: > : > :
: > : > : Any other suggestions on getting around the problem if it isn't
: > possible
: > : > to
: > : > : do it using the above method would also be appreciated.
: > : > :
: > : > : Thanks
: > : > :
: > : > : JH
: > : > :
: > : > :
: > : > :
: > : >
: > : >
: > :
: > :
: >
: >
:
:



Relevant Pages

  • Windows 2000 (Pro and Server) having services.exe error and rebooting
    ... I'd say probably a quarter of our Windows ... following error and rebooting: ... Window Title: System Shutdown ... and this KB does not refer to 2K Pro, only Server. ...
    (microsoft.public.win2000.general)
  • Re: Connecting VS.NET 2003 to IIS6/WSS
    ... successful at creating a web app with the source tree on the web server. ... >> I'm posting this question here, rather than in the programming group, ... >> web apps, web parts, etc. wants to find an IIS installation (with Windows ...
    (microsoft.public.sharepoint.windowsservices)
  • Re: 23 Minutes to Shutdown Enterprise Server 2003?
    ... Although it's tempting to blame it on the security patches you installed, ... Some of these issues may not be relevant to your Shutdown situation. ... 'Troubleshooting Windows XP Shutdown Issues' but info is relative to Windows ... Server 2003 as well. ...
    (microsoft.public.windows.server.general)
  • Re: Running a script on windows2000 logoff/shutdown
    ... If you want something to be able to cancel the shutdown, ... Otherwise the Windows shutdown process is ... filled in the server log" Yes/No. ... :>: programming as opposed to other programming. ...
    (microsoft.public.inetserver.asp.general)
  • Re: Shutdown hangs...
    ... Exchange on a DC - the AD services shut down right away, ... My SBS 2003 server has been in service since ... >> Server shutdown operation is very slow. ... and then restart Windows Small Business Server ...
    (microsoft.public.windows.server.sbs)

Loading