Windows 10: Find Task list entries with VBS

Discus and support Find Task list entries with VBS in Windows 10 Network and Sharing to solve the problem; 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... Discussion in 'Windows 10 Network and Sharing' started by Jake104E, Sep 6, 2020.

  1. Jake104E Win User

    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}!\\" & strComputer & "\root\cimv2"
    Set ProcessList = WMIService.ExecQuery "SELECT * FROM Win32_Service"
    For Each objSWbemObject In ProcessList
    call Append_to_LogFile"Name: " & objSWbemObject.Name, "PGMlist.txt"
    Next
    end sub


    Append_to_LogFile is just a utility that writes to a txt-file.


    I get a lot of names in this file - like all the background and windows processes - but I can't identify the Apps that I have running.


    How do I do that?

    :)
     
    Jake104E, Sep 6, 2020
    #1

  2. Task scheduler user account list includes user accounts that have already been deleted from the computer.

    Thanks for providing the results of the troubleshooting steps we provided. Since the credentials are still showing up in task scheduler, we suggest that you follow the steps below to check the entries in the credential manager and delete the entries manually:

    • Type the words Credential Manager in Cortana or the search box.
    • From the list of results select Credential Manager
    • From this screen, you can manage Web Credentials and
      Windows Credentials
      .

    Once you have the screen open verify if any of the credentials you saw in task scheduler is present and manually delete them.

    Regards.
     
    Jordan Dom, Sep 6, 2020
    #2
  3. 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, Sep 6, 2020
    #3
  4. Find Task list entries with VBS

    VBS Msgbox

    Denis,

    • I was too lazy to compute the size programmatically. And, it the 2005 version the message box always came up hidden, so I always used 0 for the top. It's also part of my OCD to be able to control everything.
    • I personally don't need it to timeout. I used this in vbs files to ask to continue to the next step, skip the next step or cancel the vbs. BTW, I added the code back in but keep it assign it to 0.
    • Sound was calling Windows Media Player: WshShell.Run "C:\Users\donast\desktop\sndrec32.lnk",7,false the lnk is a shortcut on my old desktop that had: "C:\Program Files (x86)\Windows Media Player\wmplayer.exe"
      "C:\Users\Public\Music\Wavefiles\Twilight.wav"
    • Yes. The value is the number of the button in the order specified when calling it.
    • Never really thought about it as all my VBS/VBA code is relatively simple and I add comments in the file as necessary to remind me what is going on. I don't usually have anyone to share my code.
    FYI I use a VBS to call it. Here's a line from a test vbs I use to run your version:

    choice=Wshshell.run("custommsgbox.vbs " & wscript.scriptname & " ""CopyFiles.vbs done. Continue with UnArchVista.vbs?"" ""White"" ""Black"" 40 ""Yes"" ""No"" ""Cancel""",1,true)

    Copy it to a text editor to see all the spaces, etc. Took me a while back the to figure it out.

    Don
     
    DRARetired, Sep 6, 2020
    #4
Thema:

Find Task list entries with VBS

Loading...
  1. Find Task list entries with VBS - Similar Threads - Find Task list

  2. 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
  3. 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
  4. 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
  5. Odd entry in Programs list

    in Windows 10 Installation and Upgrade
    Odd entry in Programs list: Just got the Oct 2020 update installed on WIn10 Home. Have an unusual reg key-looking entry in programs list: [ATTACH] Clicking on details shows: [ATTACH] Never seen this type of entry in Programs before. Any idea what it might be? Cannot uninstall via Windows...
  6. find last entry in a column

    in Microsoft Office and 365
    find last entry in a column: Hi all, I have a column and I want to find the last entry and add some text to the last entry offset 3 down. Could you tell me how to do it please?. Len 129713
  7. Strange task scheduler entry

    in AntiVirus, Firewalls and System Security
    Strange task scheduler entry: Hello, I have a entry in my task scheduler under Microsoft>Windows>rempl> "shell" Primary shell invocation for sediment pack trigger everyday. Can anyone tell me what is this and what it does? For the record, I already scanned my computer with Malwarebytes anti-malware, found...
  8. 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....
  9. Need to find GOM jump list registry entry/file location

    in Windows 10 Customization
    Need to find GOM jump list registry entry/file location: I have my old OS drive connected to a new drive and clean install. I'd like my GOM jumplist history back. Where is it located please? Google has failed me *Confused TIA 117202
  10. "n/a" entry in Autoruns listings: what is it?

    in Windows 10 Support
    "n/a" entry in Autoruns listings: what is it?: Hi! Today I noticed something that wasn't there in past days: "n/a" entries in Autoruns in HKLM\SOFTWARE\Microsoft\Active Setup\Installed Components and HKLM\SOFTWARE\Wow6432Node\Microsoft\Active Setup\Installed Components Respective registry entries:...