Need help to run an exe without an open session
LinSkeZ
-
LinSkeZ -
LinSkeZ -
Hello,
I am stating my problem. I created an Excel macro that opens files, processes them, creates a summary file that then saves itself instead of being prompted in the macro.
Now that I have done this, I want to schedule its launch every week, on a specific day at a certain time. The issue is that there will be very few times when the session is open for security reasons.
Is it possible to run a .bat file that executes Excel and the macro without a session being open on the machine?
Best regards,
LinSkeZ.
I am stating my problem. I created an Excel macro that opens files, processes them, creates a summary file that then saves itself instead of being prompted in the macro.
Now that I have done this, I want to schedule its launch every week, on a specific day at a certain time. The issue is that there will be very few times when the session is open for security reasons.
Is it possible to run a .bat file that executes Excel and the macro without a session being open on the machine?
Best regards,
LinSkeZ.
2 answers
Hello,
This is typically a scheduled task: https://www.malekal.com/les-taches-planifiees-de-windows/. But does Excel allow running in batch mode without a graphical interface?
And do you already have a .bat file that launches Excel and runs your macro without intervention?
This is typically a scheduled task: https://www.malekal.com/les-taches-planifiees-de-windows/. But does Excel allow running in batch mode without a graphical interface?
And do you already have a .bat file that launches Excel and runs your macro without intervention?
I'm currently trying to schedule it from my workstation, but my task starts (I'm not sure if I'm using the correct user), yet nothing executes when I close my session.
I'm not sure if I'm being very clear.
For example, a .cmd file that contains
Then create a scheduled task: Task Scheduler
- Create a basic task
- Name it
- Trigger set to daily, in 5 minutes
- Action: start a program
- Script: provide the afftime.cmd created with the above command (if you have a D: drive)
- Next
- Check "open the advanced properties..." + Finish
- Check "Run whether the user is logged on or not"
- Check: Run with highest privileges
- Provide the user's password
Verify that the task exists, in "Task Scheduler Library" (left column at the top)
Log off. Following this procedure, my task runs correctly even when I'm not logged in.
I will go try all that.
Thank you very much for your answers.
Let me explain, when Notepad is launched by the task, is it possible for me to have an open Notepad on my desktop upon logging into my session as a result of my task execution?