Skip to main content
The 2024 Developer Survey results are live! See the results

All Questions

Tagged with
0 votes
1 answer
185 views

Windows .Bat file behave differently when executed from command window and by double clicking on the bat file

batchfile is simple which has only two lines below, but behaves differently. run from command window. > sc \\server query | findstr SERVICE_NAME | find /c /v "" //result is 135 > ...
OfusJK's user avatar
  • 101
0 votes
1 answer
975 views

Mining rig Batch file for closing unnecessary windows services

Ok so I am building a bat file that can automatically be executed when windows has finished loading to optimize my all my windows' based rigs for GPU mining. So far my bat file looks like this, is ...
Max Alexander Hanna's user avatar
-1 votes
1 answer
1k views

How to change Recovery options of a Service by batch?

I'm creating a batch file to turn off BITS, but in order for it to not restart , I have to change first failure,second failure and subsequent failure to take no action , set reset fail counter after ...
Anuja Nimesh's user avatar
-1 votes
1 answer
84 views

Windows Batch - Service cycling with validation failing in for loop

I'm trying to set up some validation/timers to wait should the service take longer to cycle. If it fails, I will use something else to parse the log file and email me an alert should it fail. For ...
FixingGenie's user avatar
0 votes
1 answer
442 views

Is there a way to write a Batch-file which will Return services into their Default mode?

I had already twice a problem with my computer were it just went out of controll and most of the functions were incontrolable, including services like Sound, Brightness, Internet and some other. Later ...
A.D.'s user avatar
  • 243
0 votes
1 answer
1k views

Batch file not processing variable in for loop

I've been working on improving this batch file. My goal is for it to stop the first service in the list and wait until it fully stops, or kill it if it doesn't stop quickly, then start it back up, and ...
Brian Henson's user avatar
0 votes
1 answer
537 views

How to delete lock file if service failed to start

I have a service that has its Startup type set to automatic. However, during an unexpected restart, this service failed to start because of existing lock file. How can I delete this lock file ...
euler's user avatar
  • 103
6 votes
3 answers
17k views

Make batch file wait for service to start when restarting services

I have a batch file that frequently restarts a group of services developed in house. We are soon moving away from these to something more stable, but for the time being the services need to be ...
Brian's user avatar
  • 61
5 votes
2 answers
13k views

Need command to edit a service's log on to Local System Account

When you right click a service in services.msc and go to properties and Log On, it lets you change it to Local System account, how can I switch to that setting with a batch command, I want to switch ...
Matthew Terry's user avatar
1 vote
1 answer
1k views

Edit windows service user with a batch script and encrypted password

I need to change the user of a service on Windows using a batch script. Searching the web I found this solution: sc \\server config ServiceName obj= Domain\user password= pass The problem is, that ...
RazziaDK's user avatar
0 votes
1 answer
482 views

Start jade via batch script as service on windows server 2012 amazon ec2 instance

I would like to start the Jade agent platform with a batch script on an windows server ec2 instance as a service. The reason for this is, that I want to start jade automatically at system startup. ...
E. Lüders's user avatar
0 votes
1 answer
3k views

Is there a way to restart a service on a remote machine from a batch script?

I'm looking for a way to restart Windows services from batch scripts (preferrably CMD) on a remote machine using a different account than the one the script is running as Looking at the parts that ...
themel's user avatar
  • 477
5 votes
3 answers
16k views

Why is "run this program as an administrator" disabled?

I need to stop some services so I made a cmd file but it doesn't work because it needs to run as admin. When I right click on the file and choose Properties, I see that "run this program as an ...
IceCold's user avatar
  • 2,111
1 vote
1 answer
516 views

Can't access a virtual machine which runs as a service

I'm trying to start a virtual machine (I'm using VMware Workstation 7) as a service on my Windows 7 system, so that it starts automatically with my (physical) host. I used instsrv and srvany.exe from ...
mhmpl's user avatar
  • 113