Hot answers tagged windows-service
This can also be done via an elevated command prompt using the sc command. The syntax is: sc config [service name] depend= <Dependencies(separated by / (forward slash))> Note: There is a space after the equals sign, and there is not one before it. Warning: depend= parameter will overwrite existing dependencies list, not append. So for example, if ...
Under the Services application, select the properties of the service in question. View the recovery tab - there are all sorts of options - I'd set First & Second Failure to Restart the Service, Third to run a batch program that BLAT's out an email with the third failure notification. You should also set the Reset Fail Count to 1 to reset the fail count ...
The poster wants to ensure the service is stopped before trying to restart it. You can use a loop on the output of "sc query" doing something like this: :stop sc stop myservice rem cause a ~10 second sleep before checking the service state ping 127.0.0.1 -n 10 -w 1000 > nul sc query myservice | find /I "STATE" | find "STOPPED" if errorlevel 1 goto ...
There doesn't appear to be a GUI-based way of doing this unless you're joined to a domain - at least not one I could find anywhere - so I did a bit more digging and I've found an answer that works for our sitaution. I didn't understand what the string representation meant in the knowledge base article, but doing a bit of digging led me to discover that it's ...
You can add service dependencies by adding the "DependOnService" value to the service in the registry using the regedit command, services can be found under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\<Service name>. The details can be found at MS KB article 193888, from which the following is an excerpt from: To create a new ...
Many executing components of Windows are implemented as services (see all services on your machine opening Control Panel > Administrative Tools > Services). These are specialized programs running in the background. They are not started by the logged-in user, but my the operating system itself. Most services aren't stand-alone executables (EXE ...
Use NSSM to run a .BAT or any old .EXE file as a service. It is almost a replacement for SRVANY and is a no frill no fuss application. http://iain.cx/src/nssm/ I had the same problem as you, and NSSM was the only utility that worked.
May be missing something, but I use this all the time: net stop "myservice" net start "myservice" or shorter: net stop "myservice" && net start "myservice"
Delayed start has two major components: Delayed services wait to start until all of the Automatic services have started Initially, the threads for delayed services are set to lowest priority. This greatly reduces the slowdown in responsiveness in user sessions that the services might otherwise cause, because their disk I/O, CPU time, and pace of ...
svchost, hosts services in Windows See KB. If you use Process Explorer you can see which services are being ran inside a particular process.
Vmware Server is the correct tool for running a VM in the background, not Vmware Player.
You're looking for: sc config <servicename> obj= <accountname> password= <password> The "sc" command will work on remote machines, too. Start it with no arguments to get more info. (It's a bit odd in requring spaces after many of the arguments. I can't say I've seen a similiar command-line program.)
Dead simple with powershell: PS >Restart-Service MySrvcHere Even better, using display names: PS >Restart-Service -displayname "My Service Name Here" Get-Help Restart-Service for more
I just had the same problem. You could use SubInACL.exe from the Resource Kit. Download the standalone utility here: http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=23510 Use msiexec /a PathToMSIFile /qb TARGETDIR=DirectoryToExtractTo to extract the files if you don't want to install the .msi Open a command prompt as ...
Your syntax is actually incorrect, but you'll be forgiven for missing it. From the help text for sc create: NOTE: The option name includes the equal sign. What isn't immediately obvious from this is that the options need to be specified with a space between the option name and the value. Incorrect: displayname="Subversion" Correct (note the space ...
You already know what the best practice is; the MS-supported thing to do. You've already seen how disabling the service can lead to unpredictable behavior and that it breaks other functionality that's tangentially tied to the service. If you, as an administrator, don't have the power to stop the idiots from doing idiotic things, then escalate this to the ...
Sure thing. Provided you're logged-on with an account that has "Administrator" rights on the remote server, just do: sc \\remote-server stop service-name and sc \\remote-server start service-name The sc command runs asynchronously to the service control manager, so you may want to query the service with the command below to insure it actually stopped ...
Figured it out myself: It is actually the value in Software\Microsoft\Windows\CurrentVersion\Internet Settings\Connections\DefaultConnectionSettings that is used. Since that is not easily modified, you can modify the proxy settings for a user, export the registry key, modify the path in the exported file to HKEY_USERS\S-1-5-18 and reimport it.
you could use the sc command-line tool but i don't know how to do it specifically in python. http://stackoverflow.com/questions/133883/stop-and-start-a-service-via-batch-or-cmd-file/133926#133926 DESCRIPTION: SC is a command line program used for communicating with the NT Service Controller and services. USAGE: sc [command] ...
you need spaces after = displayname= "Subversion Server" depend= Tcpip start= auto
You can provide a path to the key on the Target command line in the shortcut Create a shortcut to put in startup. Right click -> properties Modify the Target: section to add the key C:\Program Files\putty\pageant.exe C:\Program Files\putty\keys\iain.ppk When your system starts pageant will load the key and if it requires a pass phrase to unlock it it ...
It turns out I wasn't giving enough permissions with subinacl. The possible access values for the grant action are: F : Full Control R : Generic Read W : Generic Write X : Generic eXecute or any following values L : Read controL Q : Query Service Configuration S : Query Service Status E : Enumerate ...
It sounds like there is a group policy that defines the accounts that are granted Log on as a Service. Because you are an administrator you have permission to grant this privilege, but when the group policy re-applies the privilege will get removed. The next time the service stops it won't be able to start. You should either change the scope / filtering ...
View the properties of the service and you'll see a "Service Name" and "Display Name". The display name is the one you see in services.msc, you need to use the service name with the net command however. Sometimes they're very different for example "Extensible Authentication Protocol Service" is the display name and "EapHost" is the service name.
Of course you can't run a service like that. Did you try using srvany in server 2008? As far as I know there is no 'official' version of srvany for s2k8, but you can always try, can you not? EDIT: Oh, I forgot! We also use FireDaemon to run non-service applications as services. Though, it is not free and its functionality is a bit too much for your needs.
sc start fooservice arg1 arg2 ...
Using Russinovich's psservice: psservice \\server restart cherrypyservice
Svchost is short for "Service Host". It keeps most of the Services on your machine running. There will be a few Services that host themselves in their own .exe file, but most of Windows' Services need to be hosted inside a svchost.exe process. The Services on your machine handle important stuff like networking, RpC server, audio, event log etc. Type ...
It's all here - http://support.microsoft.com/kb/325349
From a command prompt running with admin credentials: sc config <server_service_name> depend= <database_service_name> Read more at this sc.exe documentation.
Only top voted, non community-wiki answers of a minimum length are eligible