Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    Visual Basic




Stop And Start A Service From A ListView


Hi

I want to be able to stop and start a service that is selected from a ListView, I've tried searching but cant find anything, does anyone have any ideas?

Thanks



LIVERPOOL FOOTBALL CLUB - 5 times Champions of Europe!! 1977, 1978, 1981, 1984, 2005

FA Cup Winners - 2006

Edited by - johneast on 3/15/2006 6:31:40 AM




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Stop And Start A Service Selected From A ListView
Hi

I want to be able to stop and start a service that is selected from a ListView(using XP), I've tried searching but cant find anything, does anyone have any ideas?

Thanks


Start And Stop Sql Service In Vb
i have an app that is designed in vb. the app connects to a msde database. i want to be able to stop and start the sql service i have running. using visual basic code. can some one help.

Thank You,
Thomas

How To Start && Stop An NT Service With VB
Anyone know how to use VB code to start & stop an existing
service running on NT?

Thanks in advance.

I tried searching for previous discussions on the topic, but
the search function has been disabled...

Lawson.

Vb6 - Start / Stop DNS Service 2K
Any ideas on how to stop and start the DNS service on server 2k?

This is what I found so far, but I have no idea what the internal names are for the services.

http://www.andreavb.com/tip060002.html

Thanks,
jc

Can You Stop And Start An XP Service
Can you stop and start an XP service within a Visual Basic program? i.e using the dos based command of net stop and net start?

How Can I Start/stop A NT Service
Hello,

how can I start/stop a NT service ??

Wolfi

Stop/Start A Native Service With VB6
I am trying to get my vb6 app to stop and restart a windows native service (dns).
I have the NTSvc.ocx, but I cannot seem to get it to stop or start a service other than teh one it installs.
All I need to do is stop the DNS service, restart is and then check the status of the DNS service to make sure it is running.

Any help would be greatly appreciated.
Thank you in advance...

Start && Stop A Service On Another Computer
Hi folks,

I'm searching for a way to stop an then start again a service on a different computer (both Win NT 4.0).
Is there a way of doing this??

Thanks for your help!!

best regards!!

Help Needed To Start And Stop Service
Pl guide me to start or stop a service

cheers
rachel

Start Or Stop A Windows Service
Is there a way to start and stop a service throug API calls

I would like to do so in a setup kit for the web service

I do not want to use WMI as I do not want to install it on NT systems if it is not necessary - however if it is NT server with IIS then there may be a partial version installed. does this handle starting and stopping services

Thankyou

could you also email me at ds@infra.com.au

thanks again

David Stephen

Stop Service
Hello Guys !!

How to stop the SQL Server 2000 service running on a system using VB code? I mean are there any APIs or something like that?

Thanks in advance.

-- akki.

Stop An NT Service From VB
Is there a way to stop an "NT Service" from a VB app?

Thanks

How To Stop DTC Service
I want to know How to Stop DTC Service..
+
I want to kno How to start DTC Service..

Help me .. Please

If you know this, please give me samplecode..

Help me .. Please

A Script To Stop A Service
Using VB6 is there a way I have can have a file or service removed from memory at a certain time that I specify.

