Faster Way To Restart A Service?

P

(PeteCresswell)

I've got a little laptop that is used over WiFi 99.9% of the
time.

Problem is that every time I put it to sleep and then wake it up,
the WiFi connection is either hosed or it is connected to some
other wireless router in the area.

My workaround has been to always have My Computer | Manage |
Services and Applications | Services open in "advanced" mode and
click on "Restart the service" for "Wireless Zero Configuration".

Assuming that the hosed connection/connected to another router
thing is just the way things are... Is there something I can do
that will give me an icon in the quick-launch bar that will
restart that service?

I'm thinking of maybe a .BAT or .CMD file that invokes whatever
application is behind "Manage" and feeds it a command line
argument to do the deed and then close itself.
 
G

Guest

Peter,

Why don't you create the wireless connection to your router as
preferred/automatic? You can go into the properties of your wireless card &
remove the check to turn off to allow power save etc. That way you won't
have to restart the service

In a batch file though you can use:

net stop ""
net start ""

Put the 'display name' (not service name) of the zero configuration service
between the double quotes & then you can double-click it to restart the
service - simple

Example:

Open a new text document

@echo off
Net Stop "Display Name Here"
Net Start "Display Name Here"

File menu | Save As

Give it a filename & add '.bat' to the end of the filename
Click File Types | All Types
Click Save

All you need to do is double-click the newly created batch file to restart
your service
 
E

Elmo

(PeteCresswell) said:
I've got a little laptop that is used over WiFi 99.9% of the
time.

Problem is that every time I put it to sleep and then wake it up,
the WiFi connection is either hosed or it is connected to some
other wireless router in the area.

My workaround has been to always have My Computer | Manage |
Services and Applications | Services open in "advanced" mode and
click on "Restart the service" for "Wireless Zero Configuration".

Assuming that the hosed connection/connected to another router
thing is just the way things are... Is there something I can do
that will give me an icon in the quick-launch bar that will
restart that service?

I'm thinking of maybe a .BAT or .CMD file that invokes whatever
application is behind "Manage" and feeds it a command line
argument to do the deed and then close itself.

Open Device Manager, open the properties on your ethernet card, click
the Power tab, and deselect "Allow the computer to turn off this device
to save power".

You can do the same thing with a USB device by disabling the power
saving feature of all "USB Root Hub" entries.
 
J

jeffturner

(PeteCresswell);3286016 said:
I've got a little laptop that is used over WiFi 99.9% of the
time.

Problem is that every time I put it to sleep and then wake it up,
the WiFi connection is either hosed or it is connected to some
other wireless router in the area.

My workaround has been to always have My Computer | Manage |
Services and Applications | Services open in "advanced" mode and
click on "Restart the service" for "Wireless Zero Configuration".

Assuming that the hosed connection/connected to another router
thing is just the way things are... Is there something I can do
that will give me an icon in the quick-launch bar that will
restart that service?

I'm thinking of maybe a .BAT or .CMD file that invokes whatever
application is behind "Manage" and feeds it a command line
argument to do the deed and then close itself.
Good to read this
 
3

3c273

Download PSTools from MS and put them in your system32 folder. Then put the
following in a bat file:

psservice restart wzcsvc

There is also a freeware program called Hibernate Trigger that will run a
command on resume. So you could set this up to happen automatically
everytime you wake your machine. Google it.

Louis
 
P

(PeteCresswell)

Per Elmo:
Open Device Manager, open the properties on your ethernet card, click
the Power tab, and deselect "Allow the computer to turn off this device
to save power".

I noticed that it was set to something like "Always on".


Seemed counter-intuitive that I'd want it turned off.

What am I missing?
 
P

(PeteCresswell)

Per 3c273:
Download PSTools from MS and put them in your system32 folder. Then put the
following in a bat file:

psservice restart wzcsvc

There is also a freeware program called Hibernate Trigger that will run a
command on resume. So you could set this up to happen automatically
everytime you wake your machine. Google it.

Thanks Louis.

Thanks David, SpamCop, Elmo, and Jeff.

psservice and HibernateTrigger together seem to have nailed it
with the least pain/suffering.

Sounds like "sc" is similar to psservice - but needs "Stop" then
"Start" to cover all bases all the time.... so I went with
psservice.

Thanks again to all.
 
E

Elmo

(PeteCresswell) said:
Per Elmo:

I noticed that it was set to something like "Always on".


Seemed counter-intuitive that I'd want it turned off.

What am I missing?

You want it "always on". You're not seeing that where I intended you to
go, I'm afraid.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top