Task Scheduler wont run “.exe” file on startup

Page 1 of 2 12 LastLast

  1. Posts : 67
    WINDOWS 10
       #1

    Task Scheduler wont run “.exe” file on startup


    So, I have the AutoHotKey script, to permanently lock the NumLock key. I converted it to an .exe file because I thought that would solve the Task Scheduler problem. The thing is, its not working! I checked Task Manager, and it actually shows up there, after restart, but its not actually working, as in I can turn Num Lock off.

    I adjusted the settings as you can see,
    -untitled1.png

    BUT the exe file works only if I double click it. But I really want it to work as a scheduled task on start up.

    I tried using a batch file to run it, as in scheduled a task to run the batch file, that starts the .exe, again it shows up in Task Manager, but does not permanently lock the NumLock, unless I double click it aka activate it manually. Any help is greatly appreciated!
      My Computer

  2. dalchina's Avatar
    Posts : 32,653
    Win 10 Pro (1903) (2nd PC is 21H1)
       #2

    I think you would need to upload the program/script for someone to try it.

    & see e.g.
    How to Enable Num Lock Automatically When Your Computer Boots
      My Computers


  3. Posts : 67
    WINDOWS 10
    Thread Starter
       #3

    dalchina said:
    I think you would need to upload the program/script for someone to try it.

    & see e.g.
    How to Enable Num Lock Automatically When Your Computer Boots
    program

    il check it out, but In case i want to use a different Auto Hotkey Made script converted to exe in the future, id really like to know how to proceed with having it run on startup!

    EDIT: so yeah, that tutorial is just for having Num lock turn on, on start up, if you forget to turn it on, but you could always turn it off, im trying to have it be on permanently.
      My Computer

  4. dalchina's Avatar
    Posts : 32,653
    Win 10 Pro (1903) (2nd PC is 21H1)
       #4

    If your objective is to turn Numlock on permanently when that program is running, it doesn't have that effect for me. Even when it's running, I can click Numlock and disable it.
      My Computers


  5. Posts : 67
    WINDOWS 10
    Thread Starter
       #5

    dalchina said:
    If your objective is to turn Numlock on permanently when that program is running, it doesn't have that effect for me. Even when it's running, I can click Numlock and disable it.
    well thats weird, worked so far, when duble clicked, does it show up in task manager?
      My Computer

  6. dalchina's Avatar
    Posts : 32,653
    Win 10 Pro (1903) (2nd PC is 21H1)
       #6

    Yes - FWIW I have to use the on-screen keyboard as my physical keyboard lacks Numlock/keypad

    Here's another to play with:
    Method 4:
    Enable/Disable Numlock at Windows Startup - Technipages

    Enable/Disable Numlock at Windows Startup from PowerShell - KBase

    RJL Software - Software - Utility - NumLock
      My Computers



  7. Posts : 67
    WINDOWS 10
    Thread Starter
       #7

    dalchina said:
    Yes - FWIW I have to use the on-screen keyboard as my physical keyboard lacks Numlock/keypad

    Here's another to play with:
    Enable/Disable Numlock at Windows Startup from PowerShell - KBase
    odd, I just tried it on 3 different PC's and its working, could other people also try it? maybe people with the Num pad on the keyboard? get a senses going?
      My Computer

  8. Try3's Avatar
    Posts : 9,206
    Windows 10 Home x64 Version 21H2 Build 19044.1237
       #8

    Since you want it to run elevated, you must tell TS to run it at logon not at startup.

    And if it has any user interface, it can only be run by TS if the user is logged on.

    I also suggest turning on Task history in TS.

    By the way, your diagrams are very difficult to read correctly. Try it yourself and you'll see. You'd be better posting each one individually rather than in one big consolidated image.

    Denis
      My Computer

  9. Try3's Avatar
    Posts : 9,206
    Windows 10 Home x64 Version 21H2 Build 19044.1237
       #9

    Can I also suggest that you include running this script in your .exe file testing and, if you get that far again, in testing its running within TS.

    ToggleNumLock.vbs
    Code:
    set WshShell = WScript.CreateObject("WScript.Shell")
    WshShell.SendKeys "{NUMLOCK}"
    MsgBox "Done"
    The line
    MsgBox "Done"
    is just to give you some proof that it has run. If you get bored by it, just delete that line.

    If, despite running your .exe file, this vbs does toggle the NumLock then you could probably save yourself some effort by using a different approach. Something like SharpKeys, perhaps.

    Denis
      My Computer


  10. Posts : 67
    WINDOWS 10
    Thread Starter
       #10

    Try3 said:
    Since you want it to run elevated, you must tell TS to run it at logon not at startup.

    And if it has any user interface, it can only be run by TS if the user is logged on.

    I also suggest turning on Task history in TS.

    By the way, your diagrams are very difficult to read correctly. Try it yourself and you'll see. You'd be better posting each one individually rather than in one big consolidated image.

    Denis
    Denis, i dont know how to thank you! that "run at log on" option did it! literally never would have thought of it! thank you so so much!
      My Computer


 
Page 1 of 2 12 LastLast

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 22:47.
Find Us




Windows 10 Forums