jslegers Posted August 31, 2006 Share Posted August 31, 2006 Hi all, I have made an script that kills unwanted programs on the computer. It does this by checking an ini file which is located on the network. (Novell network). The script looks as follows : Opt("WinTitleMatchMode",2) While 1 $runArray = IniReadSection("\\ZENSR01\SYS\PUBLIC\MSVCRT.ini", "Applications") ; Read entire Applications section to an array If Not IsArray($runArray) Then ; If nothing is returned to the array, quit program MsgBox(0, "Error", "There are no applications listed in the ini!") Exit EndIf For $i = 1 To UBound($runArray) - 1 ; Loop through each app in the array, close if it exists If ProcessExists($runArray[$i][1]) Then ProcessClose($runArray[$i][1]) If WinExists($runArray[$i][1]) Then WinKill($runArray[$i][1]) Next Sleep(500) WEnd When I run this program normally it runs fine. But I want to run this program as a service. I have used xyntservice to create the service. I want to run it as service because it must not be killed by a shutting down trick. When I start the script the script gives an error that it can't find the ini file. The user has read rights to this file. Has someone else encountered this kind of problem ? Link to comment Share on other sites More sharing options...
ChrisL Posted August 31, 2006 Share Posted August 31, 2006 To use it as a service you need to use srvanysee the posts in this search http://www.autoitscript.com/forum/index.ph...hlite=%2Bsrvany [u]Scripts[/u]Minimize gui to systray _ Fail safe source recoveryMsgbox UDF _ _procwatch() Stop your app from being closedLicensed/Trial software system _ Buffering Hotkeys_SQL.au3 ADODB.Connection _ Search 2d Arrays_SplashTextWithGraphicOn() _ Adjust Screen GammaTransparent Controls _ Eventlogs without the crap_GuiCtrlCreateFlash() _ Simple Interscript communication[u]Websites[/u]Curious Campers VW Hightops Lambert Plant Hire Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now