User Tools

Site Tools


windows:scheduledtaskswithoutbeingadmin

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
windows:scheduledtaskswithoutbeingadmin [2010/10/26 17:32] – creado rlunarowindows:scheduledtaskswithoutbeingadmin [2022/12/02 22:02] (current) – external edit 127.0.0.1
Line 1: Line 1:
 ====== How to run scheduled tasks without being administrator ====== ====== How to run scheduled tasks without being administrator ======
 +
 +**THIS PROCEDURE FAILED TO ME:** I accept suggestions to anyone about what I am doing bad. 
  
 When I first tried to run a scheduled task without being an administrator, I thought that it was an easy task: just create the task, add the user in the run-as entry in the corresponding entry in the scheduled task, and voila!!! When I first tried to run a scheduled task without being an administrator, I thought that it was an easy task: just create the task, add the user in the run-as entry in the corresponding entry in the scheduled task, and voila!!!
Line 19: Line 21:
 ===== Second step: give him rights ===== ===== Second step: give him rights =====
  
-NOTA: tiene que tener los permisos de log on as batch, etc+Check that the user ''batch'' have the rights ''Log on as batch user'' and ''Log on as a service''
  
 ===== Third step: give him NTFS rights ===== ===== Third step: give him NTFS rights =====
Line 25: Line 27:
 Open a command prompt as the user ''batch'' --click on start -> programs -> accesories -> right click over "command prompt" and select "run as"-- and test that it can run the command d:\batch\test.bat: for this, you have to ensure that the proper NTFS permissions are in place.  Open a command prompt as the user ''batch'' --click on start -> programs -> accesories -> right click over "command prompt" and select "run as"-- and test that it can run the command d:\batch\test.bat: for this, you have to ensure that the proper NTFS permissions are in place. 
  
-Second, ensure that this user have access to the folder c:\windows\tasks to run the scheduled tasks. +Second, ensure that this user have access to the folder c:\windows\tasks to run the scheduled tasks. In windows 2003 the security tab of this folder do not appear. For make appear this folder, you have to try to move the folder to another location: some of the files will move, but others failed to move. However, the security tab in c:\windows\tasks will appear.  
 + 
 +You have to give permissions to the user ''batch'' to traverse this foler (read and execution will be enough), and ensure through the command prompt of this user that it can. In the following image is an example using the ''jboss'' user instead of the ''batch'' user: 
 + 
 +{{:windows:tasks_traversal.jpg}}  
 + 
 +Third, back the part of the "tasks" folder you moved again to the windows directory. Again, the security tab will disappear (if you are fortunate, this problem will be fixed and you haven't to this stuff).  
 + 
 +===== Fourth step: create the scheduled task ===== 
 + 
 +Create the scheduled task ensuring that you put the user ''batch'' in the "run as" field.  
 + 
 +===== Fifth step: checking permissions again ===== 
 + 
 +Control panel -> scheduled tasks, right-click over the created task and go to the "security" tab. Again, check that the user ''batch'' have permissions of execution and reading.  
 + 
 +===== Sixth step: test run ===== 
 + 
 +Of course, you have to do a test run: right-click over the created task and select "run" to see if things are going well.  
 + 
 + 
 + 
 + 
  
    
  
  
windows/scheduledtaskswithoutbeingadmin.1288107147.txt.gz · Last modified: 2022/12/02 22:02 (external edit)