Jump to content

Need to keep program running


Recommended Posts

@MBALZESHARI you are a life saver. You explained it better in one post that I have been able to in the last 20. It is pretty funny that we both got bit the same way and took almost identical routes to the solution. Your link to the Wiki also highlighted the frustration I have been having about running compiled scripts as a service.

Everyone has been pointing to links like the one you supplied. Those are "Service Control" functions. Plain and simple they will let you manipulate services and add any exe as a service whether it is an AutoIT exe or not. The other program that people have been throwing out is the Windows SC command. It does pretty much the exact same thing but comes with Windows.

That is all good and well but the bottom line is that if the exe is not "Service Compatible", i.e. written as a service, you can install it as a service but it will not run. It won't start, it will crash, etc. Both the link you provided and the Windows SC command will add the exe as a service but it probably won't run.

My understanding at this point is that you need a shell or a wrapper program to install as the service and it in-turn will "help" the exe run as a service. The AutoIT Wiki made it seem like it was the simpelest thing in the world to install a exe as a service and it is. But installing it as a service and getting that service to run properly are two different things. I don't think that was pointed out in the Wiki and maybe it should be.

Anyway... I want to thank everyone for their input and responses. Much appreciated. Now that I have a better understanding of what I am looking for (a wrapper) I think my efforts might be much better spent looking at _Service_UDF V4. I believe that is a"Service Wrapper" for AutoIT scripts. Thanks All!

Edited by Trax
Link to comment
Share on other sites

To explain it simply for everyone:

  The environment Trax supports is a mix of stand alone PCs as well as network PCs. He needs ALL the PCs to have the same controls as afar as restrictions. Currently he has running an AutoIt solution on each PC that for the most part works fine. The problem is he has several users who have figured out ways to defeat the AutoIt solution by 'cancelling a "in progress" shutdown'. With a "cancelled in progress shutdown" all the programs that were not running as a service get cut off and this kills the AutoIt solution, thus allowing users to have access to things and websites that the company does not desire.

   His company is very happy with the AutoIt solution so buying a specific product to do what the AutoIt solution does is simply not in the cards here. Saying that, the helpful suggestions to go this route will not be used. With the other suggestion that he use AD, seeing how some of the PCs are standalone using AD is not the best way to go.

Having to deal with this problem myself in years past; Trax and I agree running the AutoIt solution as a service is the best solution. This will prevent the users from using the "cancelling a in progress shutdown" method of defeating the AutoIt solution.

I found on the Wiki this information on how do run an AutoIt script as a service.

http://www.autoitscript.com/wiki/FAQ#How_can_I_create.2Fstart.2Fstop_or_otherwise_control_a_service.3F

nice link this is what ive been trying to find for my next beginner project thanks...

ill get to that... i still need to learn and understand a lot of codes graduated.gif

Correct answer, learn to walk before you take on that marathon.

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...