Controlling Service Stop {C#}
I got a service running in the background. It checks for xml files in a directory. Whenever a new file is present, the service validates the xml, and if the xml is valid, insert the data into a database.

After a while of testing, I figured weird results randomly occur if i stop the service while it's working. This is actually what i expected, so I began a search on the web on how to prevent a service from stopping, before a loop is completed.

Maybe it's my english, my way of using search engines or just me, but I could not find anything. Nothing about waiting till a loop is done before terminating the service. I though this was a quite "popular" thing for developers.

Any suggestions?

Thanks,
-- Fredrik Aasgaard

Stop Sqlserver Service
hi,
i have found other posts talking about stop the service but i have a diferent question i want to know if there is any way without a use of references or dos command to stop the service i have found some time ago a line that can stop or pause the service but i lost this info
the instruction that i have found to do that is like when we insert,update or delete any record the sql server have many commands to insert,update records tables etc i have to stop the service to.
anyone know what is the command or where can i find all comands that sql server suports?
thanks for your help
bruno

How To Stop A Hanging Service?
Hi,

I've created a service... I have a problem stopping the service - when i try, it just "hangs" repporting that it failed to stop... and then the service mannager just says "stopping" - And that goes on forever...

How do i "force" the service to stop?

Best regards...

Stop A Service And Get Status
How do I stop a windows service? and I also would like to get the status of the service. If its 100 % stopped.
Because I dont want to proceed if the serice is not 100% done.
I could do it like this but this is not a good option for me.
CODERet = Shell("net stop RegSrvc", vbNormalFocus)

How Can A Windows Service Stop Itself?
I'm making my first windows service and I'm going back and doing some error coding where I want the service to actually stop itself.

I don't see any real methods for closing the service. I don't see any .close() or unload or anything like.

Could someone help me out here for how to let this guy stop gracefully? thanks.

=Blain

How Can Service Stop Using API Function On Windows-NT 4.0
I want to control for specific a service(stop or start Etc..) using API function on windows-NT 4.0.

Thanks!!!!!!!

Start As A Service
Hi people !

I´ve developed a communications application with VB5.
The application runs fine in a PC with W2K OS.
The application starts with a .bat file with the syntax :

start /high c:ss7FWDCordobass7FWD.exe

where ss7FWD.exe is the application compiled.

This .bat file is in the start directory when the administrator logs in.

If there is a power supply failure, the application will not start when power supply returns, as the administrator is not logged in.
To solve this, I think, the application should start as a service within the W2K OS.

How do I do this, I mean, how do I configure in the W2K OS that this application should start as a service with high priority, and start as soon as the PC is powered on.

Thanks.

Edit: Moved from Installation

How To Start A Service?
I want my program running as a service, not in start-up.

I create a service when I package my software by Wise for Windows Installer 3.52 and then restart the computer but this service is stoped.

Can you tell me how to start the service?

NT Service Won't Start
I am attempting to run a program as a service in VB and I get the error in the event log:

Timeout (30000 milliseconds) waiting for the SVC Server service to connect.

and

The SVC Server service failed to start due to the following error:
The service did not respond to the start or control request in a timely fashion.


What am I missing... The start event code is as follows:


VB Code:
Private Sub NTService_Start(Success As Boolean)    'Start Event Request    On Error GoTo ServiceError    ServiceState = "Running"    ServiceProcess = ServiceCode.StartProcess    Success = True    Exit SubServiceError:    NTService.LogEvent svcMessageError, svcEventError, "[" & Err.Number & "] " & Err.DescriptionEnd Sub


The program loads as a service and I get the error when I attempt to start the service.

Start And Stop!
is ther a code that starts a program if i press f1...
but the program will NOT be in focus
thank you

Stop/Start IIS
Hi Guys,
I've recently installed a password protection routine on one of my web servers. It used an encrypto dll that seems to be killing IIS on my server every couple of days. Does anyone know is there anything like the Windows 2000 DOS batch file that will take care of restarting IIS intead of restarting my server. I am running NT Server 4.0 SP6a.

Stop && Start Another App From VB
I need my VB6 program to stop another running program, and start it again.
(i need to stop/start PCAnywhere so I can use the modem)
So I now the name of the program to control..

How To Start A Windows Service
I'm trying to create a windows service using ntsvc.ocx control. After installing it, I try to start it, manually or automatically, but occurs an error (1053). What is that? How can I make it work?

Start SQL Server Service Thru VB6
After installing a Named Instance of MSDE via ShellAndWait(), once completed, I want to start that instance... but I keep getting: runtime error -2147023174, [SQL-DMO]Service Control Error: The RPC server is unavailable.

Here is the bit of code, what am I missing/doing wrong???? thanks


VB Code:
Private Sub InstallMSDEButton_Click()Dim MSDEfileName As StringDim SQLS As New SQLDMO.SQLServer Label2.Visible = True MSDEfileName = App.Path & "FilesMSDEsetup.exe disablenetworkprotocols=0 securitymode=sql blanksapwd=1 instancename=_T7DEMO_DB"InstallMSDEButton.Enabled = FalseInstallDemoButton.Enabled = False subShellAndWait MSDEfileName SQLS.Start True, "MSSQL$_T7DEMO_DB" InstallMSDEButton.Enabled = FalseInstallDemoButton.Enabled = True End Sub


I have tried "(local)\_T7DEMO_DB"

The Named Instance was successfully installed....

THanks very much for your help

Program To Start A Service On W2k
Any one know how to start and stop a service with Visual Basic? On windows 2000 server.

Thanks.

Application Won't Start As A Service!
Hi,
I want to use VB app to run a program (.exe) as a windows service. I have created the app and got it installed in Windows Service Control Manager as a service. But when I try to Start my service, the service start progress bar stop half-way and prompt up a message stating "Error 1053: The service did not respond to the start or to the control request in a timley fashion." I can't figure out what's wrong with it. I'm running it in Win2000. I do appreciate if anyone had any ideas or solutions to help out with this as soon as possible?!?

-THanks-

Start Service Remotly
Hello!

How to start WinNT service remotly from VB program?

Regards,
bumbuls

Start / Stop Bits?
I'm writing a VB app that communicates with a Motorola HC12 Board.

My only problem is when sending, the HC12 needs a a low start bit, 8 data bits, and a high stop bit. I've been able to transmit succesfully between two computers running the same application.

I've been sending a single character over the serial line, based upon the decimal equivalent inputted from a textbox (num). I've set up the communication to send as follows:

Private Sub btnOpenCom_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnOpenCom.Click
moRS232 = New Rs232()
Try
'// Setup parameters
With moRS232
.Port = miComPort
.BaudRate = Int32.Parse(txtBaudrate.Text)
.DataBit = 8
.StopBit = Rs232.DataStopBit.StopBit_1
.Parity = Rs232.DataParity.Parity_None
.Timeout = Int32.Parse(txtTimeout.Text)

End With
'// Initializes port
moRS232.Open()
'// Set state of RTS / DTS
moRS232.Dtr = (chkDTR.CheckState = CheckState.Checked)
moRS232.Rts = (chkRTS.CheckState = CheckState.Checked)
If chkEvents.Checked Then moRS232.EnableEvents()
chkEvents.Enabled = True
Catch Ex As Exception
MessageBox.Show(Ex.Message, "Connection Error", MessageBoxButtons.OK)
Finally
btnCloseCom.Enabled = moRS232.IsOpen
btnOpenCom.Enabled = Not moRS232.IsOpen
btnTx.Enabled = moRS232.IsOpen
btnRx.Enabled = moRS232.IsOpen
btnCheck.Enabled = moRS232.IsOpen
End Try
End Sub



And when I finally send I simply use:

moRS232.Write(Chr(num))

What do I need to add to my code to include the necessary start and stop bits?

Start And Stop With One Button?
This is probally a dumb question and easy to do.. Im tryign to get a command button to start and stop.

sub_command1()
command1.caption="Stop"
end sub

but how would i make it do a start and stop function with one button?

Start And Stop ScreenSaver
Does any body know how to start the screen saver and be able to stop it using vb code?

Another Program Start/stop
Hi,
I know how to start another program's exe from within VB but is it possible to tell when the other application has been closed ?
Start Calculator from with in VB and then close Calculator.
Thanks,
Trevor

Start/stop Button
This is an easy 1 but i can't remember how to do it. I want a single button to start sumthing when clicked and to stop it when clicked again and repeat start/stop
Thanks!

Start/Stop Startup
Hi there

I am buiding a VB6 application and I wanna knwo how can I run and stop running my application at windows startup.


Thanks/

Start/stop Timer
is there a command to start/stop/pause the timer ?

Start/Stop Device...
-Bump-

Is this really not possible? There must be some way to programatically stop/start a device...

Start And Stop An Other Program?
I have seen this question many times but can't find any thread with it for the moment...

I need to start an application and run it for a couple of hours and then end it.

Can anyone give me an answer or a link to a thread that shows how to do this?

Thanks!

Stop/Start NT Services
Can anyone tell me how to stop/start a service in NT? Thanks!

Another Program Start/stop
Hi,
I know how to start another program's exe from within VB but is it possible to tell when the other application has been closed ?
Start Calculator from with in VB and then close Calculator.
Thanks,
Trevor

Program Stop And Start
Hi
I need some help, i have created two .bat files which stop and start a program but i need to stop the program at a time which could vary and restart the program which also could vary does anyone have any ideas on how to do this???

Thanks

How To Know SQL Server Is Start Or Stop
    Hi
    My program is using SQL.But SQL Server is other computer.So that computer is sql service stop,shutdown or restart my program is not working.I want to know sql service is start or stop.
    Someone can help me problem
    Hope your help
    

How To Start/stop NT Services?
I wants to start & stop service using my app.
Expecting a detailed soln as i m a beginner

:-)

