Windows 10: Windows Task Scheduler - Running a .BAT File whether user is logged on or not

Discus and support Windows Task Scheduler - Running a .BAT File whether user is logged on or not in Windows 10 Gaming to solve the problem; Hi,I am using Windows 10 Pro. I created a simple .BAT file with the following location and filename:C:\PK_Temp\test.batCurrently, my test.bat file... Discussion in 'Windows 10 Gaming' started by kraemerpw, Aug 3, 2022.

  1. kraemerpw Win User

    Windows Task Scheduler - Running a .BAT File whether user is logged on or not


    Hi,I am using Windows 10 Pro. I created a simple .BAT file with the following location and filename:C:\PK_Temp\test.batCurrently, my test.bat file consists of just the following two commands ...Echo "Hi Paul" pause... When I run this .BAT file manually, the Windows Command Prompt C:\Windows\system32\cmd.exe opens, displays the text "Hi Paul", and remains open with the prompt "Press any key to continue...". After I press any key, the Command Prompt Closes.After I proved this worked, I created a Task in Windows Task Scheduler to run this .BAT file. For the Trigger, I chose to Begin the Task

    :)
     
    kraemerpw, Aug 3, 2022
    #1
  2. kraemerpw Win User

    Windows 10 task scheduler, running a task with higher permissions than logged on user

    Hi,

    I have a PC that is running Windows 10 Professional. I am a member of the Administrators group on this PC, but someone other than myself is the primary user.

    In the Task Scheduler, I'd like to create a task that would run a .BAT file periodically (at least once per day, but possibly more frequently).

    This .BAT file will copy some files from a network location to a local folder on this PC. The primary user has read-only permissions on this local folder, where as an Administrator, I have full control permissions. With read-only permissions, the primary user is not able to successfully run the BAT file because she does not have the permissions required for it to complete successfully.

    I notice that when I Create a Task in the Task Scheduler, there is an option to select the user account under which the task should be run. If I choose my own account (with Administrator permissions) here and select the option to "Run whether user is logged on or not", should I expect the task (specifically my .BAT file) to complete successfully when I am not logged on to the PC?

    If I can expect this to succeed, I'd like to find out what I should expect if I select the checkbox option "Do not store password. This task will only have access to local computer resources." It seems like choosing not to store the password would be a good choice if I want this PC to be as secure as possible. As the .BAT file copies files to a local folder (which I would consider a local resource), it seems like this might have a chance of working.

    If anyone here can tell me if this is correct, I would greatly appreciate it.

    Thanks in advance,
    Paul
     
    kraemerpw, Aug 3, 2022
    #2
  3. jgunning Win User
    Task Scheduler Batch file

    Hi all,

    Looking for some help.Im creating a batch file to run for different users to add a scheduled task. HOWEVER - the whole thing works great and has done for some time.But after i run the batch file on each machine (different users) i have to go into the security options and change the user the task runs in to the unique user of that machine. Is there a way to use the batch file to pull the account name of the machine (or computer name) and use that as the user the task runs in?


    Thanks =)
     
    jgunning, Aug 3, 2022
    #3
  4. floundo Win User

    Windows Task Scheduler - Running a .BAT File whether user is logged on or not

    Scheduled Task Won't Launch Program with .bat File

    I wrote a couple simple bat files to both shut down and launch Adobe Media Encoder on a Windows 10 machine. When I double click on them, both launch and execute flawlessly. However when I schedule a task and click to run them from the scheduled task, the
    status just shows as "Running" but nothing happens. When I go into processes I can see Adobe Media Encoder, but the initial launch screen never comes up much less the program opens. I've also noticed that when I launch from the bat file itself, Adobe ME
    shows up under APPS in task manager, but when I run from the scheduled task it shows up in background processes along with two other Adobe processes that when launched from the bat show up under Adobe Media Encoder CC2018:

    I've tried the options I've seen on several forums such as having the task run cmd prompt with the argument being the bat and run from the containing folder. I've enabled full permissions on the folder with the bat for all users. It's run under the local
    admin account to that machine, run with highest privileges. Any other ideas?
     
    floundo, Aug 3, 2022
    #4
