Jump to content
Sign in to follow this  
marculito

Help with restarting a script.

Recommended Posts

marculito

Hi, I need some help. Have searched the forum but not found anything.

What I would like to do with this script that logs systeminfo, such as running processes is to have it to restart say like once every hour so that I can get the logs sent to me every hour. Will use it as a tool to monitor our computers to detect unusual services such as running trojans and other type of malware. But instead of manually checking each and other computer I will have it send the logs to our fileserver.

But I can't seem to find out how to make the script restart itself every hour.

Now, some might ask why I want it to send every hour and that it will be a lot of logs and yes, but I have another script on the server that centrally checks these logs for changes, so if there is a new service running in one computer it will notify me :)

Here's the script that I need help with to get restarting every hour.

_SysInfoLog_v2.07.au3

Share this post


Link to post
Share on other sites
JohnOne

Well if you are going to write a script to run a script, you might as well

just have a function in the main script to execute every hour.

See AdLibRegister() <- helpfile.

Or use windows task scheduler.


AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Share this post


Link to post
Share on other sites
water

Why do you want to restart your script.

Use AdLibRegister to run a function every hour. This function closes the file and sends it to the file share, then reopens it.

I would do it the other way round. Have a list of "allowed" processes in a file on the fileshare. Read this file every hour by the client and check the running processes in a short interval (every minute). If you find a process which isn't allowed send a messge to the admin.

This way an invalid process is much faster identified and you can act much faster.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2018-12-03 - Version 1.4.11.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Share this post


Link to post
Share on other sites
marculito

Why do you want to restart your script.

Use AdLibRegister to run a function every hour. This function closes the file and sends it to the file share, then reopens it.

I would do it the other way round. Have a list of "allowed" processes in a file on the fileshare. Read this file every hour by the client and check the running processes in a short interval (every minute). If you find a process which isn't allowed send a messge to the admin.

This way an invalid process is much faster identified and you can act much faster.

That's a good idea :) I'm new to all this about AutoIt but learning every day :) So thanks for the tip.

/ Marculito

Share this post


Link to post
Share on other sites
water

This approach has the advantage that the processing is distributed and that you can act much faster when a new unwanted process shows up.

Like all the virus scanners do. Get the virus database from a central server and do the processing on each machine.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2018-12-03 - Version 1.4.11.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Share this post


Link to post
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
Sign in to follow this  

×