Larry Brister
asked on
Pause WinService??
I have a Windows Service I created in VB.Net
How do I add code to allow a pause in the service?
How do I add code to allow a pause in the service?
ASKER
gpizzuto
My apologies...I wasn't clear
Once installed and the service is running...I want the ability in the Services Window to Pause it.
My apologies...I wasn't clear
Once installed and the service is running...I want the ability in the Services Window to Pause it.
I don't understand...
Open your command prompt (WIN+R, type 'services.msc' without quotes and hit ENTER)
Select your service, right-click with your mouse and SUSPEND (or PAUSE, I don't know the exact translation, I'm italian)
Is that what you meant ?
Open your command prompt (WIN+R, type 'services.msc' without quotes and hit ENTER)
Select your service, right-click with your mouse and SUSPEND (or PAUSE, I don't know the exact translation, I'm italian)
Is that what you meant ?
If you need it in command-prompt, type:
net pause [your_service_name]
net pause [your_service_name]
If you don't want to use net commands,
use the command 'SC' in your command prompt.
You can call it also in your vb code.
Type SC /? for sintax
use the command 'SC' in your command prompt.
You can call it also in your vb code.
Type SC /? for sintax
ASKER
gpizzuto
I understand what your saying
There IS NO Pause when I right click.
Is that something I set in the VB when I build it?
This is my first foray into Windows Services.
I understand what your saying
There IS NO Pause when I right click.
Is that something I set in the VB when I build it?
This is my first foray into Windows Services.
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER
That's it, thanks.
I've been in Web and Winforms forever
Just now getting back familiar with Win Services
I've been in Web and Winforms forever
Just now getting back familiar with Win Services
Create another service that Stops/Starts the first or, better, pause its execution for a while:
system.threading.thread.sl
waits for 100 milliseconds...