Command Prompt and Task Scheduler
js09130
Posted messages
45
Status
Member
-
dubcek Posted messages 18627 Registration date Status Contributor Last intervention -
dubcek Posted messages 18627 Registration date Status Contributor Last intervention -
Hello everyone,
1st question:
from the task scheduler, is it possible to run a batch file in the command prompt but as an administrator?
2nd question:
In the command prompt (administrator), the command "TAKEOWN" can generate errors. Is it possible to capture the list of these errors (and their numbers) in a file called ERREURS.TXT?
Thank you for your responses
Configuration: Windows / Firefox 46.0
--
I'm not the best, I'm not the greatest... but I'm here!
1st question:
from the task scheduler, is it possible to run a batch file in the command prompt but as an administrator?
2nd question:
In the command prompt (administrator), the command "TAKEOWN" can generate errors. Is it possible to capture the list of these errors (and their numbers) in a file called ERREURS.TXT?
Thank you for your responses
Configuration: Windows / Firefox 46.0
--
I'm not the best, I'm not the greatest... but I'm here!
1 answer
Good evening.
Yes, we can.
First, open the Task Scheduler: WIN+R (run menu) > type Taskschd.msc > Enter.
Once the Task Scheduler is open: Action > Create Task
=============
In General:
- Specify a name (whatever you want - batch for example)
- Specify a description
- Check the box to Run with highest privileges
Image for General:
In Actions:
- Click on New: This is the exact moment you need to enter your batch file.
- Action: Start a program
- Program/script: your batch file
Image for Actions:
You can also see the settings.
++
Yes, we can.
First, open the Task Scheduler: WIN+R (run menu) > type Taskschd.msc > Enter.
Once the Task Scheduler is open: Action > Create Task
=============
In General:
- Specify a name (whatever you want - batch for example)
- Specify a description
- Check the box to Run with highest privileges
Image for General:
In Triggers:
- Click on New and set the trigger as you wish.
Image for Triggers:
In Actions: - Click on New: This is the exact moment you need to enter your batch file.
- Action: Start a program
- Program/script: your batch file
Image for Actions:
You can also see the settings.
++
That's some work!
NOTHING MORE EXPLICIT THAN THAT!
Thanks again.
JS.
The solution that doesn't work in my case because this command is included in a batch file. It produces a file with a single line, that is to say the last error and not the complete list of errors.
Thank you.