Bryan,

I don't think it is possible to tell a service to hang when shutting 
down, but it would be easy to do in VB.NET through your own Windows Service.

In fact so easy I wrote a simple windows service for you if interested:

http://www.arizonaitpro.com/downloads/windowsservice_testhang_setup.msi

The MSI package installs the service and:

    * Requires administrator access to install
    * is started and stopped manually through the services.msc applet
    * on service 'stop' it will hang for 30 seconds through a sleep on
      the current thread
    * will log start and stop events in the Application log
    * can be uninstalled from add/remove programs

I have tested it on three machines, but use at your own risk, yada yada 
yada.

Klint Price
Arizona IT Pro



Bryan Garmon wrote:
> I'm trying to test how a VBScript I've written will respond to a service
> that is in a hung or "stopping" state. Anyone have any good methods for
> simulating this behavior? Maybe a script that will force a service to hang?
>
>
> ~ Upgrade to Next Generation Antispam/Antivirus with Ninja!    ~
> ~ <http://www.sunbelt-software.com/SunbeltMessagingNinja.cfm>  ~
>   


~ Upgrade to Next Generation Antispam/Antivirus with Ninja!    ~
~ <http://www.sunbelt-software.com/SunbeltMessagingNinja.cfm>  ~

Reply via email to