Network Service Take Too Long To Start
I have an app that runs as the shell program in an XPe system (basically my application has replaced the windows explorer.) At the very beginning of this app, I create a folder which I need to share to a network. So I create the folder and use net share to share it. OK no problem right?. wrong! The server service takes about 30-40 second before it starts, and if I try to use net share before then, I can't see the shared folder on a remote PC (appearently the net share fails). If however I put a delay of 40 second at the beginning of my app, and then create the folder and share it, it works.
Question(s)-
1. Is it normal that the network connection take 30-40 second before establishing?
2. Is there a way I can know if the connection is started?
3. Any comments, questions?
thanks for your time
kevin

Start An Application As A Service On Win98
Hello,

I'm just coded a security application and finished it off. All works fine indeed. But what I wanted to do is to run the application as a service instead of normal startup in the registry.

Is there a way to do this? If yes, could you give me some coding example?

Thanks before hand.

Regards

Start A Disabled Windows Service
Hello,

I would like to know if anyone has started a disabled service.

I have researched it, found you can start a stopped service, change the service startmode. but nothing on starting a disable service. also you can not change the startmode of a disabled service?


I know that Microsoft did this because of spammer and hackers, but I have aministrator account and password. I thought I could you a runas.

Thanks for any help, as I have been having trouble finding a solutions.

The service I would to enable is Windows Messenger, I have another vbs script that I can send message to workstation and have user call me.

I have been tasked to find or locate many workstations, I found this would be a way of doing it without installing anything on these workstations, when done I can again disable this service.

Mike

How To Know The MsSQL Service Of The NT Sever Is Start?
The NT Server is Database Server(SQL Server 7.0,Mail Server(Exchange Server 5.5),Printer Server,WWW Server),what I know which service is Start?

Copyright © 2005-08 www.BigResource.com, All rights reserved