/build/static/layout/Breadcrumb_cap_w.png

Scripting Question


Disable services in Scripting

12/02/2014 3890 views
Hey Ninjas

I am trying to disable a service from running on every computer.

I see a quick and easy solution to stop services in the scripting wizard under scripting - Tasks, easy as choosing the drop down and selecting "Stop Services" but the services just start up every 15mins or so. So I need to disable the service. How?

I tried running a batch file 
"sc config "ServiceName" start= disabled" BUT I have to run it as admin on all Windows 8.1 machines and I cant get it to run.

So I added "runas /user:domain\useraccount" to the parameters field with no luck.

Likely I could get the whole thing to work with a batch file if I could get the batch to run as ADMIN. How?

Thanks
Nick
Answer Summary:
1 Comment   [ + ] Show comment

Comments

  • I've used scripting to stop services but use the batch section. Don't put anything in the verify leave it blank. Try running these in a command prompted window as a administrator first.

All Answers

3
Posting this got me thinking and I figured it out.

Light bulb came on bright and went DUH!!!! DOH!  lol

I ran the script as local admin:  
Windows Run As
  •  Local System 
  •  Logged-in user 
  •  All logged-in users 
  •  User:  Password:  
Answered 12/02/2014 by: nickbaldwin86
Yellow Belt

  • It is amazing how often writing a question in a forum leads to a light-bulb moment.....;-)
    • Rubber duck debugging OR Teddy bear pair programming:
      http://en.wikipedia.org/wiki/Rubber_duck_debugging
      It works perfectly in my company ... :-)

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

Share

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