Jump to content

Setting Windows Service to Manual?


Go to solution Solved by Jos,

Recommended Posts

Hi, I've been trying to use this UDF:

To change a service in Windows to "manual". As far as I understand, this should be it (using Bonjour as an example):



#include "Services.au3"


_Service_SetStartType("Bonjour Service", $SERVICE_DEMAND_START, "")

Instead, when I run it nothing even happens. It just executes and ends, nothing gets changed. The service is still set to AUTOMATIC. I tested and the program IS ABLE to reach the statement.

So confused here! Thanks for any help!

 

Edited by Syrne
Link to comment
Share on other sites

  • Developers
  • Solution

Are you running as admin?

Try Adding #RequireAdmin at the top of the script and run again.

Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

Are you running as admin?

Try Adding #RequireAdmin at the top of the script and run again.

Jos

 I knew there was something missing! How silly of me, it works flawlessly now.

Thank you very much.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...