VB Code that will automate batch file

Asked By 0 points N/A Posted on -
qa-featured

I am looking for any ideas that can help me resolve my problem. It's about the batch file I have that is located in one system, which I used to monitor the system’s memory leak. Everyday, I make sure that memory leaks are being detected and monitored in all systems in my lab so in order to do that, I have to run the said batch file, which generates an Excel file that has all the necessary information that help to keep track of the said memory leak. This is an everyday process and I’m thinking of automating the batch file by using a VB code. After running the batch file automatically, the said code should also copy all the XLS files generated by the batch file and store it in a central location. How can I do that?

SHARE
Answered By 20 points N/A #105735

VB Code that will automate batch file

qa-featured

Hello Will Gear,

I think it is possible for you to automate the batch file, but the format in which you will save the file so that they can be automated is what I am not sure if it could be XML or XLS. You will need to follow the procedure below to automate the batch file:

The first thing you have to do is ensure that you have maximum security set, or for the worst case you can use the medium level security credentials.

  • Then you will have to check the digital signature used for the VBA project start menu, and create them if they are not yet created.
  • You should create the VBA code in that the digital signature will sign the VBA code you are using, which should be done from the IDE tools menu item.
  • And thereafter, you will go to the workbook_open event handler and there you will have to add the code you want to automate.

Hope this helps.

__

Regards
Mahesh Babu

 

Related Questions