Windows 10: Windows Task Scheduler with netsh in batch won't work

Discus and support Windows Task Scheduler with netsh in batch won't work in Windows 10 Network and Sharing to solve the problem; I have a PC that is on my network but connected to the internet through a wifi connection that periodically disconnects itself (from the router end).... Discussion in 'Windows 10 Network and Sharing' started by HTWingNut, Feb 28, 2020.

  1. HTWingNut Win User

    Windows Task Scheduler with netsh in batch won't work


    I have a PC that is on my network but connected to the internet through a wifi connection that periodically disconnects itself (from the router end). Using Windows 10 Pro x64 1909

    The PC is basically a "public" terminal I use in my home, but only want it to connect through internet through the Xfinity wifi hotspot.

    If I use:

    Code:
    From a command line or in a .bat file it works fine.

    But as soon as I set it as a task in Windows Task Scheduler to run the batch file (basically just that command above), it says it ran successfully, but it doesn't connect.

    I set it to connect once every hour using the "Advanced" settings of:

    repeat task every "1 hour" ... repeat "indefinitely"

    I have run it with highest privileges too, even though I shouldn't have to, and it still won't work.

    Any tips? Thanks!

    - - - Updated - - -

    Well, after recreating the task a couple times and a reboot, it works now... /shrug/

    :)
     
    HTWingNut, Feb 28, 2020
    #1
  2. 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, Feb 28, 2020
    #2
  3. Tryx3 Win User
    Tryx3, Feb 28, 2020
    #3
  4. Windows Task Scheduler with netsh in batch won't work

    batch file on task scheduler in Windows 2012 server R2 don't seem to work

    I have a batch file if run manually, able to run successful but not on task scheduler. It will show completed successful but nothing happen.

    I have done the following steps but still same result.

    - select run whether users is logon or not

    - run with highest privileges

    - under Trigger tab, added the following parameters

    • Program/script = C:\Windows\System32\cmd.exe
    • Add arguments = /c C:\zVASSS\Sync\start.bat
    • Start in = C:\zVASSS\Sync

    Any solution?
     
    Kok Keong Kan, Feb 28, 2020
    #4
Thema:

Windows Task Scheduler with netsh in batch won't work

Loading...
  1. Windows Task Scheduler with netsh in batch won't work - Similar Threads - Task Scheduler netsh

  2. Task Scheduler - Batch File

    in Windows 10 Gaming
    Task Scheduler - Batch File: I am attempting to use Task Scheduler to run a batch file automatically every day. I am following instructions that I found on the Web. As far as I can tell I have set up Task Scheduler correctly, the only problem being that it doesn't run! I have uploaded screenshots of the...
  3. Task Scheduler - Batch File

    in Windows 10 Software and Apps
    Task Scheduler - Batch File: I am attempting to use Task Scheduler to run a batch file automatically every day. I am following instructions that I found on the Web. As far as I can tell I have set up Task Scheduler correctly, the only problem being that it doesn't run! I have uploaded screenshots of the...
  4. What Could Be Disabling Batch Files Scheduled in Task Scheduler?

    in Windows 10 Support
    What Could Be Disabling Batch Files Scheduled in Task Scheduler?: I'm using Win10 Pro 2004. I go to Win-R > taskschd.msc > Task Scheduler Library. I see a number of batch files that I have scheduled to run at various times. I see that today, like yesterday, their status is Disabled. Yesterday, when I saw that, I right-clicked > Enable. But...
  5. Invoke scheduled task from batch?

    in Windows 10 Support
    Invoke scheduled task from batch?: Is there any way to invoke a scheduled task from a script? I know the tasks can be manually invoked from the Task Scheduler's GUI so maybe there's a way to do it programmatically. Yes? 165093
  6. Task scheduled in Task Scheduler won't run from shortcut

    in Windows 10 BSOD Crashes and Debugging
    Task scheduled in Task Scheduler won't run from shortcut: I have a task set up in Task Scheduler on Win 10 Pro 64-bit and it runs correctly when run from Task Scheduler. I cannot get the task to run from a shortcut. I do not know whether this is relevant, but in the Settings window of Task Scheduler it shows the checkbox next to...
  7. Task scheduler simply refuses to run a batch script

    in Windows 10 Customization
    Task scheduler simply refuses to run a batch script: I know that there have been many different solutions to this problem posted on the internet and various forums, but I have scoured Google for a solution to my problem to no avail. My problem appears to be unique (something that at this rate I do not want). Now, onto my...
  8. Task scheduler won't start

    in Windows 10 Software and Apps
    Task scheduler won't start: I have the problem whare the task scheduler in services is set to automatice but fails to start and log in is greyed out. I have tried many solutions and none have worked. However I did find a solution and it was down to my own error. I used a program called DISMPP-10 and...
  9. Parallel batch jobs in one scheduled task

    in Windows 10 Support
    Parallel batch jobs in one scheduled task: Parallel batch jobs in one scheduled task hi, This should be an easy answer. I want to create one scheduled task, it will be called "CLEAR_PHOTOSBYDATE", see attached pic or (approximate example, not literal job...yet)...
  10. Problems automating a batch file with task scheduler

    in Windows 10 Support
    Problems automating a batch file with task scheduler: I want run this bat file from task scheduler @Rem %pf% expands to the right program location depending if it is x86 or x64 system @setlocal @set pf=%ProgramFiles% @if not "[%ProgramFiles(x86)%]"=="[]" set pf=%ProgramFiles(x86)% @Rem %macropath% expands to the demo...