Windows 10: Windows cannot find task.vbs file?

Discus and support Windows cannot find task.vbs file? in Windows 10 Gaming to solve the problem; I accidentally deleted the task.vbs file from documents and i end up getting popups from Windows script host saying its missing.... Discussion in 'Windows 10 Gaming' started by Mahendran Mohan, Apr 30, 2024.

  1. Windows cannot find task.vbs file?


    I accidentally deleted the task.vbs file from documents and i end up getting popups from Windows script host saying its missing.

    :)
     
    Mahendran Mohan, Apr 30, 2024
    #1

  2. Running a VB Script File Using Windows 10 Task Scheduler

    Here is my VB Script code:

    Option Explicit    

    Dim objExcel, strPathExcel

    Set objExcel = CreateObject("Excel.Application")

    strPathExcel = "C:\Users\John J\Documents\Great Oaks\2018 Season\Handicap Test.xlsm"

    objExcel.DisplayAlerts = False

    objExcel.Workbooks.Open strPathExcel

    objExcel.Application.Run "'Handicap Test.xlsm'!HandicapRunTrial"

    objExcel.ActiveWorkbook.SaveAs strPathExcel

    objExcel.Workbooks.close

    objExcel.Application.Quit

    WScript.Quit

    In Task Scheduler Library, created a folder called "GOCC"

    I than hit "Create Basic Task", name it and give brief description/

    From the "Trigger" menu, I give a start date and time.

    From the "Action" menu, I hit "Start", and browse for my vbs file. I click on it and the full path command is listed. The task is listed in the Scheduler.

    Then I double click on the task, I keep the user account as "John J", click on " Run whether or not user is logged on or not, click

    "Run with highest privileges", click on "Hidden" and then configure the task for "Windows 10." I hit "OK" which the computer prompts me for my password. I enter it and hit "ok."

    The problem is that the vbs never runs at the designated date and time. I do not understand why it does not work.

    Thanks
     
    John JVrana, Apr 30, 2024
    #2
  3. Running a VB Script File Using Windows 10 Task Scheduler

    You can invoke VB scripts through the Task Scheduler, same as batch files or .exe files. What problem do you actually have? What is the script you run? Is it supposed to be interactive?

    There is little difference between cscript.exe and wscript.exe. When you run cscript.exe you will open a black Command Processor window (cmd.exe). With wscript.exe you won't. Furthermore, the instruction wscript.echo will do different things:

    • Under cscript.exe: Write a line of text in the Command Processor window.
    • Under wscript.exe: Generate message box.
    This difference is important for scripts being invoked by the Task Scheduler.
     
    Frederik Long, Apr 30, 2024
    #3
  4. Jake104E Win User

    Windows cannot find task.vbs file?

    Find Task list entries with VBS

    Thank you.

    I fail to make it work though...

    I can see how the

    "cmd /c tasklist.exe"

    works when run from a cmd prompt. And that the Shell-command then can execute it.

    My goal is to know if a specific app is running. With the SQL I could then ask specifically for that App - provided I know how it shows up in the list. Hence the first try on making a list of active apps.

    In the Task Manager I only have 5 Apps. The "cmd /c tasklist.exe" shows some 160 entries - and none of them appear to be any of the Apps in the Task Manager - and not the particular one I am looking for.

    Any suggestions on how to detect (from VBS) if a specific App is running?
     
    Jake104E, Apr 30, 2024
    #4
Thema:

Windows cannot find task.vbs file?

Loading...
  1. Windows cannot find task.vbs file? - Similar Threads - cannot find task

  2. windows script host the system cannot find the specified file divi32.vbs

    in Windows 10 Gaming
    windows script host the system cannot find the specified file divi32.vbs: windows script host the system cannot find the specified file divi32.vbs https://answers.microsoft.com/en-us/windows/forum/all/windows-script-host-the-system-cannot-find-the/8f1f4f39-dc32-43e9-b24c-dfe1b35a7ef3
  3. windows script host the system cannot find the specified file divi32.vbs

    in Windows 10 Software and Apps
    windows script host the system cannot find the specified file divi32.vbs: windows script host the system cannot find the specified file divi32.vbs https://answers.microsoft.com/en-us/windows/forum/all/windows-script-host-the-system-cannot-find-the/8f1f4f39-dc32-43e9-b24c-dfe1b35a7ef3
  4. windows script host the system cannot find the specified file divi32.vbs

    in Windows 10 BSOD Crashes and Debugging
    windows script host the system cannot find the specified file divi32.vbs: windows script host the system cannot find the specified file divi32.vbs https://answers.microsoft.com/en-us/windows/forum/all/windows-script-host-the-system-cannot-find-the/8f1f4f39-dc32-43e9-b24c-dfe1b35a7ef3
  5. Windows cant find sonis,vbs

    in Windows 10 Gaming
    Windows cant find sonis,vbs: Whenever I open my pc i get this error. I have tried to search this on autoruns64 but still nothing https://answers.microsoft.com/en-us/windows/forum/all/windows-cant-find-sonisvbs/162b2b51-7e3a-4157-acc7-564f3eacfd93
  6. Windows cant find sonis,vbs

    in Windows 10 Software and Apps
    Windows cant find sonis,vbs: Whenever I open my pc i get this error. I have tried to search this on autoruns64 but still nothing https://answers.microsoft.com/en-us/windows/forum/all/windows-cant-find-sonisvbs/162b2b51-7e3a-4157-acc7-564f3eacfd93
  7. Windows cant find sonis,vbs

    in Windows 10 BSOD Crashes and Debugging
    Windows cant find sonis,vbs: Whenever I open my pc i get this error. I have tried to search this on autoruns64 but still nothing https://answers.microsoft.com/en-us/windows/forum/all/windows-cant-find-sonisvbs/162b2b51-7e3a-4157-acc7-564f3eacfd93
  8. cannot find script file'C:\Program Data\533786.vbs

    in Windows 10 Gaming
    cannot find script file'C:\Program Data\533786.vbs: cannot find script file'C:\Program Data\533786.vbs https://answers.microsoft.com/en-us/windows/forum/all/cannot-find-script-filecprogram-data533786vbs/d981814e-e9f2-4b5e-aad5-6748e6108af1
  9. Find Task list entries with VBS

    in Windows 10 Network and Sharing
    Find Task list entries with VBS: I want to detect if a given program App is running. I have made the following VB-Script to list all "programs" running: Sub ListPGMs Dim WMIService Dim ProcessList dim objSWbemObject Set WMIService = GetObject"winmgmts:" & "{impersonationLevel=impersonate}!\\" &...
  10. Cannot find script file 1.vbs

    in Windows 10 BSOD Crashes and Debugging
    Cannot find script file 1.vbs: I keep on receiving a Windows script file error saying Cannot find script file "C:\ProgramData\Windows\profile\1.vbs" I have run a malware scan multiple times but i still keep on getting this error....