Thema:

Windows Task Scheduler - Running a .BAT File whether user is logged on or not

Loading...
  1. Windows Task Scheduler - Running a .BAT File whether user is logged on or not - Similar Threads - Task Scheduler Running

  2. Windows 11 22H2 upgrade breaks "Run whether user is logged on or not" scheduled tasks

    in Windows 10 Gaming
    Windows 11 22H2 upgrade breaks "Run whether user is logged on or not" scheduled tasks: I have a number of scheduled tasks with the "Run whether user is logged on or not" option set, with the default setting of storing the password for the account.Everything was running fine, until the 22H2 update.Now such tasks won't start, yielding "Task Scheduler failed to...
  3. Windows 11 22H2 upgrade breaks "Run whether user is logged on or not" scheduled tasks

    in Windows 10 Software and Apps
    Windows 11 22H2 upgrade breaks "Run whether user is logged on or not" scheduled tasks: I have a number of scheduled tasks with the "Run whether user is logged on or not" option set, with the default setting of storing the password for the account.Everything was running fine, until the 22H2 update.Now such tasks won't start, yielding "Task Scheduler failed to...
  4. Windows Task Scheduler - Running a .BAT File whether user is logged on or not

    in Windows 10 Software and Apps
    Windows Task Scheduler - Running a .BAT File whether user is logged on or not: Hi,I am using Windows 10 Pro. I created a simple .BAT file with the following location and filename:C:\PK_Temp\test.batCurrently, my test.bat file consists of just the following two commands ...Echo "Hi Paul" pause... When I run this .BAT file manually, the Windows Command...
  5. Windows Task Scheduler - Running a .BAT File whether user is logged on or not

    in Windows 10 Customization
    Windows Task Scheduler - Running a .BAT File whether user is logged on or not: Hi,I am using Windows 10 Pro. I created a simple .BAT file with the following location and filename:C:\PK_Temp\test.batCurrently, my test.bat file consists of just the following two commands ...Echo "Hi Paul" pause... When I run this .BAT file manually, the Windows Command...
  6. Task scheduler run as system and logged in user

    in Windows 10 Support
    Task scheduler run as system and logged in user: I have a script which must be run as system in task scheduler. But at the end should be runned an exe file in that script as logged in user withouth username and password. Is that possible? 182571
  7. Unable to schedule tasks in Task scheduler with option run the task whether the user is...

    in Windows 10 BSOD Crashes and Debugging
    Unable to schedule tasks in Task scheduler with option run the task whether the user is...: I am able to schedule tasks with the first option that is - run when the user is logged on. But when I try with the other option - run whether the user is logged on or not, it doesn't work....
  8. Win 10 Task Scheduler Job Fails When Using "Run whether user is logged on or not"

    in Windows 10 Customization
    Win 10 Task Scheduler Job Fails When Using "Run whether user is logged on or not": Switching from Win 7 to Win 10, I went to set up a job in task scheduler which failed. I am now just trying to run a simple command "winver.exe". When I run it with "Run only when user is logged on", it works fine. When I switch it to "Run whether user is logged on or not"...
  9. Task Scheduler and Bat File Problem

    in Windows 10 Support
    Task Scheduler and Bat File Problem: Hi, Not sure which forum to post this in, but hopefully someone has some insight and can help me with this. I have a simple .bat file that stops my media server, creates an archive of a folder (for backup purposes), and then starts the media server again. It works...
  10. Cannot run BAT file with Task Scheduler "Access Denied".

    in Windows 10 Support
    Cannot run BAT file with Task Scheduler "Access Denied".: Hi all. I am learning some basic batch scripting and I've created a file with the following code: [img] All this does is move various file types to various folders to clean up my desktop. If I click on the .bat file directly it works great. But if I try to run it...