Question
February 19, 2007 at 07:15 AM
tonymorton

Automation using batch files at logoff

by tonymorton . Updated 19 years, 8 months ago

I have produced a series of automated tasks using AutoIT to save hourly/daily reports to given directories/folders Mon-Sun 09:00-22:00.

As AutoIT is based on a GUI, it will not run on logoff and, while I can disable Windows logon/logoff I cannot disable Novell network logon/logoff and would prefer avoiding this course of action for obvious security reasons.

Is it possible to use a batch file based on a VB script involving “sendkeys” or something similar to do the following:

Run the batch file hourly to log on to the workstation – this involves:

(a) sending a username and password to logon screen

(b) sending a ‘Y’ into a window which asks whether I’m an authorised user

(c) clicking an ‘Exit’ button rather than a ‘More information’ button on a H&S information window.

I would then need to run batch files (d) (e) and (f) on the hour to save a real-time database report window:

(d) – Saveas Html
(e) – Open with Excel
(f) – save report
(with a time/date title such as 0900 Mon
then:
(g) – delete Html file

Could you give an example of the syntax for completing (a)-(g) above?

I can write VB scripts in Excel which can complete (a)(b) and (c) above – I think – but how can I convert them to batch files that would run correctly at logoff?

I would also need a batch file script to log the computer off at a few minutes past each hour after (a) – (g) have run.

This discussion is locked

All Comments