Scheduling Tasks with Admin Privileges in Windows 10
As a Windows 10 user, you may need to schedule tasks that require elevated privileges, such as creating symbolic links. This article will guide you through the process of scheduling tasks with admin privileges in Windows 10.
Prerequisites
To schedule a task with admin privileges, you need to be logged in as an administrator or have administrator credentials. Additionally, you need to know the program or script you want to run and its required arguments.
Creating a Scheduled Task
To create a scheduled task with admin privileges, follow these steps:
- Press Windows key + R to open the Run dialog box.
- Type
taskschd.mscand press Enter to open the Task Scheduler. - In the Task Scheduler window, click on Task Scheduler Library in the left pane.
- Click on Create Task... in the right pane under Actions.
- In the Create Task window, go to the General tab.
- Check the box for Run with highest privileges.
- Select the appropriate user account or leave it as the current user.
- Go to the Triggers tab and click New... to create a new trigger for the task.
- Configure the trigger settings, such as the start time and frequency, then click OK.
- Go to the Actions tab and click New... to create a new action for the task.
- Select Start a program as the action type.
- In the Program/script field, enter the path to the program or script you want to run.
- In the Add arguments (optional) field, enter any required arguments for the program or script.
- Click OK to create the new action.
- Click OK again to create the new scheduled task.
Example: Creating a Symbolic Link
Let's say you want to create a symbolic link that maps a folder to a network share. You can schedule a task to run the following command with admin privileges:
mklink /D "C:\local-folder" "\
etwork-share\remote-folder"Here's how to schedule this task:
- Follow steps 1-5 from the previous section to open the Create Task window.
- In the Create Task window, go to the General tab.
- Check the box for Run with highest privileges.
- Select the appropriate user account or leave it as the current user.
- Go to the Triggers tab and click New... to create a new trigger for the task.
- Configure the trigger settings, such as the start time and frequency, then click OK.
- Go to the Actions tab and click New... to create a new action for the task.
- Select Start a program as the action type.
- In the Program/script field, enter
cmd.exe. - In the Add arguments (optional) field, enter the following: /c mklink /D "C:\local-folder" "\ etwork-share\remote-folder"
- Click OK to create the new action.
- Click OK again to create the new scheduled task.
- To schedule a task with admin privileges in Windows 10, open the Task Scheduler and create a new task with the Run with highest privileges option enabled.
- Configure the trigger and action settings for the task, such as the start time, frequency, and program or script to run.
- Use the
cmd.exeprogram and the/cargument to run a command with admin privileges.